Skip to navigation

Archive for the 'Linux' Category

Running X apps (like zenity) from crontab (solving “cannot open display” problem)

Friday, January 2nd, 2009

I’ve written a small script that checks whether I have queued mail and that displays a notification icon via “zenity –notification” in case I do. I wanted to run it using ~/.crontab but it wouldn’t run. First, I got error messages from the cron daemon that looked like this:
(zenity:22981): Gtk-WARNING **: cannot open display:
Sure, I […]

Ubuntu/ Linux: How to permanently turn off the annoying system bell (beep)

Thursday, December 4th, 2008

You know what I mean … that loud loud beep that almost knocks you out whenever you type a non-available keyboard shortcut in Emacs.
For immediate relief (this will not persist through a reboot):
sudo modprobe -r pcspkr
For permanent relief, edit the file /etc/modprobe.d/blacklist and add the line:
blacklist pcspkr

“trash-cli” lets you move files to the trash from the command line (and shell scripts)

Friday, November 28th, 2008

I know hardcore Linuxers use rm for everything and think the trash on a computer is for babies who also like such poo-poo things like the mouse and GUIs. However, I’ve just deleted one too many files using rm from a shell script, especially since I like doing rm -rf on directories … confirming every […]

How to add a custom welcome message to your Xubuntu or Ubuntu login screen

Friday, November 28th, 2008

I like the graphical login screen on my laptop to display my e-mail address. In case I lose the laptop and an honest person finds it, they should at least have the possibility to return it.
In the latest versions of Ubuntu or Xubuntu, you can change the welcome message via the settings menu for “Login […]

Binding a key to the middle mouse button with xmodmap and xkbset

Tuesday, June 3rd, 2008

Great, I just found this here. This is how you can bind a key to the middle mouse button (I use the middle mouse button a lot to (a) paste stuff from the clipboard, (b) open links in background tabs in Firefox). I used the pause/break key, so it’s slightly modified. I first had to […]