Monday, 8 November 2010

Revisiting Rhythm

Following my post about repairing my Rhythmbox library, a friend of mine over at Delliberate suggested that a better way of achieving my goal was to mount my network drive as a permanent Windows share on my Ubuntu box.

I've struggled with this for over a week, trying to get Ubuntu and Samba to play nice with Netbios names (clearly, using the IP address to establish the mount defeats the object!) but eventually had to acknowledge that the problem was better than I! Nautilus connects to my network drive using the ip address without any difficulty, all that is required is to type the ip address of the drive followed by the share name into the location dialog box in Nautilus using:

smb://###.###.###.###/share_name

Where ###.###.###.### is the ip address for the drive and share_name is the name of the directory (or folder) that you want to reach. Instructions for creating a permanent mount point can be found at the Ubuntu Wiki (here) and, if you can't get Ubuntu to resolve Netbios names, you can substitute the ip address for the server name.

However, today I found a workaround that, whilst it doesn't completely solve the problem of Netbios resolution, does provide a partial solution. You can add the Netbios name to the /etc/hosts file and Nautilus will use this to resolve the ip address to the device name. Open the /etc/hosts/ file:

sudo gedit /etc/hosts

and input your password when prompted. Add the ip address and the Netbios name as follows:

###.###.###.### Netbios_Name

My file output looks like this:

127.0.0.1 localhost
127.0.1.1 jogga-desktop
192.168.1.10 MYBOOKWORLD
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


Line 3 is the one of interest! If I've understood how this works properly, Nautilus uses the etc/samba/smb.conf file to resolve Netbios names (in a specific order): the smb.conf file specifically lists the host as a reference source. Now I can use the Netbios name rather than the ip address which is more intuitive when searching and browsing in Nautilus. In my case, I type:

smb://MYBOOKWORLD/Share_Name

I also had to change the /etc/fstab file in order to make the permanent mount resolve the MYBOOKWORLD name as per the instructions at the Ubuntu Wiki (linked above).

Of course, if the ip address changes, the workaround stops working! However, it's a simple matter to amend the /etc/hosts file to reflect the new ip address and all bookmarks that use the Netbios name should be restored to rude health!

There are some tangible benefits of mounting a network share at boot, not least, pictures and video render in Nautilus (as opposed to icons), making file identification much easier, so it's been worth the pain.

Sunday, 7 November 2010

Wallpaper Fetish

By now you may have realized that I like playing around with the decorations on my Ubuntu box! However, if you take lots of photographs and want a quick and convenient way of setting one as your wallpaper, download and install nautilus-wallpaper from the repository (or use Synaptic)

sudo apt-get install nautilus-wallpaper

Enter your password at the prompt.

After rebooting your PC, you can right-click any picture in your directory and select the (new) Set as Wallpaper... option.

Monday, 1 November 2010

Redecorating

Changing wallpaper and themes is a great way of revitalizing the Ubuntu experience, but have you ever noticed how a fabulous looking picture can drown out text and icons on your panels and desktop? Sometimes, the effect is so bad as to render even the best pictures unusable as a wallpaper!

However, there is a simple way to adjust some of the colours and settings of these essential elements without having to write clever scripts (or copy them from the Internet ;)): install Gnome Colour Chooser from the Ubuntu Software Centre.
  1. From the Applications menu, select the Ubuntu Software Centre
  2. Type Gnome Colour Chooser into the search box
  3. Install the application
It's that easy!

Once installed, you'll find the application shortcut in the System → Preferences Menu and just click the icon to open the program.



One of the real benefits is being able to change the properties of the font (colour, size, and style), allowing you to use dark backgrounds without loosing sight of your menus, but there is a host of options to play with and you can have hours of fun designing (should that be, redesigning?) your theme.

Enjoy!

Sunday, 31 October 2010

Repairing Rythmbox

One of the problems that I experienced when I moved house recently was that my network drive's IP address changed when I plugged my Ubuntu box into the new router equipment. For most day-to-day access this was no problem, I simply repaired the shortcuts in the Nautilus file explorer and everything worked as it should.

However, Rythmbox, my default music player, could no longer read my music library (stored on my network drive) and it took me a little while to figure out how to point the player to the right place. Actually, it's rather a simple operation in Ubuntu, as most things tend to be!
  1. Navigate to /home/[username]/.local/share/rhythmbox
  2. Using your preferred text editor (mine is SciTE), open the */rhythmdb.xml file
  3. Use the text editor's Find/Replace All function to change the IP address or new location
  4. Save the file and reboot your PC
Reopening Rythmbox should rebuild your database and correct any errors when it reconnects with the library. However, as a precaution, I recommend making a copy of your */rhythmdb.xml file before making the adjustments described, just in case you corrupt the original file.

Saturday, 30 October 2010

More Karmic Candy

NASA Image of the Day and the National Geographic Picture of the Day are two of my favourite websites. As you can imagine, these two organizations produce some stunning photographs and many of them end up as temporary wallpapers on my Ubuntu desktop.

As with everything else in Linux, changing backgrounds is easy and, if you know where to look, customizing the behaviour of your wallpaper is convenient and flexible: simply install wallpaper-tray or drapes from the Synaptic Package Manager and add the applet to one of your desktop panels.



You can change the preferences to automatically change your desktop at regular intervals and dictate how the wallpaper renders simply by right-clicking the applet and selecting the Preferences option.



Enjoy!

Friday, 29 October 2010

Seeing is Believing

My wireless keyboard (a Logitech Dinovo) has no onboard indicator lights for the Caps & Number lock functions. This is no problem in Ubuntu, you can add a keyboard indicator applet to a panel.

If the applet doesn't appear in the Add to Panel menu, you can add it via the Synaptic Package Manager: search for Lock-Keys-Applet and check the installation box.



Simply right click on the panel where you want the applet to install and select the applet from the drop-down menu.



You can hide any of the three indicators (Caps, Num, or Scroll) by right-clicking the icon and selecting Preferences...

Tuesday, 28 September 2010

Terminal Access

I moved home recently and discovered that moving house isn't particularly conducive to leisure activity; particularly blogging about computing! However, it can serve to test one's understanding of how computers work or, more accurately, how they can stop working when you move them around.

When I moved, I took the opportunity to change my Internet Service Provider. I won't bore you with all the ways that ISPs in the UK can find to screw up their own processes, suffice to say that it took several weeks before I reconnected to my virtual world. When I finally did connect, I did so using my new ISP's router rather than my trusty (and aged!) 3COM device: I plugged everything in and, presto, out of the box, everything worked as it should and I had the fastest connection to the Internet I have ever enjoyed outside of a professional environment.

You'd think that I'd be happy, right? You'd think that would be enough after weeks of enforced isolation? You'd be wrong!

If you read my post on syncing wirelessly with Windows Mobile, you'll know that I have a couple of legacy devices that can't use the Wi-Fi WPA security protocol and, determined to get back to an integrated network where all my devices could talk to each other, I delved into the workings of my router and changed the security protocol to WEP. However, I must have inadvertently changed a setting that allocates IP addresses to the computers on the network and, once I'd saved the settings, could no longer get an IP address from the router! No IP address, no access!

In desperation I telephoned my ISP. The Technical Department could ping my router and could see it connected to their server, but couldn't manage to help me reset the device. Turning it off and using the reset button had no effect and, after several hours, decided to send me a new router. However, towards the end of the conversation, the helpful young man from India (with flawless English and the patience of Job) mentioned that Telnet might be the answer but, unfortunately, didn't know how it might be achieved. Actually, it turns out that, not only was Telnet the answer but also that it was a simple and (relatively) painless process.

Open a terminal and type

telnet 192.168.1.1

Or whatever your router's default IP address happens to be.

The terminal will prompt you for a password: this is the router's password, not your system password.



Hit Enter and you have access, although it may not be obvious!



Type sys at the prompt and you'll get a list of all the router's controls.



Just type default (or similar) and follow the instructions or prompts. This should reset your router to the factory settings. However, be warned, factory settings do not include your ISP's login details and you'll need your username and password from your ISP in order to reconnect your router.