Ubuntu Notes and How-Tos

Tuesday, June 21, 2005

Installing Tomcat 5.5.9

1. Download the jakarta binary
2. $ cd /opt
3. $ sudo tar xvfz jakarta-tomcat-5.5.9.tar.gz
4. $ sudo groupadd -g 1371 tomcat
5. $ sudo useradd -u 1371 -g tomcat -c "Tomcat" -d /usr/local/tomcat -s "/sbin/nologin" tomcat
6. $ sudo chown -R tomcat:tomcat /opt/jakarta-tomcat-5.5.9/
7. $ sudo ln -s /opt/jakarta-tomcat-5.5.9/ /usr/local/tomcat
8. $ echo "CATALINA_HOME=/usr/local/tomcat" >> ~/.bashrc
9. $ sudo /usr/local/tomcat/bin/startup.sh



Saturday, June 18, 2005

Freemind's ugly default Look & Feel

To get GTK's better look & feel, I launch freemind like this:


$ /usr/lib/j2re1.5-sun/bin/java -jar /usr/share/freemind/lib/freemind.jar

Installing eclipse

https://wiki.ubuntu.com/EclipseIDE?highlight=%28eclipse%29

Friday, June 17, 2005

Setting Groovy's environment variables

In .bashrc:


export GROOVY_HOME=/home/islandjoe/bin/groovy-1.0-beta-10
export PATH=$PATH:$GROOVY_HOME/bin
export JAVA_HOME=/usr/lib/j2sdk1.5-sun

Thursday, June 16, 2005

Installing Sun's Java Browser Plugin on Firefox (Hoary)

% sudo ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/


% sudo ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/


Restart the Browser and check if it worked by going to this http://www.java.com/en/download/help/testvm.xml

Boot-up Manager

A GUI manager for services:
http://www.marzocca.net/linux/bum.html

Starting/stopping services

$ sudo /etc/init.d/<service_name> [start|stop]

Tuesday, June 14, 2005

Change back to Thunderbird's original icons

wget -c http://frankandjacq.com/ubuntuguide/mozilla-thunderbird.xpm
chmod 644 mozilla-thunderbird.xpm
sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-thunderbird.xpm
sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-thunderbird-menu.xpm
sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-thunderbird-pm-menu.xpm
sudo dpkg-divert --rename /usr/lib/mozilla-thunderbird/chrome/icons/default/mozilla-thunderbird.xpm
sudo dpkg-divert --rename /usr/lib/mozilla-thunderbird/chrome/icons/default/messengerWindow16.xpm
sudo dpkg-divert --rename /usr/lib/mozilla-thunderbird/chrome/icons/default/messengerWindow.xpm
sudo dpkg-divert --rename /usr/lib/mozilla-thunderbird/chrome/icons/default/default.xpm
sudo cp mozilla-thunderbird.xpm /usr/share/pixmaps/mozilla-thunderbird.xpm
sudo cp mozilla-thunderbird.xpm /usr/share/pixmaps/mozilla-thunderbird-menu.xpm
sudo cp mozilla-thunderbird.xpm /usr/share/pixmaps/mozilla-thunderbird-pm-menu.xpm
sudo cp mozilla-thunderbird.xpm /usr/lib/mozilla-thunderbird/chrome/icons/default/mozilla-thunderbird.xpm
sudo cp mozilla-thunderbird.xpm /usr/lib/mozilla-thunderbird/chrome/icons/default/messengerWindow16.xpm
sudo cp mozilla-thunderbird.xpm /usr/lib/mozilla-thunderbird/chrome/icons/default/messengerWindow.xpm
sudo cp mozilla-thunderbird.xpm /usr/lib/mozilla-thunderbird/chrome/icons/default/default.xpm


*from ubuntuguide.org

Change back to Firefox's original icons

wget -c http://frankandjacq.com/ubuntuguide/mozilla-firefox.png
wget -c http://frankandjacq.com/ubuntuguide/document.png
chmod 644 mozilla-firefox.png
chmod 644 document.png
sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-firefox.png
sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-firefox.xpm
sudo dpkg-divert --rename /usr/lib/mozilla-firefox/icons/default.xpm
sudo dpkg-divert --rename /usr/lib/mozilla-firefox/icons/document.png
sudo dpkg-divert --rename /usr/lib/mozilla-firefox/chrome/icons/default/default.xpm
sudo cp mozilla-firefox.png /usr/share/pixmaps/mozilla-firefox.png
sudo cp mozilla-firefox.png /usr/share/pixmaps/mozilla-firefox.xpm
sudo cp mozilla-firefox.png /usr/lib/mozilla-firefox/icons/default.xpm
sudo cp document.png /usr/lib/mozilla-firefox/icons/document.png
sudo cp mozilla-firefox.png /usr/lib/mozilla-firefox/chrome/icons/default/default.xpm

*from ubuntuguide.org

Open files as root via right-click

$ vim ~/.gnome2/nautilus-scripts/Open\ as\ root

for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gnome-sudo "gnome-open $uri" &
done

$ chmod +x ~/.gnome2/nautilus-scripts/Open\ as\ root



*from ubuntuguide.org

Finally solved my Wacom Graphire3 tablet problem

For days I had to put up with the (wacom) mouse scroll wheel not working (well at least it was relegated to being the middle button and at least the pen was working). But it finally got to a point where it was affecting my Ubuntu "eXperience". Something has to be done. Needless to say, I combed the Ubuntu wikis, linuxwacom site, and GIMP sites but it didn't give me any results. I found out that there are people who have more problems than I do though. So I decided to just be content with my current setup and just bear with the fact that I can't use my scroll wheels to scroll down documents.

And so today as I was reading and following the Blender noobie tutorial (it's fantastic), the scroll wheel issue came up again. I told to myself that there has to be a way. So off I went again googling for leads. I decided to read the updated wacom man page from linuxwacom and something clicked inside me. I decided to test that hypothesis. So I fired up wacdump and 'cat /dev/input/{mice,mouse0,ts0}". And to make the long story short -- the /etc/X11/xorg.conf:

This was the cause of it all, it was always in contention with the wacom, so I struck them out:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection

And these lines are so important:

# WACOM GRAPHIRE
Section "InputDevice"
Driver "wacom"
Identifier "cursor"
Option "Device" "/dev/wacom0"
Option "Type" "cursor"
Option "Mode" "Relative" #THIS INDEED MAKES THE MOUSE ACT LIKE A REGULAR MOUSE :)
Option "USB" "on"
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "stylus"
Option "Device" "/dev/wacom0"
Option "Type" "stylus"
Option "USB" "on"
Option "Mode" "Absolute"
EndSection
Section "InputDevice"
Driver "wacom"
Identifier "eraser"
Option "Device" "/dev/wacom0"
Option "Type" "eraser"
Option "USB" "on"
Option "Mode" "Absolute"
EndSection

And then many lines down...

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Synaptics Touchpad"
InputDevice "Configured Mouse"*
InputDevice "cursor" "SendCoreEvents"
InputDevice "stylus" "AlwaysCore"
InputDevice "eraser" "AlwaysCore"
EndSection


*I forgot to take that line out at first and so when I rebooted, X wouldn't start.

I also got a pleasant surprise, my GIMP is now pressure-sensitive. It even got rid of that "input device" problem thingy. Now it runs like heaven.

Monday, June 13, 2005

xvidcap / gvidcap

deb http://www.jarre-de-the.net/computing/debian/ stable main

Saturday, June 11, 2005

Kill a process

$ fuser -k filegonewild
Or
$ ps | grep filegonewild and then kill'ing it one by one.
To know where a variable was defined

:ta name_of_var


If your cursor is on the variable, press Ctr-[

Sunday, June 05, 2005

Windows XP wipe out

I can't believe how easy the Ubuntu installation was. After burning the iso image on CD, I inserted the CD in my laptop and booted it up, answered some (installation) prompts and it installed without a hitch.