Recently in Unix Category

making remote X uber useful

| No TrackBacks
The problem with remote X is bandwidth. This means nice things like pixmap heavy themes and etc are a pain.

remoteXcheck=`echo $DISPLAY | cut -d: -f 1`

if [ -z "$remoteXcheck" ]; then

        fbpager&
        sonata --hidden&
        #pidgin &
        ekiga &
        autocutsel -fork
        zbgset -l
        skype&
       
        xcompmgr -d :0.0&
        xcompmgr -d :0.1&

        remote=""

        xhost +127.0.0.1

else

        remote=".remote"

        export GTK2_RC_FILES="~/.gtkrc-2.0-remote"

fi

fluxbox -rc ~/.fluxbox/init$remote

So for a local connection, it will start several apps, set the background and then run fluxbox using the default config, "~/.fluxbox/init". But for a remote connection, it will not run any apps, will not set the background, will tell GTK to use a alternate theme("~/.gtkrc-2.0-remote"), and tell fluxbox to load "~/.fluxbox/init.remote" for it's config.

| No TrackBacks
I am happy to announce, the world of managing POSIX users/groups stored in LDAP has gotten even easier.

Plugtools supports adding, modifying, and removing both POSIX users and groups. Best of all, it also supports a plugin system.

The most useful plugin I've written for it so far is Plugtools::Plugins::Samba, which allows Samba users to be created in LDAP as well as turning existing users in LDAP into Samba accounts as well.

Plugtools: http://search.cpan.org/dist/Plugtools/
Plugtools::Plugins::Samba: http://search.cpan.org/dist/Plugtools-Plugins-Samba/

Easy mounting from the command line.

| No TrackBacks
alias mudf if \( \! -e ~/mnt/\!\:1 \) mkdir ~/mnt/\!\:1 \; mount_udf /dev/\!\:1 ~/mnt/\!\:1
alias mfat if \( \! -e ~/mnt/\!\:1 \) mkdir ~/mnt/\!\:1 \; mount_msdosfs /dev/\!\:1 ~/mnt/\!\:1
alias mcd if \( \! -e ~/mnt/\!\:1 \) mkdir \!\:1 \; mount_cd9660 -r /dev/\!\:1 ~/mnt/\!\:1
alias um umount ~/mnt/\!\:1

The above TCSH aliases are useful for mounting disks under FreeBSD. Just create '~/mnt/' and dump the commands in '~/.cshrc' and it is good to do.

'mfat' and 'mcd' are mount various MSDOS and ISO-9660 filesystems. Nothing really fancy, but simply choosing a place to mount it. Most importantly it shortens the number of required keys pressed to mount something.

'mcd' changes to a mountpoint for a specified device.

'um' unmounts one of the mounted devices.