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
Get the list of manually installed packages
aptitude search '?installed?not(?automatic)' | awk '{print $2}'
Valkyrie
How to invoke emacs from valkyrie? Set Src Editor in Options to:
/usr/bin/emacsclient -n -a emacs +%n
Pavel Píša’s 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
If there is a remote display manager supporting XDMP and you are not behind NAT, start X server from command line
X -query <host>
If you are behind NAT, you can tunnel X connection through ssh. From text console shell start:
xinit /usr/bin/ssh <host> startkde -- :1
This will start KDE remotely on second (:1) local display.
To automate the previous command using KDM you can put the following to your ~/.xsession
ssh <host> startkde
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.