Posts about Linux

Gnome 2.24 Released

September 25th, 2008

I read today that Gnome 2.24 has been released. There’s a few nice features but tabs in Nautilus seems like the one I’ll find the most useful (assuming you can drag files between tabs). Actually the biggest deal for many users will be that this 7 year old bug in GTK has been fixed.

Many people have probably encountered this bug when the mouse is hovering over the location of a button on a form that opens under the mouse. In this situation the button cannot be clicked until you move the mouse away and back over the button. It’s a really annoying bug and I’m glad it’s fixed.

Gnome 2.24 will be in Fedora 10 due to be released on 25th of November so I’ll have to wait until then for a test drive.

Safely Shutdown a Frozen Linux System

September 17th, 2008

For when everything freezes totally it’s useful to know the commands on this Free Software Magazine page.

I notice that on Fedora these keys are not captured by default but this is easily fixed using the following command as root.

# echo 1 > /proc/sys/kernel/sysrq

On my system this also opens gnome-screenshot but don’t worry as the kernel still gets the keys as well. My only problem is that the /proc/sys/kernel/sysrq file gets overwritten on boot so I need to make the change permanent, if I find a solution I’ll update the post.

Update - on Fedora it’s very easy to set the sysrq parameter to 1 permanently. Just open the file /etc/sysctl.conf as root and look for the following line, changing it from 0 to 1.

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

Remove DOS newlines from Python files

September 17th, 2008

I’ve been working on a few python files in WIndows and then moving them to Linux but whenever I try to run them I get an error about ‘directory not found’.

I soon discovered that the Windows carriage return messes up the files for Linux so we need to remove them all. If you open the offending file using vi you’ll see lots of ^M characters spread through the file. Fortunately these are pretty easy to remove using vi. Open the file in vi, press escape so we can enter a command, type this command press enter and save the file.

%s/^M/ /g

It’s very important that you create the ^M character by typing alt+v then press m while still holding down alt+v, do not paste straight from this page.

Try Downloading Linpus Linux Lite

September 11th, 2008

After posting that the Acer Aspire One netbook uses a modified version of Linpus Linux Lite I thought I’d download it and run it within Virtualbox just to take a look around.

For a website with iso files available to download it’s the slowest site I’ve come across in ages, even the regular site takes an age to load so you can forget trying to download it for yourself.

It would have taken about 25 hours to fully download the 673.61 MB iso file and I couldn’t find any mirrors with better bandwidth, so unless you’re very patient it’s out of the question.

Tempted to buy a Netbook

September 8th, 2008

With companies seemingly releasing a new netbook every week I must admit that I’m tempted to buy one. There’s few things that are very appealing:

  • Price, they’re very cheap so can be used as a second computer.
  • Very light and portable. My 15″ laptop is miles more powerful but you can’t just throw it in a bag and not notice, the new netbooks all weight around 1kg.
  • Great to play around with using Linux. The default systems run by may of these is somewhat limited but there’s a whole slew of sites started up showing you how to install your favourite Linux distro on these machines. Hours of fun for people like me!
  • Later machines have better keyboards and improved battery life so are comfortable to use on long trips and will last all day.

I’m looking at the Acer Aspire One right now but I’d rather wait until it’s available with the 6 cell battery as the 3 cells only gives 2.5 to 3 hours of battery life. It runs a Linux disro called Linpus Linux Lite which is a modified version of Fedora 8 but running XFCE as the desktop manager.

I tried one out in a shop over the weekend, it was the 512MB version with the 8GB SSD disk and running Linux. I thought it felt pretty snappy in use with very little lag when opening applications, of course opening a 100+ page pdf file took about 30 seconds but for everyday use it seemed good.

The Thunar file manager was very easy to use and files appeared instantly when browsing the drive. Even though by default it’s pretty locked down there’s plenty of sites explaining how to unlock the interface. Failing that I might just install a new distro, the only problem being that it will have to be from a usb drive since I don’t have an external DVD drive (and don’t intend to buy one).

Edit: there’s a really good review of the Aspire One here.

htaccess Subdomain Redirection

August 8th, 2008

My blog is set up as a subdomain to my main site so http://bobpeers.com/blog/ should really serve the content from http://blog.bobpeers.com.

Just recently I noticed that link pointing to my blog directories but accessed through the main site were not returning 404 pages for missing pages. For example a link pointing to http://bobpeers.com/blog/page-not-here would just serve the content from http://bobpeers.com. To force requests to the blog to be server by the subdomain i just added this line to my .htaccess file.

Redirect permanent /blog http://blog.bobpeers.com

Now any request for a page under the blog subdirectory will be permanently (http code 301) redirected to http://blob.bobpeers.com, so for example:

request http://bobpeers.com/blog/2008/08/page
serves http://blog.bobpeers.com/2008/08/page

Encryption Using Gnome Seahorse

August 6th, 2008

After my previous post about GNU Privacy Assistant and not having an easy encryption option built into Nautilus it seems that i didn’t look very far.

Today I researched a bit deeper and installed Gnome Seahorse. Essentially this does exactly what I was looking for.

  • It allows creation of new keys.
  • It recognised already created keys, my pgp key created using GPA yesterday was immediately available.
  • Encrytion, decryption and signing are all built into nautilus either through the file menu or the context sensitive menu when you right click on a file or folder.
  • It actually prompts me for my pgp key passphrase, unlike GPA!

Next I might look into encrypting whole partitions. I know this can be done during the install process using the Anaconda installer with Fedora but from the pages I’ve read it seems that to encrypt a partition after install is considerably harder, plus all the data on the partition is lost during the process so it’s not a simple procedure.

GNU Privacy Assistant

August 5th, 2008

I decided to give GPA a try just to see how easy it is to encrypt files on Linux. The program installed no problem using yum.

# yum install gpa

Upon starting I created a key (when the warning says this takes a while it’s no lie, it took about 5 minutes on my computer but I’ve since read that it’s a good idea to press some keys and move the mouse to generate random data faster) and then encrypted a test file, no problem there.

Next I tried to decrypt the same file but I just got a warning saying ‘Wrong Passphrase’, I understand the warning but the problem is that I never get prompted to enter the passphrase! Looks like I’ll have to learn the command line instead.

It’s also a shame that encryption is not better integrated into the file manager. In Windows it’s certainly very easy to encrypt files from Windows Explorer, even through the context menu, I’d really like to see the same in Gnome.

Fedora 9 No Sound on Flash Videos

August 2nd, 2008

After living with no sound on flash videos since I installed Fedora 9 ( I don’t watch many videos as you may have guessed :-) ) I decided to look for a fix tonight. It turned out to be much simpler than I imagined, I should have done it ages ago!

For reference I had all other system sounds but the controls on the playback page of the Pulse Audio Volume Control just flickered.

Just install libflashsupport as root and you’re good to go.

# yum install libflashsupport

Found on this page, http://clunixchit.blogspot.com/2007/11/firefox-no-sound-on-flash-videos.html.

Using OpenDNS Nameservers on Fedora 9

July 11th, 2008

I decided to switch to using nameservers from OpenDNS just to see if it made a difference compared to my ISP’s nameservers. You don’t need to sign up if you don’t want, you are free to just use their nameservers as you wish (which are 208.67.222.222 and 208.67.220.220).

The main problem is that I use Network Manager to control my network and if you try to edit the connection from Network Manager but still use dhcp then it will, by default, just get the nameservers from your ISP and ignore any other servers you manually add.

Fortunately the solution is very simple. As root open the file /etc/dhclient-eth0.conf (assuming your wired interface is eth0 of course) and add the line as shown.

# vi /etc/dhclient-eth0.conf
prepend domain-name-servers 208.67.222.222,208.67.220.220; #add this line
send host-name "your-hostname";  # temporary RHL ifup addition

Next just restart your network.

# /sbin/service network restart

At this point I could not see my wired connection in Network Manager (the entry was greyed out) so I manually started the interface.

# /sbin/ifup eth0

This brought eth0 up and from then on Network Manager worked fine with the new nameservers. It might just be psychological but browsing does seems slightly faster, just a little bit less delay with each page load. I’ll leave it set up like this for a while to see how it goes, it’s easy enough to switch back at any time but for now I’m very happy.