Posts Tagged ubuntu

Fedora 11 vs. Ubuntu 9.04

Put Fedora 11 on my laptop just out of boredom, some notes:

  • Fedora 11 SELinux by default: Cool but confusing
  • Fedora 11 repositories: Better selection than previous releases, still not as many choices as Ubuntu
  • Ubuntu still wins on the default menu organization for new users (just a bit easier to navigate)
  • Fedora bootup vs. Ubuntu bootup is about a wash, they both look good and are fast
  • Default themes: Neither will win a competition on looks, Linux Mint is much better looking than both
  • Yum vs. Apt: Yum was fast, but a lot of 404′s on the repositories (which is more of an issue of Fedora’s mirror infrastructure)
  • PPAs vs. ???: This is where Fedora appears (correct me if I am wrong) to have absolutely no answer to OpenSUSE and Ubuntu. In Ubuntu we can get up to date packages that were not yet officially released using PPAs. OpenSUSE users can download packages from the build service. Fedora really has nothing this fun (I am aware OpenSUSE can build Fedora packages, but the selection is not even close).
  • Support: Fedora is a distro that is on the cutting edge. It will never compete in support, but this is intentional.
  • Community: Ubuntu community is simply the biggest Linux community on the internet. Nobody is even in the same ball park. This also means that Ubuntu has much more “noise” than Fedora (ie people who contribute nothing and are generally factually inaccurate). Experts may like Fedora more because of the lack of this noise.

So if you are looking to try out Fedora, I don’t think you will gain or miss much. Personally I am going to put Ubuntu back on as I really love software from PPAs, and I love using apt just out of habit. But hope that helps someone who wonders what the differences are or what they are missing.

I have added a screenshot which is the default screen with Gnome-Do with docky theme, but this obviously works in Ubuntu also:

Fedora11

Tags: , ,

Connecting to Ubuntu from Windows

Recently I needed to connect to a Ubuntu box from a Windows machine because FGLRX just would not work with 3 monitors in surround view. Fortunately using a few tools made it much easier to interface with my Ubuntu box again.

Assumptions

  • Ubuntu system named ubuntubox with ip 192.168.1.2
  • Windows system named windowsbox with ip 192.168.1.3

Remote Access

For those of us who are comfortable with the command line, ssh is the only way to go. To make sure you have ssh installed, you can run (on your Ubuntu box):

sudo apt-get install ssh

This service should automatically start a boot up, and will allow you to open a terminal to access the command prompt. Now to access our ssh server, we need to download a ssh client for Windows. Look no further than PuTTY, which is free, open source, and easy to use. There are a few programs PuTTY provides, we just need putty.exe and optionally plink.exe (for next post in this series).

These can be downloaded at the PuTTY download page.

putty

Once downloaded, you can put putty.exe pretty much anywhere you can remember it. I just left it on my desktop and dragged the shortcut to my quick-launch bar. Double click putty.exe, and in the dialog box labeled “Host Name” go ahead and enter your Ubuntu box’s IP address.

Click “Open” when you are ready to connect, and it will prompt you for a username and password. You should already have a username and password from your Ubuntu install.

putty2

If you want your prompt to be colorful, you need to type ‘nano .bashrc’ at the prompt, and scroll down to the line that looks like “#force_color_prompt=yes” and remove the “#” character. After logging in it should now have colors. If you want other cool tips for your shell, I suggest you check out the Ubuntu Wiki as I wrote up a specification on making it more usable: Enhanced Bash.

At this point you should have remove access to your Ubuntu system.

Sharing Files

We need a good way to share files between these two systems. A lot of people will suggest Samba / CIFS (which is really a technical way of just saying Windows File Sharing). I think that Samba / CIFS lacks any technical merit, and is harder to configure. I am going to show you two ways of sharing files, both which use SSH.

WinSCP

WinSCP is basically CuteFTP or whatever FTP program you grew up with, but instead it works with SSH. It is incredibly easy to use. Go ahead and download WinSCP from their website. You can download either the portable executable (which means you can run it from anywhere without installing) or the full installer. Either one will work for our purposes.

The download page is at: http://winscp.net/eng/download.php. To connect from Windows to our Ubuntu system, go ahead and install the program (or not if you downloaded the portable version). Once you start it up, it should look like this:

winscp

Go ahead and fill in the IP address for your system. It is going to say it doesn’t know it’s key yet, go ahead and click Yes there. You will now see your home directory on your Ubuntu box and your Windows box. You can now drag files back and forth, and better yet, encrypted.

Something More?

As a programmer, one thing I need is a great editor. I happen to use VIM to code everything I make. VIM through SSH is ok, but one problem I have is I can’t use any of the really cool color schemes out there, as PuTTY is limited to 256 colors. There are some plugins out there which are supposed to convert the color schemes, but none works reliably for me. Luckily, GVIM is available for windows, so I went to their download page: http://www.vim.org/download.php and downloaded / installed it.

This was great, but for Django development I really wanted to edit the files in place, via a shared folder, instead of using WinSCP every 10 seconds (I use test driven development, as in I may change a file 5 times a minute). How do we go about using our SSH server as a shared folder under Windows? We can use the free / open source program Dokan.

Visit their download page, and retrieve the “Dokan library” and “Dokan SSHFS”. Their download page is at http://dokan-dev.net/en/download/. Install the Dokan Library first. After installing that, install Dokan SSHFS. Once installed, Dokan SSHFS will appear under your start menu. Go ahead and run it:

dokan

This should be a familiar pattern by now. Go ahead and set the “Host” file to the ip of your Ubuntu system. You will also need to provide a username and password. In the screenshot above you can see that my SSH server will be mounted as my N: drive now.

With SSHFS up and running, I can now edit files directly on my Ubuntu server. Combining that with GVIM, I can use an editor that provides excellent syntax highlighting:

gvim

In this screen shot I am using the Wombat theme for GVIM, and the Microsoft font Consolas. Consolas is freely available for Windows XP if you download the Office 2007 compatibility pack, or PowerPoint Viewer.

Tags: , ,

Best Linux Notetaking Application

keepnote-logo

I know a lot of people out there like to take notes with Linux, and probably didn’t come across this program yet, as it look me a bit googling to find it again. The program is called KeepNote, and is a fantastic program for taking notes. I use it with Dropbox, and store all of my notes there and that way it is synchronized to all of my systems. The program itself is open source and free, and you can support it by making a donation on the homepage.

keepnote1-small

I really like KeepNote, and the ease at which I can drag and drop media to it. One thing I did set in preferences was to only autosave every few minutes, otherwise Dropbox is constantly being updated:

keepnote2

The top toolbar is well thought out and very intuitive for formatting. It also supports all of the standard keyboard shortcuts, such as CTRL-B for bold etc. If you are looking to try it out, the author has a .deb package on the homepage that installs no problem (Ubuntu Jaunty AMD64 here).

Tags: ,

NCPFS

NCPFS each release generally is sent out completely not working until I fix it. If you have C experience, you can help me fix up this source. I have started a github.com project called ‘ncpfs-ng’. Here I will be committing my bug fixes. There are about 2 trillion compiler warnings that need to be addressed, so any help is welcome. If you are interested or have a patch, you can reach me at sharms at ubuntu dot com.

Immediate goal is fixing the package on 32-bit systems Jaunty and up, as GCC changed a lot since the Intrepid release, causing issues:
https://bugs.launchpad.net/ubuntu/+source/ncpfs/+bug/328020

My debdiff there does make it work for amd64, but i386 users still have no luck. Github page is at: http://github.com/sharms/ncpfs-ng/tree/master

Tags: , ,

Interesting Blogs

With respect to my last blog post, apparently everyone cares about boot speed :)

Blogs
My Google Reader has a ton of feeds, figure I would highlight some of the more interesting ones I have found:

Tags: , ,

Installing Groupwise 8 Client in Ubuntu Jaunty AMD64

  1. Download the Groupwise 8 Linux Client Tarball from Novell: http://download.novell.com/index.jsp
  2. Download Java 6 SE JRE: http://java.sun.com/javase/downloads/index.jsp
  3. Install prerequisite libraries: sudo apt-get install alien libstdc++5
  4. Extract archive downloaded from Novell: tar xvfz gw800_client_linux_en.tar.gz
  5. cd groupwise_8.0.0-84910_lnx_client_en
  6. sudo alien -i novell-groupwise-gwclient-8.0.0-84910.i586.rpm
  7. Extract Java 6 SE JRE: ./jre-6u14-linux-i586.bin
  8. sudo mv jre1.6.0_14 /opt/novell/groupwise/client/jre

Tags: , ,

Etc

Bought 20 Ubuntu CD’s from the US Store. I have to wonder, for those of you using shipit, if you have the means why not actually buy them?

cds

UbuntuOne
I think this is a really cool initiative from Canonical. I don’t understand people complaining about being closed source, because the client is fully open sourced from what I can see. So all the code I installed on my system is open source, no problem. If I utilize their service, then it isn’t, as the backend isn’t open source. But the fact that I can edit the client files, or make a compatible backend myself since the client is open means I have absolutely no issue with that. I think people complain to complain, if they only used that energy to write an open backend instead. Oh well.

Tags: , ,

Creating graphs in python

Slow Friday today, so was digging through my $HOME and found some graphs I was generating a few months ago. I wanted to create some graphs showing the number of connections to a server, and stumbled on CairoPlot.

Show me pretty pictures
Graph generated by CairoPlot

Unfortunately, I believe I hacked my CairoPlot.py file to make the dots and pulled some stuff from other repositories, so the code might not give the same results. You may want to try the trunk. But the general point still exists that it is really easy to use, and the library is really easy to hack. To make the graph above I just ran:


#!/usr/bin/python
colors = [ (0.2, .3, .65), (0.5, 0.7, .1), (.35, .2, .45), ]
graphData = {}
graphData['server1'] = [ 20, 12, 42, 14, 11, 35 ]
graphData['server2'] = [ 18, 23, 10, 17, 23, 25 ]
CairoPlot.dot_line_plot("./graphs/blog", graphData, 500, 500, axis = True, grid = True, dots = True, series_colors = colors)

Obviously this is really easy to script, so you can parse your syslog files, append them to the graphData dictionary corresponding to the server, and bam you have a full report of everything happening etc. What I did was use the datetime module to sort events into time buckets that were then used as graphs, giving a view of 24 hours or whatever the period entered was.

Parsing syslog
I will give you a hand here too. In python, to parse syslog, I used a module called pyparsing. It uses a parsing language which is pretty easy to understand if you give it 20 minutes or so. Ie to parse the syslog lines I was looking for, I did the following:


month = Word(string.uppercase, string.lowercase, exact=3)
integer = Word( nums )
ipAddress = delimitedList( integer, ".", combine=True )
serverDateTime = Combine( month + " " + integer + " " + integer + ":" + integer + ":" + integer )
hostname = Word( alphas + nums + "_" + "-" )
daemon = Word(alphas) + Suppress("[") + integer + Suppress("]:")
ip = Suppress("remote IP address ") + ipAddress
bnf = serverDateTime + ipAddress + daemon + ip

for line in syslogFile:
try:
fields = bnf.parseString(line)
...

Keep in mind I did this very quick, so I am sure it can be refactored a bunch, just an example.

Tags: , , ,

Gaming on Ubuntu / Ubuntu Gaming Team

Just read the post on the announcement of the Ubuntu Gaming Team. I believe the fundamental problem of getting games on Linux is the vast disparity of Linux users that are coders versus Artists.

This hits home for me as last week I was looking at programming a game. A game is no fun to program without a quality library of media assets to work with. We obviously have the programming skills in the community. I could probably write a World Of Goo type game in scope solo in 6 months or so. But the pipeline breaks when I want to make it look good.

What did I do? Fired up inkscape and tried to draw some planes for an Air Traffic controller type game. After 3 hours or so of trying to draw a plane, it turns out I just have no artist sense for colors / shading / curves etc. My results using Blender were even worse. Currently the community artists do a great job on icon sets. If there could be an open repository of free game assets that didn’t look like they were from the 80′s this would definitely, atleast in my case, create growth in the games sector.

On a side note, last night I installed Urban Terror 4.1 and Savage 2. Urban Terror was fun to play for a bit, and I didn’t get a chance to really dive into Savage 2 yet.

Tags: ,

Dropbox on Ubuntu

Often times you want to keep a file in sync, much like .mac, between computers. Or maybe you just need to make sure your files are backed up to the web. Enter a product called Dropbox.

Dropbox Logo

Dropbox provides many useful features:

  • Simply installation
  • Automatic file synchronization
  • Share files in 2 clicks
  • Display photos in a photo gallery
  • Works on Ubuntu and Windows

Dropbox free accounts give you 2 gigabytes of space to store files. To install it, you can get the Ubuntu RPM at http://www.getdropbox.com. The Intrepid RPM listed also works under Jaunty. After downloading and installing the rpm, you can logout and log back in and you will notice that the notification area of your taskbar has a Dropbox logo. Clicking that will prompt you to start the process:

Installing Dropbox

After clicking OK you will be guided through a wizard allowing you to use an existing account or create a new one:

install-dropbox-2

After entering all of the information, Dropbox will ask you if you want to check out the features via a feature tour:

install-dropbox-3

Dropbox is now installed and ready to use. You can now drag files to the folder, and they will be uploaded to Dropbox’s server, along with any other computers you have registered. I like to add Dropbox to my places menu for easy access, by opening my home folder and dragging it to the left bar:

drag-dropbox

Also if you are on the internet and don’t want your connection slowed down by Dropbox uploading / downloading files, if you right click the icon you can set the rate low and not even notice the transfers.

After using Dropbox for several months, I am very happy with their free offering. I am considering upgrading to their $9.99/mo 50 gigabyte plan, but I wish there was a plan between the two. The web interface for Dropbox is great, and the Linux client support has always worked for me. I would highly recommend giving this a try if you are a Ubuntu user.

Tags: ,