Skip to main content

Posts

Showing posts with the label platform-linux

Printing to file in Linux WINE

I noticed that this post has been sitting as a draft since 2011. At this point I have no idea if it’s useful or what I was even doing, but I might as well make it public in case someone can find it helpful! So I’ve been trying to get one of those PDF print drivers working in WINE without success. I then came upon a process that might work. When printing you need to select the checkbox “Print to file” that creates a .prn file. Just Linux things... I was using a program that only has printing facilities, but I want to export around 100 pages of text and images. Once you have the .prn (postscript) file, you can do any number of things to it. In my case I want the postscript file to be converted to HTML. I am also considering PDF format because that has more conversion options to eventually get me to HTML or plain text. sudo apt-get install cups-pdf Or it looks like that package might have changed to this… sudo apt-get install printer-driver-cups-pdf Where PDFs would be generated in /home/...

Updating the Raspberry PI GIT server.

I took time to refresh my Raspberry PI GIT server. I am still using the v1 board, but with a few upgrades and modifications. It was more to streamline the entire package instead of performance upgrades. The original Raspberry Pi in a modded case. Changes: I bought a half-height SD to Micro SD adapter. This makes it stick out less from the case. Sadly it’s not totally flush, but better at least. Along with that I upgraded to a 64GB micro SD card from a 32GB SD card. I upgraded the backup drives with 64GB Lexar JumpDrives (S45 LJDS45-64GABNL). They are super compact and had decent reviews. I decided to skip the RAID 01 mirroring approach with these. It simplifies things and there really isn’t any drawback besides maybe hot swap (which I don’t think would work because fstab uses unique drive identifiers). I picked up another power supply on a whim when I saw it at the store “Five Below” for a great price. This again streamlines things over my previous setup that was combo type where you w...

Raspberry Pi GIT Server Notes

Edit: I updated my RP GIT server and made more notes in a later article. Here are my notes for setting up GIT on Raspberry Pi and using a Windows client (TortoiseGit). I’ve been using this little thing as a GIT server for around 5 months now and I love it. Here is the quick notes I took while getting things setup. It’s probably really disjointed, but you might find some helpful tips in here. www.raspberrypi.org http://www.raspberrypi.org/downloads NOOBS (offline and network install) http://downloads.raspberrypi.org/NOOBS_latest Format your SD card using the SD Card Association’s formatting tool. https://www.sdcard.org/downloads/formatter_4/ Install Raspbian (GIT seemed to be pre-installed on the version I used): The defaults: username: pi password: raspberry When greeted with the post install program, find the advanced option to enable SSH. You can also change your password from there. 2017 Edit: I’m in the process of installing it on a larger SD card. Anything over 32GB will probably ...

Setting up Subversion (SVN) on Ubuntu Linux

After getting the Android SDK and Eclipse IDE installed and running, I started on getting Subversion ready for our first project. Here are the general steps necessary. For my configuration there is a Ubuntu server that I connect through ssh and will need to do the same to connect to SVN after everything is configured. Useful tutorials: https://help.ubuntu.com/community/Subversion https://help.ubuntu.com/community/AddUsersHowto https://help.ubuntu.com/community/AptGet/Howto Commands executed to setup the system: sudo apt-get install subversion cd / mkdir svn_repository sudo addgroup subversion sudo adduser USERNAME1 subversion sudo adduser USERNAME2 subversion # Repeat the above line for other usernames as needed sudo adduser www-data subversion cd /svn_repository mkdir android_test sudo svnadmin create /svn_repository/android_test cd /svn_repository sudo chown -R www-data:subversion android_test sudo chmod -R g+rws android_test Above I have an example where a directory called “svn_re...

Setting up the Android SDK in Linux (Eclipse IDE)

While it’s generally pretty “easy” to setup the Android SDK in Linux (in my case Ubuntu 10.04), there are a few quirks that required some searching on the Internet to figure out. The SDK and related items are located here: http://developer.android.com/sdk/index.html Here is the general process I went through to get things running: – Install JDK by typing “jdk” into the ubuntu software center and install the proper piece of software. I think you need at least version 5 or 6 for the Android SDK. – Install eclipse by getting the latest version at http://www.eclipse.org/downloads/ – Download “Eclipse IDE for Java Developers” – Extract eclipse-java-helios-SR1-linux-gtk-x86_64.tar.gz (or similar depending on what version you download) to say the… /home/user/ directory (you can run the program by double clicking on the “eclipse” icon in the main directory of the program. – I started the program and defin...

Lucid Ubuntu and GDAL Latest

I’m writing some software that relies on a feature of GDAL (Geospatial Data Abstraction Library) in a more recent version than the one Ubuntu Lucid currently has in their repository. As I write the software on my desktop, I found out pretty quickly that I was using an old version of one of the commands (more specifically ogr2ogr and the clipping functionality). Thanks to this site for the initial tip, it’s pretty easy to get the latest “unstable” release of GDAL installed without having to manually compile the program from source code yourself. If you are using Karmic or above, you can run these commands: sudo apt-get install python-software-properties sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable Or you can opt for the more involved version below: In your desktop, navigate to here: System -> Administration -> Software Sources “Other Software” tab Add these two items: deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu <codename> main deb-src htt...

Speed up Netbeans in Ubuntu Linux

Java Netbeans is a pretty decent editor for PHP code. I use Linux Ubuntu now for my primary desktop computer, so it’s quite convenient and easy to get running. One issue is that in default configuration the program is a bit slow feeling. Doing a quick search I found this page: http://performance.netbeans.org/howto/jvmswitches/ Which describes a few command line parameters that might help the IDE function faster. I’m currently running the command “/usr/bin/netbeans -J-Xverify:none -J-Xmx384m -Dsun.java2d.opengl=true” Basically, it removes one unnecessary verification check, adds 256mb of RAM to the default RAM pool the program can use, and attempt to use OpenGL to render the IDE. I am currently using closed-source video card drivers, so your mileage could very with that last parameter. You can modify your default system menu link by doing this: Right-click on the “Applications” dropdown system menu. Select the “Edit Menus” list item. Cli...

.NET MONO Which Operating System is Running?

Do you want to execute operating system specific code (exes) in the .NET/Mono framework? I’ll go over how you can do that. Below is part of a class I had written that can determine if Linux or Windows is running. Keep in mind that for the code to properly detect Mac OS, you will need to figure out the proper platform number and modify the code respectively. using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace namespace1 { public static class HostOS { /// <summary> /// An enumerator that holds a list of possible operating systems /// this code can execute on. /// </summary> public enum HostEnvironment { Windows, Linux } /// <summary> /// Determine the operating system this program is running on. /// </summary> /// <returns>The current operating system</returns> /// <rem...

Setting up a Source Control Server

Lately, I’ve been interested in the benefits of having a dedicated source control server. My goals for the project: 1. Have a dedicated server to store source and other files I’m working on that could benefit from source control and a secondary backup. 2. Have the server accessible through the Internet so that friends who I am working with can access our projects. 3. The server should be as low power usage as possible. 4. Attempt to make the server as secure as possible. Probably only have one port directed to it (either the http webdav or svnserve protocols on a custom port). I might also consider having ssh directed as well so I can use something like NoMachine NX Remote Access . Last weekend I ordered an “MSI Wind PC” computer to take on that role. This computer is sold as a barebones unit that doesn’t come with RAM or a hard disk. For about $220 total, I was able to get an ATOM based computer with a 750GB Western Digital hard drive and 1GB of ram. ...

Using Linux

I’ve used linux/unix quite a bit over the years. Probably my first experience with Linux was when I bought a magazine in the 90’s that had Mandrake linux on CD. Since then I’ve used distributions from Slackware to Ubuntu, but never really had a desire to do much with the OS once I had it running, so it just usually sat on my harddrive. I have recently been reminded why I was never interested in using *nix exclusively. Don’t get me wrong here, I think the concept of free open-source software operating systems is great. (Edit 09/2010: I’ve been using Ubuntu Linux 10.04 and have had generally a good experience with it for a few months as my primary desktop. I’m going to keep using it…) Let me go over a scenario to explain my thoughts: Goal: Setup Debian Linux so that I can test my software. I specifically want to use a VMWARE appliance so that I don’t have to mess around with my current OS. (Edit: I’ve since switched over to Sun’s VirtualBox software, which is much better than t...

.NET and MONO

I’ve been working on a personal project with a friend for quite a while now.  To make a long story short it deals with loading/editing/saving large quantities of public geographic data. Lately we have been throwing around the idea of having our database server’s OS in Linux instead of Windows 2000. Which brings me to the MONO project. I’ve started testing some code I wrote in C# (a console application that accesses the Internet) by using that MS Virtual PC program I setup in my previous posting with Xubuntu. While my current goal changed a bit, I’m glad to start getting some use out of it. Basically, all I needed to do was install the mono run-time libraries and I was good to go. Now keep in mind that some Linux distributions might only have older versions of MONO available by way of a package manager (or pre-install). In this case you should see if your .NET application requires something that the available version of MONO does not have by visiting the mon...

Virtualization

I’ve been interested lately in using virtualization to setup a “computer” to do local web development on. I’m looking to configure it it closely as possible to my paid hosting, so that it will be as easy as possible when I take a project and migrate it over to to the host. If you haven’t had any experience with virtualization, it’s basically a way of running an operating system inside whatever operating system you are currently using. The nice thing about it these days is that more recent processors have hardware extension to improve performance to the level where it’s quite usable. The software mimics all aspects of a basic computer with standard hardware. So you take your operating system install disk and go through the process as you normally would. I am currently using Windows Vista Ultimate x64. So looking at the easiest option, I downloaded and installed Microsoft’s free “Virtual PC 2007” program. I’ve used it...