September 18, 2006

Ubuntu Environment variables

On Ubuntu, to set a global environment variable, edit /etc/environment and follow the form:

<Name>=<Value>
For the setting to be local to your login you can edit ~/.profile but you will need to use export <Name>=<Value>


I've used this for the JAVA_HOME, TOMCAT_HOME and ORACLE_HOME environment variables.

September 14, 2006

IP Renewal when moving between networks

On Ubuntu when I move my laptop from one subnet to another (desk to conference room for example) the dhcp ip doesn't reload. Previously I would disable the adapter then re-enable it but that took a bit of time. I found that you can use dhclient to do the trick from a shell:

sudo dhclient -r to release ip.

sudo dhclient -1 to renew ip. (that is a -one not the letter 'l').

September 13, 2006

Firefox Plugins

There are two Firefox plugins that I use (and keep installing after loading a new distro):

Google bookmarks plugin.This plugin allows me to share bookmarks to help articles and good links between builds and machines. There is also a google browser sync plugin but I am a little skeptical of how intrusive it is and more than just a little uncomfortable with my saved passwords being synchronized through google so I stick with the bookmarks.

Chris Pederick's web developer toolbar is awesome not only for figuring out how a page is put together, but also for controlling pesky pages with features like disabling meta refreshes and javascript.

Installing Oracle XE on Ubuntu

The easy way of adding Oracle XE on Ubuntu. There is now an apt-get repository up on oss.oracle.com for XE.

Just add:

deb http://oss.oracle.com/debian unstable main non-free

to /etc/apt/sources.list.
Get the certificate with:

wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -

Then open the Synaptic package manager by clicking the menu System > Administration > Synaptic Package Manager. (hint: in Ubuntu to do priviledged things you can use the command sudo from the commandline and enter you normal password when asked to. You can do this on window popups too. Ubuntu is configured so that you never know the root password you just sudo everything and your current password will work. If you want to be root at the command line just type sudo su).

Now in the package manager click the reload button (if you are behind a proxy be sure to set it in Settings > Preferences). Once it is done click search and look for oracle-xe-universal. click the box next to it and select Mark for Installation. When it is done you'll have a nice menu entry under Applications > Oracle Database 10g Express Edition.

I found this info in this post.

Once you have Oracle installed, you need to add your user to the dba group using System > Administration > Users and Groups

It looks like you are done from the installer, but there seems to be one other thing you need to do: sudo /etc/init.d/oracle-xe configure

Microsoft Intellimouse Explorer for Bluetooth on Ubuntu Dapper

Ok, I'm starting to tip back to Ubuntu from SuSE 10.1, though I might try 10 again soon. As the title suggests I have a Microsoft Intellimouse for Bluetooth. There is a little setup that one needs to do to get it to work, but really it is straight forward. Out of the box you can get it to connect and use the scroll wheel and normal buttons, but the forward and back nav buttons don't work. I don't think you can get the wheel tilt buttons to work. So here is my setup:

  • When the mouse goes to sleep after no activity it won't reconnect unless you do the following. Configure bluetooth by editing bluez-utils:

    • sudo vi /etc/default/bluez-utils
    • Change HIDD_ENABLED=0 to HIDD_ENABLED=1
    • Make sure HIDD_OPTIONS="--master --server"


  • Restart bluetooth with sudo /etc/init.d/bluetooth restart

  • Connect the mouse:

    • Push the connect button on the bottom of the mouse for 5 sec.

    • type sudo hidd --search



  • The mouse is now connected and should reconnect after a reboot automatically (give it a few seconds after moving it). Now to get the forward backward buttons working.

  • Edit the xorg.conf file:

    • sudo vi /etc/X11/xorg.conf

    • find the InputDevice section with Driver "mouse" and Option "CorePointer"

    • make sure Option "Protocol" "ExplorerPS/2" exists

    • make sure Option "ZAxisMapping" "4 5" exists

    • make sure Option "Buttons" "7" exists

    • make sure Option "Emulate3Buttons" "false" exists

    • save file with ESC : wq



  • Setup the buttons by creating the xmodemap file: sudo gedit /etc/X11/Xsession.d/57xmodmap

  • Enter xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7 10 11" then save and exit

  • restart (easiest way to really restart X)

  • on restart your bluetooth mouse should reconnect. Open firefox, then go to a new web page and test the forward and back buttons and the scroll wheel.



I got most of my info by plowing through this thread.

My Podcast URLs

In all my switching between Linux distros I find myself keep trying to reload podcast urls, So here is my list:

I haven't listened to many of the Linux News Log, Linux - powered by PodTech and Linux Questions yet but the rest are solid recomendations.

From PuTTY to OpenSSH

As part of my move to linux I need to be able to ssh through a proxy. On WinXP I used PuTTY. While PuTTY can be built on Linux, choose to start with ssh (I believe this is from openssh), but the proxy part wasn't clear. So I used corkscrew to use the proxy. I created a ~/.ssh/config file and added:

Host <destination>
ProxyCommand corkscrew <proxyname> <proxyport> %h %p

The one other thing I had to do is convert my Key from PuTTY's ppk format to openSSH format using PuTTY's Key Generator. I then used ssh-agent to handle the authentication, so my connect command looks like this:

>ssh-agent xterm

in the new terminal do:

>ssh-add openSSH_Key
>ssh user@hostname

That was it. Now to tackle multiple tunnels.

Dropped YAST going SMART

I've been trying to setup SuSE 10.1 on my laptop and finally got tired of trying to get YAST Software Update to work. I finally gave in and switched to SMART. Here are a few things I do to set it up:
  • Follow these directions to setup SMART
  • Note when installing SMART answer Y to all repositories (channels). The risky ones are marked inactive. If you don't say yes to them it is tough finding the repositories to add later.
  • Next before you do a major update (like update all) make sure you configure mirrors for ftp.suse.com, ftp.gwdg.de (Guru) and packman.inode.at (Packman)

Going with Linux

Finally I have the opportunity to run something other than Windows at work!
I would love to give OS X a try, but that would require new hardware (not likely). Instead I'm exploring several Linux distributions:
The system I am using is a IBM T42. This system has wireless, bluetooth and the normal laptop power features. I am using a Microsoft Intelimouse Explorer for Bluetooth mouse.

So far here are my opinions:
  • Ubuntu 6.06 LTS
    • Awsome distro! everything worked out of the box including wireless and bluetooth (though connecting the mouse does not have a graphical interface).
    • The LiveCD installer mames any existing installs so install it first or use the Alternative CD.
    • Doesn't have as much "corporate" support (at least my corporation).
    • My Bluetooth mouse works with a little setup (including scroll wheel and nav buttons).
    • I miss some of the KDE apps like Amorak.
  • SUSE 10.1 KDE
    • I like the colors and features of KDE
    • The start bar is to big, this is a laptop and screen realistate is limited.
    • Wireless doesn't work unless you remember to check the box that says "Use additional Software" at the beginning of the install and use the Add-ons CD.
    • My Bluetooth mouse goes into sleep after 12 min inactivity. When it gets woken back up, It isn't recognized (though I found a fix for SUSE Gnome that I haven't tried in KDE yet.)
    • Has a Windows domain option in YaST (though I haven't gotten it working yet.)
    • Problematic YaST package manager (there are fixes, but they are tricky to recover from if you mess-up). Many folks are using the SMART package manager instead. The one catch I found with SMART is that it fails to connect to the pgp key server through the system proxy and you can't tell SMART to tell GPM to use a proxy (at least that I have found).
  • SUSE 10.1 Gnome
    • Nice tidy startbar
    • Most of the other comments from KDE version apply here.
    • I finally got my Bluetooth mouse to recover from a sleep and reconnect after reboot (haven't tested the fix on KDE yet.)
    • Miss some of the KDE apps.
    • Most forum help is on KDE.
    • Scroll wheel on my mouse doesn't send any info back (using hcidump and cat /dev/input/mice).
I'm currently giving SUSE KDE another go now that I got my mouse to stay connected in Gnome. I haven't gotten Windows Domain integration working yet.

This is a good post on using the Yast package manager and some repositories to add to it.