This page contains notes about things that are needed when e.g. reinstalling your computer's operating system, but are hard often to remember.

  • xbindkeys: Required to get mouse back/forward buttons working. Install xbindkeys and xvkbd, create a symlink of xbindkeys to ~/.kde/Autostart/ and use .xbindkeysrc:
    "/usr/bin/xvkbd -xsendevent -text "\[XF86Back]""
    "/usr/bin/xvkbd -xsendevent -text "\[XF86Forward]""
  • nVidia hotkeys: How to set up hotkeys to change display mode from single to dual screen and backwards.

    Edit xorg.conf and include metamodes according to your resolutions. Here DFP is the external display (TV via HDMI, and CRT is the normal monitor:
    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        Option         "TwinView" "1"
        Option         "TwinViewXineramaInfoOrder" "CRT-0"
        Option         "metamodes" "CRT: nvidia-auto-select +0+0, DFP: 1920x1080 +1680+0; CRT: nvidia-auto-select +0+0, DFP: NULL; CRT: 1280x1024 +0+0; CRT: 1024x768 +0+0; CRT: 800x600 +0+0; CRT: 640x480 +0+0"
        SubSection     "Display"
            Depth       24
    Install a program caller disper (download, make, makeinstall), and assign hotkeys to commands: disper -r auto -c (single screen) and disper -d CRT-0,DFP-1 -e (dual screen, extended)

    The following script can toggle compositing on/off. Dual screens, and especially toggling between dual/single tends to turn it off. Use this script to activate/disable/toggle compositing. It might be a good idea to assign toggle_compositing.sh 0 to dual screens and toggle_compositing.sh 1 to a single screen setup.
    # usage: toggle_compositing.sh [0|1]
    # 0 = off, 1 = on, no parameter = toggle
    RESULT=`qdbus org.kde.kwin /KWin org.kde.KWin.compositingActive`
    if [ "$1" = "1" -a "$RESULT" = "false" ]
      qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing
    elif [ "$1" = "0" -a "$RESULT" = "true" ]
      qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing
    elif [ "$1" = "" ] 
      qdbus org.kde.kwin /KWin org.kde.KWin.toggleCompositing
  • bash prompt: Shell prompts are wrong. This is the correct one:
    if [ "`id -u`" -eq 0 ]; then
        PS1='\[\033[01;31m\]\u\[\033[01;36m\]> \[\033[00;36m\]\h\w\[\e[00;$(($??31:36))m\]\$ \[\e[0m\]'
        PS1='\[\033[01;36m\]\u> \[\033[00;36m\]\h\w\[\e[00;$(($??31:36))m\]\$ \[\e[0m\]'
        PS2="\[\033[00;36m\]--\[\033[01;36m\]> \[\e[0m\]"
  • open stuff with spotify: Opening playlists etc. from the web can be done by assiging this to the used application
    wine "$HOME/.wine/drive_c/Program Files/Spotify/spotify.exe" /uri "$1"
last update: 21.4.2012
© Arttu Klemettilä