Wednesday, 8 July 2009

Logitech G9 on Ubuntu 9.04 Jaunty

Logitech G9 on Ubuntu 9.04 Jaunty


Info taken from : http://ubuntuforums.org/showthread.php?t=1092352

Firstly we need to install a couple of extra programs so open up a terminal and copy/paste the following line:

sudo apt-get install xvkbd xbindkeys
Next up we need to make a ~/.xbindkeysrc and put the next few lines into it:
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[left]""
b:6
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[right]""
b:7
"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Control_L]\[Page_Up]""
m:0x0 + b:11
"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Control_L]\[Page_Down]""
m:0x0 + b:12
Then make another file called ~/.Xmodmap which contains the single line:

pointer = 1 2 3 4 5 8 9 6 7
Then give it a quick test by starting xbindkeys up in a terminal, the buttons should all work correctly. It could be tested in nautilus by seeing if the back button will move back a folder.

Control+Alt+Backspace shortcut does not restart the X server

Control+Alt+Backspace shortcut does not restart the X server

Edit: I believe this was removed because the kernal already contained another combo that does the same job, Alt+SysReq+k will terminate and restart X if it should become unresponsive.

If you would prefer the old key combination then issue the following two commands in a terminal. I would advise against this though, but as always, the choice is entirely yours.

sudo apt-get install dontzap
then do:
sudo dontzap –disable



Monday, 22 June 2009

Install Samba Server on Ubuntu

Install Samba Server on Ubuntu


If you want to share files between your Ubuntu and Windows computers, your best option is to use Samba file sharing.


To install, first open a terminal window and enter the following command:


sudo apt-get install samba smbfs


We’ve got samba installed, but now we’ll need to configure it to make it accessible. Run the following command to open the configuration file, substituting your editor of choice:


sudo gedit /etc/samba/smb.conf


Find this section in the file:


####### Authentication #######

# “security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
; security = user


Uncomment the security line, and add another line to make it look like this:


security = user
username map = /etc/samba/smbusers


This will set Samba to use the smbusers file for looking up the user list.

Create a Samba User

There are two steps to creating a user. First we’ll add that username to the smbusers file.

sudo gedit /etc/samba/smbusers


Add in the following line, substituting the username with the one you want to give access to. The format is ubuntu-usuername = “username”. You can use a different samba user name to map to an ubuntu account, but that’s not really necessary right now.

joe = “joe”


Next, we’ll run the smbpasswd utility to create a samba password for the user.


sudo smbpasswd -a


Now you can create samba shares by right clicking in Nautilus and defining the share in properties/sharing.


Tuesday, 16 June 2009

How to install Filezilla3

Very simple, download Filezilla from http://filezilla-project.org/download.php?type=client

Then run these commands in a terminal where you downloaded the file to:

sudo tar jxvf FileZilla_3.2.5_i586-linux-gnu.tar.bz2 -C /opt/
sudo chown -R root:root /opt/FileZilla3/
sudo chmod -R 755 /opt/FileZilla3/

You may need to edit the first line to correct for version/name changes to the file you have downloaded, FileZilla works a treat ;)

Create a menu item next:

sudo gedit /usr/share/applications/filezilla.desktop

And add the following lines:

[Desktop Entry]
Encoding=UTF-8
Name=FileZilla
Comment=FTP Client
Exec=/opt/FileZilla3/bin/filezilla
Icon=/opt/FileZilla3/share/pixmaps/filezilla.png
Terminal=false
Type=Application
Categories=Application;Network;
StartupNotify=true

FileZilla can then be started from Applications → Internet → FileZilla.

Monday, 15 June 2009


How to read 20 magazines for free.


You will need Firefox and an addon called User agent Switcher and configure it with an iPhone setting :

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A102 Safari/419 (United States)

You can then visit http://zinio.com/iphone/ and read 20 magazines each month for free.

It gets better though, it is very simple to download these pages onto your computer using Linux, aren't you glad you dumped windows ;)

We now need the URL to the image so "copy image location" from the right click menu then using this command:

curl -O -A "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3" INSERTURL

Replace INSERTURL with the copied link you got to page 1, then delete back to the underscore and append [1-300].jpg this is a range option to grab pages 1 to 300 and can be adjusted, so the final command will look like this:

curl -O -A "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3" http://imgs.zinio.com/iphone/issues/416078746/[1-300].jpg

The files will need to be renamed, as sadly they won't sort correctly if you are going to do the next step of combining them into a single pdf. We need the jpgs numbering from 001.jpg so they order correctly. this can be achieved in a variety of ways, using Thunar rename to insert the necessary 0's in two stages is one simple way, insert 00 at position 10 for number 1-9, and insert 0 into postion 10 for pages 10-99. it can also be scripted in a couple of steps with :

for i in `seq 1 9`; do mv *_$i.jpg 00$i.jpg ;done

for i in `seq 10 99`; do mv *_$i.jpg 0$i.jpg ;done

This could of course be scripted into one single command using a bash script.

Then we can simply issue the command:

convert *.jpg magazine.pdf

Thats it, you now have a local copy of the magazine in a handy PDF format relatively simply, it lokos more complex than it really is once you get your head around it.

Thursday, 11 June 2009

Acer Aspire One update broke Wifi


Just updated my Acer Aspire One (Intreprid 8.10) and the wifi broke. A quick poke around and installed:

linux-backports-modules-generic

After a reboot the wifi sprang back into life.

Friday, 29 May 2009

Is your Nautilus slow to open directories?

Fix Naultilus slow loading some directories.

If nautilus is taking an age to load some directories on your computer then you may have Assistive Technologies enabled.

Simply go to the System menu on your desktop and then in Preferences. Click on Assistive Technologies.
Untick the box marked "Enable Assistive Technologies" and choose "Close and Log Out" at the bottom of the window.

When you log back in Nautilus should be opening directories instantly again. Apparently this became an issue in 8.10 when Assistive technologies was enabled by default, I only spent aoround 8 months suffering with this before getting off my backside and finding a fix, it is disappointing that there has not been a direct update to sort this out, there must be a lot of people stuck with this problem.

Wednesday, 11 February 2009

Disable IPV6 on Ubuntu 8.10

Disable IPV6 on Ubuntu.

Some people feel loading IPV6 can improve the network performance and if your ISP doesn't support IPV6 yet (which most do not) then it will do no harm to disable it.

sudo nano /etc/modprobe.d/blacklistappend the following line:blacklist ipv6

Save the file and restart your machine!
You can verify that ipv6 is actually disabled using the following command:

ip a | grep inet6


If you see no ouput then IPV6 is now disabled.

Tuesday, 10 February 2009

XFCE4 Automatic desktop wallpaper changer.


I recently started using XFCE on my Aspire One. I've always liked XFCE and alternated it with Gnome just for variety. Anyway using XFCE full time made me wish for a method to change the wallpaper every X number of minutes so after some hunting and poking this was the solution for automatic wallpaper changing.

First step is to define a list of wallpapers to use in the normal Desktop settings configuration, I'm notgoing to explain in detail how to do it, its fairly straight forward so go explore.

With that configured then XFCE will load a random wallpaper on each login, very nice but not quite what we want is it.

Well it turns out the solution is simply to reload the desktop on a timed interval. Cron takes care of the timed interval part, and the comand to call is:

export DISPLAY=:0; /usr/bin/xfdesktop -reload

You can try it in a terminal before putting it into a cron job. In case you aren[t familiar with cron it is just a case of doing:

crontab -e

If it is the first time you called it then it may ask you what editor to use, just use nano if available as its the easiest to use imho.

Enter this line into the editor:

0,15,30,45 * * * * export DISPLAY=:0; /usr/bin/xfdesktop -reload



Thank you to Ninjanoh who suggested in the comments that this will work in 11.10 by changing -reload into --reload




Ctrl + o to save the file, then Ctrl + x to exit nano.

The wallpaper should now change on the hour and at 15 minutes, 30 minutes and 45 minutes past the hour.

Wednesday, 8 October 2008

Update to the latest Compiz Fusion On Ubuntu Hardy

You will need to add a new repository that contains recent Compiz packages. Open System->Administration->Software Sources. Select the Third-Party Software tab and click Add. Paste in the line below and click Add Source.

deb http://ppa.launchpad.net/compiz/ubuntu hardy main

Close Software Sources and when prompted, choose to reload the repositories.

A number of software updates related to Compiz should become available now; install them using Update Manager. Log out and back in to Ubuntu or restart Compiz manually. You should now be up-to-date.

A nice new window shifter is available for the new Compiz called StackSwitch, just install it from the repo and disable the normal Shift Switcher. It would be nice if the author will add selecting the windows by the mouse much like Expo or some other window plugins.