GarrettBartley.com

Ubuntu 6.10 Edgy Eft Experience

Despite the Linux rant the other day, I have still been persuing Ubuntu as my new desktop for general purpose use at home. So far, so good, I guess. LOTS of manual configuration, but nothing impossible for me to handle. I’ll try to outline everything I’ve accomplished thus far to get it to be a useful experience. None of this is in chronological order.

Gmail Notifier

Simple enough, right? Well, almost. I opened up Synaptic Package Manager (henceforth referred to as SPM) and installed the gmail-notify package. Worked great. I opened a terminal and ran gmail-notify and the little notification icon magically appeared next to the clock. Next, was to get it to work when X started. System -> Preferences -> Sessions. Click on the Startup Programs tab. Click Add and type “gmail-notify” in the Startup Command box. Click OK and you’re done! That wasn’t so bad.

Forward and Back Mouse Buttons

They didn’t work for me off the bat. And I’m not entirely sure the way I have it set up isn’t the right way to do it, but it works. Install xbindkeys and xvkbd. Edit ~/.xbindkeysrc and add this:

# Backward and Forward buttons
“xvkbd -text “\[Alt_L]\[Left]“”
m:0×10 + b:8
“xvkbd -text “\[Alt_L]\[Right]“”
m:0×10 + b:9

Save. Now, go to System -> Preferences -> Sessions. Startup Programs. Add “xbindkeys”. Restart (the whole system or X, your call). I think that should get it working. There may be another step that I forgot that tells xbindkeys where to look for the xbindkeysrc. Correct me if I’m wrong.

VNC

This was interesting to get working right, and I’m sure there’s a better way to do it, but this is what I came up with. Install x11vnc. Open a terminal. Run

x11vnc -storepasswd ~/.x11vncpasswd

And enter a password to use for VNC. Now, run

/usr/bin/x11vnc -forever -auth /var/lib/gdm/:0.Xauth –rfbauth /home/garrett/.x11vncpasswd

If you have another computer with a VNC client installed, I would recommend testing your setup from there. As far as I have known, VNC servers are notorious for crashing. To get around this little problem, I had to jump through some hoops to install daemontools. See the next section on that.

Once I got daemontools installed, I created a run script for x11vnc and everything magically started working. To do that, run

mkdir -p /var/lib/svscan/x11vnc

nano -w /var/lib/svscan/x11vnc/run

In nano, enter the following

#!/bin/sh
exec /usr/bin/x11vnc -forever -auth /var/lib/gdm/:0.Xauth –rfbauth /home/garrett/.x11vncpasswd

Be sure to replace “garrett” with your username or whatever your home directory is. Also, if you installed using the djb option, replace “/var/lib/svscan” above with “/service”. Finally, to get it running forever and ever regardless of crashes, run

chmod +x /var/lib/svscan/x11vnc/run

Daemontools should automagically start the script and you should never have to worry about it. Once again, be sure to replace the “/var/lib/svscan” with “/service” if you installed the djb way.

Daemontools

Installing daemontools wasn’t bad, but it wasn’t as easy as I had grown accustomed to with SPM. Instead, you may want to use a terminal for it.

sudo apt-get install daemontools

Now, just follow the instructions until it errors out while trying to do something with the inittab. When it asks what kind of setup you prefer (”fhs” or “djb”), I chose “fhs” to keep those extra directories out of the root. As of Edgy, inittab is replaced with upstart. Don’t worry, just because it isn’t automated doesn’t mean it’s hard. Once it errors out, run

nano -w /etc/event.d/svscan

And add these lines to it

# svscan - daemontools
#
# This service starts daemontools from the point the system is
# started until it is shut down again.

start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5

stop on shutdown

respawn /usr/bin/svscanboot

You’re almost done. Now, run

sudo start svscan

to start daemontools. Pretty easy!

Hamachi

With multiple computers behind a single IP, port-forwarding gets a bit hairy and annoying. Creating a private network (and running your own DNS) really helps. So, I installed Hamachi. Installation and setup are pretty simple. Download the tarball from the website and extract it. Now, open a terminal, change to the Hamachi directory and run

sudo make install

sudo tuncfg

Hamachi is now installed! To get it up and running, do the following:

hamachi-init

hamachi start

hamachi set-nick

hamachi login

hamachi join
hamachi go-online

After that, every time you start Hamachi, it should automagically connect to your networks. Now, to get it running on boot, do the following. Run

nano -w /etc/init.d/hamachi

And add the following to it

#!/bin/sh

hamachi_start() {
echo “Starting hamachi…”
/sbin/tuncfg
/usr/bin/hamachi -c /home/garrett/.hamachi start
}

hamachi_stop() {
echo “Stopping hamachi…”
killall tuncfg
/usr/bin/hamachi -c /home/garrett/.hamachi stop
}

hamachi_restart() {
hamachi_stop
sleep 1
hamachi_start
}

case “$1″ in
’start’)
hamachi_start
;;
’stop’)
hamachi_stop
;;
‘restart’)
hamachi_restart
;;
*)
hamachi_start
esac

In the hamachi_start and hamachi_stop sections, be sure to replace my home directory name with yours. Now run

/etc/init.d/hamachi restart

Just to make sure it works correctly. If so, run

sudo update-rc.d hamachi defaults

Now, Hamachi will start up when Ubuntu boots.

Mounting a Windows Share on Boot

This wasn’t too bad, either. Start off by creating a file to hold your login credentials.

nano -w ~/.sambapass

And in it, put

username =
password =

I know it sucks to put such information in a file in plain text. If a guest account has sufficient access to the Windows share, you can use

username = guest
password =

and leave the password blank. You may also want to secure the file by running

sudo chmod 644 ~/.sambapass

Next, edit your /etc/fstab

sudo nano -w /etc/fstab

And add the following line

//10.13.37.100/Downloads /home/garrett/Downloads smbfs credentials=/home/garrett/.sambapass,uid=garrett,gid=garrett,dmask=700,fmask=700 0 0

Where “//10.13.37.100/Downloads” is the name of your share, “/home/garrett/Downloads” is where you wish to mount the share, “credentials=/home/garrett/.sambapass” is where you sotred the file, and “uid=garrett,gid=garrett” are the names of your user and group.

Next, install smbfs.

sudo apt-get install smbfs

Save the file and run

sudo mount -a

And that should mount it.

Changing default applications for file extensions in X

Right-click on any file with the extension you want to change and go to Properties. Go to the Open With tab and select the program you wish to always open the file extension with or add a new one. Pretty simple but took a Google search to find it.

That’s about all I can think of for now. There will probably be more later.

One Response to Ubuntu 6.10 Edgy Eft Experience »»


Comments

  1. Comment by masta11 | 2007/08/28 at 01:55:05

    i tried the hamachi init script and got the following error when i ran:

    /etc/init.d/hamachi restart

    /etc/init.d/hamachi: line 28: unexpected EOF while looking for matching “’
    /etc/init.d/hamachi: line 34: syntax error: unexpected end of file

    all i did was cut & paste the above and change the username.
    any ideas? thanks.


Leave a Reply »»

Spam protection by WP Captcha-Free