Archive for Unix

Splunk

Just discovered Splunk from Ben Rockwood. Splunk is a cool looking web-based log analysis system, which uses Ajax. I’ve been meaning to do a search and find a good centralised syslog system with a web interface.  Seems like I don’t need to go any further.

Check out the tour for more details on how it works.

Technorati Tags: , , ,

Comments off

xargs and svn mv

Here is a xargs shell tip for moving several subversion controlled files.

find . -name \*.html  | xargs -n1 -I '{}'  svn mv  {}  ../archive/

Technorati Tags: ,

Comments off

ZFS

Sun’s released ZFS for OpenSolarias and it looks very cool. Couple of flash demos show how easy it is to manage and its selfhealing abilities.

It would be very interesting to see the possibilities of this combined with OpenSolarias acting as a dom0.

Comments off

v20z slow booting on Debian

My new v20z was taking an annoying amount of time to boot. Checking the console and a quick google I discover this hint.

The following works well:

title Xen 3.0 / XenLinux 2.6.12.5 / Unstable
kernel /xen-3.0-devel.gz dom0_mem=262144
module /vmlinuz-2.6.12-xen0 root=/dev/sda3 ro console=ttyS0,9600 console=tty0 hda=none hdb=none

The same thread had a link to this interesting site that produces boot charts.

Comments off

Samba and Auto-install Windows Printer setup

Point and Print in Samba is a nice short article about how to install print driver into samba, Windows clients pick this driver up correctly. I had to do some additional fiddling with force user and changing the readonly setting, so I could actually get the drivers installed, but it worked eventually.

Something I should have figured out many years ago.

Comments (1)

bind mount in fstab

A good place to look if you want to figure out how to convert a command line mount to a fstab mount is /etc/mtab.

For example:

Read the rest of this entry »

Comments (11)

Beagle review

Short review of Beagle. Of primary interest is the Firefox history indexing. Very interesting. When I get a moment, I’ll upgrade to breezy and get this installed.

Beagle can index a wide assortment of files including OO.org documents, MS Word documents, AbiWord documents, Music Files (meta data), Images (meta data), man pages, virtually any text file (including source files, Docbook, rtf and HTML), PDF, Gaim logs, Evolution mail and address books, the Tomboy note system, and several RSS aggregatiors. … A plug in for Firefox indexes web pages as they are viewed, creating a massive web history index (can prove very handy).

Comments off

NX, OSX and the ALT key

In OSX the ALT is mapped to Option. When running a X11 application like the !M NX client, things like ALT-TAB, or ALT-MENU wont work unless you add the following to dot-Xmodmap.

Basic method:

keycode 66 = Alt_L
clear Mod1
add Mod1 = Alt_L Alt_R

More complicated method:

! Make the Alt/Option key be Alt_L instead of Mode_switch
keycode 66 = Alt_L

! Make Meta_L be a Mod4 and get rid of Mod2
clear mod2
clear mod4
add mod4 = Meta_L

! Make Alt_L be a Mod1
clear mod1
add mod1 = Alt_L

In order to get this to load automatically, you need to to add something to dot-xinitrc or similar. I still haven’t comfirmed the exact details for this. The more complicate method link about also has a discussion about Customizing Fullscreen X11 on Mac OS X. There also some useful tips about keyboards and mice at these two sites. This guy is also running a similar setup with OSX and FreeNX. I think I probably need a larger screen, as well, to improve the combined Ubuntu-NX/OSX experience. 😉

Comments (3)

Building FreeNX (0.4) on Ubuntu Hoary

From a clean install of Ubuntu/Hoary, I used the following to build FreeNX from source. This also works with Debian/Sarge.

Add the following to your apt source.list and run an update:

deb http://debian.tu-bs.de/project/kanotix/unstable/ ./
deb-src http://debian.tu-bs.de/project/kanotix/unstable/ ./

Install the following build-depends packages:
sudo apt-get install cdbs autotools-dev patchutils autoconf bzip2 zlib1g-dev libpng12-dev libjpeg-dev xlibs-dev libfreetype6-dev libmikmod2-dev libssl-dev libxaw7-dev automake1.9

On Debian sarge you might need this as well:
sudo apt-get install build-essential

Pull the sources (~40Mb):
apt-get source nx freenx.

Build the debs:
cd nx-1.4.0.2; fakeroot dpkg-buildpackage -b; cd ..; sudo dpkg -i *.deb; cd freenx-0.4.0/; fakeroot dpkg-buildpackage -b; cd .. ; sudo dpkg -i freenx_0.4.0-0pre1_all.deb .

Bob’s your uncle.

I’ve got FreeNX working well in a Xen based instance of Hoary using the FreeNX defaults with the !M keys. I’m able to connect from the three !M NX clients I tried: Linux, Windows and OSX. Sound was working with the Windows client, it required the esound daemon. I found this a little chompy, and turned it off for now. I haven’t tried this with the Linux client yet. There are a couple notes here about LTSP and sound that I might investigate at a later stage. Session suspend works, although with OSX it seems you have to kill the X11 server, as the NX client itself refuse listen to the close button.

Its possible to use a similar process for nxclient at:
deb-src http://kanotix.com/files/debian/ ./

Comments (29)

Bash, looping over stdin

I usually forget when install samba for the first time in Debian it pulls the whole /etc/passwd db into the samba passwd TDB. ie:


[nic@base-field:~] sudo pdbedit -L
games:5:games
nobody:65534:nobody
proxy:13:proxy
www-data:33:www-data

Here’s a quick clean out bash scriptlet.


for VAR in `sudo pdbedit -L | cut -d: -f1`; do
sudo pdbedit -x $VAR;
done

Comments (1)