Wolfmans Howlings

A programmers Blog about Programming solutions and a few other issues

Switching to KUbuntu from Redhat 9

Posted by Jim Morris on Mon Jul 03 13:07:40 -0700 2006

OK it was time I upgraded my main development workstation from a highly modified Redhat 9 to something more up to date that actually gets security updates and has a good package manager.

I have been using Ubuntu for my servers for some time, and like the package management, but I am used to KDE now and don't really want to switch to Gnome on my workstation. So I decided to try to upgrade to KUbuntu.

Upgrading the actual Redhat 9 seemed a bad move, so I bought a new 400GB drive (the Seagate ST3400633A, as its quiet and Fry's had it in sale for $118). The plan was to do a fresh install of KUbuntu onto that then copy over the stuff I need. After about 2 years of installing stuff and upgrading the kernel manually on the Redhat 9, this was going to be quite a task.

First up Dual monitors.

Unlike Windows and Mac OSX this doesn't "just work". On my RH9 system, I had the proprietary ATI driver fglrx, running an old XFree86 Version 4.3.0 server, and was only able to get two KDE desktops side by side but completely separate, this was OK, but part of the upgrade I wanted to be able to drag windows across monitors just like on Windows and OSX. My Video card was an ATI with a DVI and VGA connector which can both be ised at the same time.

After Googling it turned out some people found this easy and some hard, I finally got it to work, by installing the fglrx using aptitude install, getting the aticonfig to set up dual monitors, then telling KDE I had dual monitors. Seems you need to do both, oh and you need to actually power cycle between the changes to xorg.conf. Initially if I did not do the KDE setup step I got two screens but the cursor and windows were stuck on the first screen and KDE would not let the cursor or windows into the second screen. What seems to have happened is the latter step added the option "Xinerama", even though everything I read said the fglrx drivers didn't need that option. (BTW it seemed to work on the standard Gnome version of Ubuntu without telling Gnome anything).

So following:

> sudo aticonfig --initial --dtop=horizontal

I ran the System/Setup selected the monitor panel and set it to dual screen. then rebooted.

Ending up with this xorg.conf...

Section "ServerLayout"
  Identifier "Default Layout"
  screen 0 "Primary Screen" 0 0
  screen 1 "screen1" rightof "Primary Screen"
  InputDevice "Mouse0" "CorePointer"
  InputDevice "Keyboard0" "CoreKeyboard"
  InputDevice "DevInputMice" "AlwaysCore"

Section "Files"

  # path to defoma fonts
  FontPath "/usr/share/X11/fonts/misc"
  FontPath "/usr/share/X11/fonts/cyrillic"
  FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
  FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
  FontPath "/usr/share/X11/fonts/Type1"
  FontPath "/usr/share/X11/fonts/100dpi"
  FontPath "/usr/share/X11/fonts/75dpi"
  FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"

Section "Module"
  Load "i2c"
  Load "bitmap"
  Load "ddc"
  Load "extmod"
  Load "freetype"
  Load "int10"
  Load "type1"
  Load "vbe"
  load "glx"
  load "dbe"
  load "v4l"

Section "InputDevice"
  Identifier "Keyboard0"
  Driver "kbd"
  option "XkbModel" "pc105"
  option "XkbLayout" "us"
  option "XkbRules" "xorg"

Section "InputDevice"
  Identifier "Mouse0"
  Driver "mouse"
  option "Device" "/dev/input/mice"
  option "Protocol" "IMPS/2"
  option "Emulate3Buttons" "no"
  option "ZAxisMapping" "4 5"

Section "InputDevice"
  Identifier "DevInputMice"
  Driver "mouse"
  option "Protocol" "IMPS/2"
  option "Device" "/dev/input/mice"
  option "ZAxisMapping" "4 5"
  option "Emulate3Buttons" "no"

Section "Monitor"
  identifier "primarymonitor"
  vendorname "NEC"
  modelname "NEC MultiSync LCD1860NX (Analog)"
  HorizSync 31.0-82.0
  VertRefresh 55.0-85.0
  modeline  "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
  gamma 1.0

Section "Device"
  identifier "Ati Radeon 9800 Pro 0"
  boardname "ati"
  busid "PCI:1:0:0"
  driver "fglrx"
  screen 0

Section "Screen"
  Identifier "Primary Screen"
  Device "Ati Radeon 9800 Pro 0"
  Monitor "primarymonitor"
  DefaultDepth 24
  SubSection "Display"
    depth 24
    modes "1280x1024@60"

Section "DRI"
  Mode 0666

Section "device" #
  identifier "device1"
  boardname "ati"
  busid "PCI:1:0:0"
  driver "fglrx"
  screen 1

Section "screen" #
  identifier "screen1"
  device "device1"
  defaultdepth 24
  monitor "monitor1"
  SubSection "Display"
    depth 24
    modes "1280x1024@60"

Section "monitor" #
  identifier "monitor1"
  vendorname "Plug 'n' Play"
  modelname "Plug 'n' Play"
  modeline  "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
  gamma 1.0

Section "ServerFlags"
  option "Xinerama" "true"

I had to hand edit the file to delete the duplicate monitor and screen definitions that were in there.

Installing Ruby, Gems and fxruby

I installed Ruby using the package manager, its just a matter of making sure you select everything you need. The biggest problem I had was getting fxruby working (1.4.6 version). I installed fox1.4 from the package manager then loaded the fxruby gem using gem install. However none of my ruby progs using fox14 would work, they reported they couldn't load fox14. After much installing and uninstalling, the result was I found a bug in the fxruby gem install, the Makefile calls make clean after building the fox14.so, and happily deletes it after building it.. Duh!! I need to report that to the fxruby maintainer, it burnt about 2 hours of my time. What I did to fix it was simply...

> cd /usr/lib/ruby/gems/1.8/gems/fxruby-1.4.6/ext/fox14
> make

Update, according to the maintainer this is a bug in the latest release of gems 0.9.0

(BTW I wish Debian/Ubuntu put ruby in /usr/local where it belongs!)

Thunderbird setup

I simply copied the .thunderbird directory over to my new home, and everything seemed to work ok, except clicking on links in my email no longer worked. I had to edit my ~/.thunderbird/XXXXXXXXXXXX.default/prefs.js file and add the following...

user_pref("network.protocol-handler.app.ftp", "/opt/firefox/firefox");
user_pref("network.protocol-handler.app.http", "/opt/firefox/firefox");

Where XXXXXXXXX will be different on your machine, and also the path to firefox.

Also I copied my ~/.mozilla folder and firefox got al my bookmarks etc from before.

Firefox setup

Clicking on mailto links didn't work, this was fixed by adding this line


to the user.js file (create a new one if it doesn't exist) that is found in ~/.mozilla/firefox/default.xxx

Of course the .xxx will be different on your system as will the path of thunderbird.

Keyboard Mapping

I like to map my caps lock key to the Win key, so I can use it to switch windows and desktops etc, I use a Unicomp Linux keboard, as it has a nice feel, with loud clicky keys, and the control key is where it is supposed to be, next to the A key, so it doesn't have a Win key, but the caps lock key is generally useless, so I use that.

It turns out that the Dapper version of KDE does not use the ~/.Xmodmap file as it is supposed to, so you need to manually run

> xmodmap ~/.Xmodmap

One way that has been suggested to automate this is to put that command in the ~/.kde/Autostart, so that is what I did, I called the file mapwinkey, set chmod +x, put xmodmap $HOME/.Xmodmap in it, and put the shell script in the Autostart directory.

More to come as I do it...

Migrating KDE settings

CPU/HW monitoring

Migrating applications

Posted in Linux  |  Tags linux,ubuntu,firefox,thunderbird,dualmonitor,xmodmap  |  no comments


(leave email »)