Unix Revelations

Use the reference for a list of all terms discussed on Unix Revelations. And here a list of all Unix Revelations on a single page.

Search for keywords
Tagged:  •  

This article shows a workaround whenever you cannot connect to a Windows Terminal Server anymore with either rdesktop or KRDC (which uses rdesktop). KRDC is an RDP client, part of the KDE distribution. Running rdesktop directly from the command line results in the following error:

$ rdesktop rdp.example.net
disconnect: No valid license available.
Tagged:

Today I spent some time in getting scponly working. Actually my end goal was a chrooted sftp-only environment for users, so it took a while to get all binaries and libraries together. In an attempt to make life easier, I raised the scponly's debuglevel to 2, to see slightly more output than Connection closed when trying to log in.

Tagged:  •    •    •  

I have a MySQL instance on my PC, but by default it's turned off. However, when I leave my PC running overnight, the next morning I find this friendly email from a person called Cron:

/etc/cron.daily/logrotate:
error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
Job run-parts --report /etc/cron.daily terminated (exit status: 1) (mailing output)
Tagged:  •  

Every VMWare guest should have the VMWare tools installed. This improves the performance of the VM, especially when the VMWare host is under heavy load. Here are the instructions to install these in a Debian Lenny guest system:

Tagged:  •    •  

When you log slow queries or queries without indexes in MySQL, you should regularly rotate the file to save disk space. Quite some suggestions on the internet involve complex scripts which do this, other suggestions discuss FreeBSD's log rotator newsyslog. However, most of the descriptions about newsyslog appeared wrong to me, because no PID file was specified for the rule. This means that a SIGHUP is sent to the syslog daemon instead of the mysqld process, which is undesired.

Tagged:

tmux is a terminal multiplexer, just like screen(1). However, tmux is actively maintained and is in my opinion much better. Due to these developments, it could happen that something stops working or becomes broken from one version to another. The upgrade from version 1.2 to 1.3 caused that the commands down-pane and up-pane were no longer working.

Tagged:  •    •    •  

Technically speaking, this is not strictly a Unix Revelation. Still, to me it's useful enough to note this down.

We all know Java runs in a virtual machine, and assigns itself in 80% of the cases too little memory to do some real work. Result? Well, this:

java.lang.OutOfMemoryError: Java heap space

Sun gave us the -Xmx flag to increase the heap size (and -Xms to increase the stack size).

This works nicely from the commandline, the next challenge was to do something similar from an R environment. Using RWeka, which in turn depends on rJava, I found myself hitting the limit every time (which defaults to 512 MB).

Tagged:  •    •    •  

Again, this is primarily a note-to-self. My normal internet connection is not always that stable, so I have to fallback to alternatives when things are suboptimal (massive packet loss up to 100%).

Before, I could use my Sony Ericsson C902 for tethering. With Bluetooth and a lot of PPP magic I barely understand, I was able to call my phone's modem and access the internet.

Tagged:  •  

I keep forgetting this, so I'd better jot it down here once and for all. To add a Git remote repository, accessible through SSH with a different port than 22, execute:

git remote add office ssh://username@hostname:2222/home/bram/.repository

So this adds a remote repository behind port 2222 of the host, immediately followed by the remote path of the repository. The ssh:// part is crucial and forgetting this part has cost already some minutes of my life.

Tagged:

For KDE development, I work with a separate user. However, when you invoke su - kde-devel and run an X11 application, you'll get nasty errors like:

kfoo: cannot connect to X server :0.0

or

X11 initialization failed.

There are several solutions for this.

Syndicate content