Linux Tips & Tricks

Rename files in the current directory to short unique names

ls|rename '$_ = $Main::number++'

GNOME

If you create a custom keyboard shortcut (System->Preferences->Keyboard Shortcuts) for executing a command, the working directory of the command is set to /. If you do not like it, as I do with starting my Emacs, you can use the following command to change the directory:

/bin/sh -c "cd $HOME; /usr/bin/emacsclient -c -a ''"

Debian

Valkyrie

Pavel Píša’s BDM driver

BDM driver

How to set access permissions

Create file /etc/udev/rules.d/m683xx-bdm with the following contents:

ACTION=="add", SUBSYSTEM=="m683xx-bdm", OWNER="sojka"
DEVPATH=="/class/m683xx-bdm/icd0", SYMLINK="bdm"

Replace “sojka” at the first line with your login name or use something like GROUP=“users” or MODE=“0666”. The second line accomplishes the creation of symlink /dev/bdm for your default device.

X11

Login to remote server with local X terminal

This will start KDE remotely on second (:1) local display.

By selecting custom in the list of available X sessionsin in KDM, this file will be automatically executed on login. If you have you ssh keys protected by a password and ssh-askpass installed, you will be automatically asked for the password to the key.

Various Scripts

Tags: