Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use KDE and have a couple settings there. But most of my settings are in scripts that use commands like xrandr, setxkbmap, xmodmap, xbindkeys and xinput. The problem is that the settings of those seem to be reset on suspend/wakeup, reboot and rotating the screen with xrandr.

So I'd like to make my settings work. Either by launching a config script every now and then, or by making those settings permanent.

This is what I do:

# Set keyboard layout and extra keys.
setxkbmap -layout us -variant altgr-intl -option compose:menu,ctrl:nocaps

# Set some more extra keys that the previous command did not get
xmodmap ~/.xmodmaprc

# Map extra mouse buttons

# Set sensitivity for my mice, but different for each.
xinput --set-ptr-feedback "$logitech" 4 14 10
xinput --set-ptr-feedback "$mighty" 3 30 10
xinput --set-ptr-feedback "$point" 2 35 10
xinput --set-ptr-feedback "$razer" 4 14 10

And then I use think-dock and think-rotate from the think-rotate suite to set my screens, that uses xsetbrightness, xrandr and xsetwacom again.

I have read that the problem with all those x-scripts is that they work on a deeper level and were created way before ACPI, suspend and hot-plug. Therefore, one should use the tools supplies in the graphical desktop environment or not use suspend nor hot-plug.

The great advantage of having scripts is that I can copy them to other machines, instead of having to click through all the KDE dialogues on another machine, or even find out how do to this in Gnome or Xfce (if even possible).

How can I get my configuration to be active the whole time?

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.