Saturday 22 November 2008

kubuntu intrepid automount external harddrive

The new intrepid kubuntu comes with a nice plasmoid where mountable partitions show up wehen you plug in USB flash disks and external hard drives.
The problem is, they don't get mounted automatically, which is what I want (to streamline my backup process). Fortunitely I found this thread which gave me a hint:
http://kubuntuforums.net/forums/index.php?topic=3098289.0

I first tried to download and build devicenotifier_automount from sources, but then after downloading a ton of -dev packages etc. and still not getting it to build, it dawned on me to look for a PPA. I found one:
https://launchpad.net/~samrog131/+archive
I've installed it successfully but haven't restarted X & tested yet.
Edit: so it seems you don't need to restart X, just use the `New Device Notifier Automount` plasmoid. Works great so far (2 minutes of testing:)

bash echo on

I've searched previously for a way to echo all the commands in a bash script.
Today i found it on a asp page of all places:

set -o verbose #echo on
set +o verbose #echo off


If you want to do it once to debug a script you can also do:
bash -x your_script.sh

Thursday 20 November 2008

some words of the day

I regularly send out a word of the day/week/month, so I decided to also publish them on my blog from now on. So without some further ado, here is the some of all:

somebodies
somebody
someday
somehow
someone
someones
someplace
something
somethings
sometime
sometimes
someway
someways
somewhat
somewhats
somewhere
somewheres
and of course my favourite: somesuch!

There you have it: all the words starting with some except the ones starting with somer. Like me, I know you always wanted to know that.
This list was compiled using the linux command `look some`.
This post was inspired by my friend Sizwe Mabanga's saying: "Someway Somehow".

Tuesday 18 November 2008

gdebi

Have you ever downloaded a .deb file and wondered what the best way to install it is?
This little gem of an app, does the trick for me. It installs the file while resolving and installing all its dependencies!

gdebi is a simple tool to install deb files. It lets you install local deb packages resolving and installing its dependencies.

apt does the same, but only for remote (http, ftp)
located packages.

It has a graphical user interface but can be used in your terminal.

Wednesday 12 November 2008

kdirstat

I recently went over to Kubuntu 8.10 (Intrepid), and I'm trying to get used to dolphin now. But it doesnt have the super cool "file size view" which I used to love in konqueror.
The soloution is to install kdirstat, which pretty much has the same functionality.
(Found it on http://sathyasays.com/2008/03/19/find-out-how-much-space-each-file-is-occupying/)

http://kdirstat.sourceforge.net/

java.net.SocketException: Too many open files

We hit this again on sles today, so I thought I should leave a note here for posterity.
java.io.FileNotFoundException: /home/tcmas/tomcat/5.0.28/work/Catalina/localhost/balancer/SESSIONS.ser (Too many open files)

  1. It might be caused by the small amount of memory available! so increasing that, may fix it.
  2. It may also be the the number of open files limit on linux:
Increase file descriptor limit under Linux to prevent java.net.SocketException: Too many open files

Get current limit:

ulimit -n

cat /proc/sys/fs/file-nr

The default limit is 1024.

Get current number of open file descriptors:

lsof [-p pid] | wc -l

Increase the limit:

Edit /etc/security/limits.conf:

username hard nofile 32768

http://hausheer.osola.com/docs/11

Monday 10 November 2008

nls_lang.sh: 114: [[: not found (Oracle XE problem on ubuntu)

I installed Oracle Express edition on Kubuntu again, and I got a familiar error again after running:
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh: 114: [[: not found

the solution is to change (as root or sudo) the first line in the "nls_lang.sh" from
#! /bin/sh
to
#! /bin/bash

http://forums.oracle.com/forums/thread.jspa?messageID=2325040

Saturday 8 November 2008

Figured out how to save my kde4 session

just run:

dbus-send --dest=org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession

http://raetsel.wordpress.com/2008/04/25/kde4-save-current-session-dbus-to-the-rescue/

For some reason my HP laptop crashes from time to time, and then my session disappears :'(

Friday 7 November 2008

knetstats

I found this gem of an app a while ago, for monitoring the current network usage.
After installing intrepid, I had to look for it again, so here's the link
http://knetstats.sourceforge.net