Monday 23 January 2012

Ubuntu on Joggler

Let me start by saying that I am not going to re-invent the wheel by telling you how to put Ubuntu onto the Joggler - this is already covered in fantastic detail here:  http://joggler.exotica.org.uk/ubuntu/ . This includes pre-built ISOs and full instructions on how to get it working.
This blog is more about some additional bits and pieces that I do on my setup following a rebuild (which happens with annoying regularity as I tend to be impatient with reboots and yank the power cable out - yes, I know I am an idiot).

One problem with the joggler running Ubuntu from a USB stick is that there is limited space for storage unless you have a USB stick with lots of space. A way to get round this is to mount a remote share on startup.

I use samba to do this - mainly because I share other files with Windows clients on the same network. I use another Ubuntu device as a server (A Power PC Mac Mini) and I have a folder called "Music" (creative eh?) which contains all of my music. If you do not already have it get system-config-samba (NB, this is on the server that contains the music, not the joggler).
#sudo apt-get install system-config-samba
This is a GUI application for configuring samba shares. To run it:
#sudo system-config-samba


Click on the "+" sign at the top left to create a new samba share and you will see the dialogue on the right. Browse to your Directory containing your Music. The "share name" is what appears when you browse for shares - it makes sense for it to be the same as the directory name. The description is optional and can be left blank. Tick the "writable" and "visible" boxes.
Click on the "access" tab. Here you can specify whether you want everyone to have access or just specific users. I create a specific user called "barney" (names have been changed to protect the innocent) just for the joggler and assign only that user permission.

Now we have our share created we just need the joggler to connect to the share on startup. If not already installed, on the joggler install smbfs:
#sudo apt-get install smbfs
Then we modify the fstab (file system table) on the joggler. 
Be very careful about changing anything else in this file or you can render your system unbootable. It is good practice to take a backup copy before changing anything.
#sudo nano /etc/fstab
Scroll to the end of the file and add the following on a single line.


//192.168.1.1/Music /home/joggler/Music smbfs  username=barney,password=rubbl3,uid=1000,mask=000

Let's break this down. This says connect to a share called Music on server 192.168.1.1 and mount that share to local folder /home/joggler/Music. The smbfs file system should be used to do this and the credentials barney and rubbl3 should be used to authenticate.
Save and exit from nano. You can test if this is correct now with the command:
#sudo mount -a 
All being well this command will return no output which means that the file has been processed without errors. Assuming that this is the case you should now see all your music files in the local directory /home/joggler/Music.


I also do this with Image files and mount a samba share containing all my photos. You can then use the built-in screensaver and use the joggler as a digital photo frame. 



By selecting "Pictures Folder" it will automatically point to  the Pictures in your home folder. So to mount this from a remote share called "Pictures" we would need the following in our fstab:

//192.168.1.1/Pictures /home/joggler/Pictures smbfs  username=barney,password=rubbl3,uid=1000,mask=000