Archive for Tech

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)

NX, Skype and Asterisk

I was using Skype a lot when I was travelling during April and May. I found it very useful when I was in a random airport, being able to find a hotspot and call whoever. I’ve been thinking hard how I can integrate voip solution in my companies infrastructure for a long time. Unfortunately I haven’t had a chance, yet, to play around with Asterisk to understand it better.

One of the problems I’ve been thinking about is how to get thin client technology (NX/LTSP) to work with a headset arrangement if I put Skype on certain desktops. I haven’t yet move to NX, but its my next big project. Finaling moving from Win2K to Kubuntu.

I was googling at options today, and came to the realisation that my best option is not to put phones on the screen but on the desktop. Look at integrating my standard phone network into Asterisk. Then find some other ways to get some of the nice features of Skype, ie. SkypeIn.

Things like FWD and IAX will probably do the job.

I’d still like keep the option of Skype when I’m travelling. Its very useful tool. But say with kphone and openvpn or just something like FWD direct I can do the same thing.

Comments (2)

Debian, simscan and qmail

I was using gadoyanvirus with some local modifications, but I was finding it having dfifficultly with Worm.Mytob.DK and viruu zip attachments. Simscan was a quick and easy install and it seems to work perfectly. Here are some notes about installing simscan on Debian. Requires QMAIL-QUEUE patch installed, which is part of the most recent debian packages.

Read the rest of this entry »

Comments (1)

Openbsd: ‘interface groups and pf’

PF and Openbsd keep getting better: MARC: msg ‘interface groups and pf’.


block in on egress from (customer:network)…

….
there is an “egress” interface group now which follows the default routes. This interface group contains all interfaces which IPv4 and IPv6 default routes point to … So, imagine that on your notebook, where you are sometimes on wireless and sometimes on wired network connections – just write your pf.conf so that it refers to the egress group instead of wi0 and em0, and it will Just Work ๐Ÿ™‚

Comments (2)

svk sync smerge

Bsag has made some changes and released Tracks 1.03, so I figured it was a good time to try out the smerge process with svk. This article has a good description of thesvk workflow process this involves.

Unfortunately it is a difficult merge due to whitespace formating changes. So it hides any of the real code changes that might have occured. In fact after the merge I had to unrevert some of the changes I made in my local trunk. svk smerge doesn’t seem to be able to view conflicts on a line by line base.

I have svk sync running on crontab, so to mirror branch in the local svk repository is pretty much constantly up to date. Star merging these changes into the local svk development branch and then onto my svn and svk working copies is the next job.

Read the rest of this entry »

Comments (9)

svk and working with external project

I’ve been reading the svk documentation, which is somewhat lacking, working out the best way to setup an external development enviroment for tracks a Rails based GTD project I’ve been contributing too. I’m planning to port the Salted Hash Login Generator to Tracks. Currently I don’t have write access to the track subversion repository, so this lead me to try svk out.

I decided that I wanted a seperate subversion repository from the svk default depot for mirror tracks and tracking my changes. So I followed the basic setup for svk: svk depotmap –init. Then added ‘tracks’:/home/svn/tracks via svk depotmap.

Read the rest of this entry »

Comments off

rhtml, vim and rails

Grab and install eruby.vim into ~/.vim/syntax. Then following this tip add:


au BufNewFile,BufRead *.rhtml set syn=eruby

to ~/.vimrc.

While you are at that, make sure you check out HowtoUseVimWithRails.

Comments (5)

Corrupted Openoffice files

We’ve been using the latest OO2 beta (97, now 104) in the office. For some reason my brother’s installation was producing corrupted files that couldn’t be reopened. So I tried the simple approach to trying to fix it. Unzip, ran content.xml though firefox and found this error: “XML Parsing Error: duplicate attribute. Location: file:///home/nic/tmp/pp/content.xml Line Number 2, Column 10155:”.

A quick with hack with emacs and then a repack the document with the perl script from: Unpacking and Packing OpenOffice.org files.

It worked! My brother was soon back in business.

Microsoft Office and corrupted files usually means “Don’t pass go”. OASIS is a great file format.

Comments (3)