Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently upgraded my hardware to a new laptop, and installed the latest kubuntu build on the new machine. Various advice here and elsewhere led me to hope that I could bring all of my KDE settings over to the new machine by copying my home directory and .kde dir over to the new machine. I've done that, but it comes up with a mostly blank garbled screen with blue gibberish along the bottom instead of the menu bar - basically unusable in the graphical interface. Presumably this is because the old graphics settings aren't compatable with the new hardware (the monitors are the same, but the new machine has a new graphics card.)

I can log in to a command-line tty at Ctrl-Alt-F1. I'm looking for how to reset the display settings without losing (or with losing as little as possible of) my other settings; I imagine wiping my entire .kde directory would get me back, but I'm hoping for something less drastic. Any suggestions?

share|improve this question
up vote 2 down vote accepted

On my system (Precise), KDE's display settings seem to be stored in the file ~/.kde/share/config/krandrrc. It contains a section

StartupCommands=xrandr --output LVDS1 --pos 0x400 --mode 1280x800 --refresh 60.0029\nxrandr --output DP1 --pos 1280x0 --mode 1920x1200 --refresh 59.9502\nxrandr --output LVDS1 --primary

that I assume tells KDE to apply those settings on startup.

Try renaming or deleting this file.

You could also try running sudo apt-get install lxde-core and then logging into an LXDE session. That will give you a graphical environment that you can run KDE's systemsettings from to make any changes you need.

share|improve this answer
Too bad, since I don't have krandrc on Kubuntu 14.04 LTS. – user2161065 Aug 12 '14 at 6:52

On Ubuntu 14.04:

1) Move away from X with ctrl+alt+f2

2) Login (as the user having this problem)

3) Type these:

cp -a ~/.kde/share/apps/kscreen ~/.kde/share/apps/kscreen.bak
rm -f ~/.kde/share/apps/kscreen/*
sudo reboot

First command is not mandatory.

share|improve this answer
Why not mv ~/.kde/share/apps/kscreen ~/.kde/share/apps/kscreen.bak && mkdir ~/.kde/share/apps/kscreen? – David Foerster Feb 5 '15 at 22:37

I had to remove .local/share/kscreen on plasma5

share|improve this answer
Consider suggesting an edit to the accepted answer. – muru Dec 13 '15 at 17:03

assuming you have started your machine with X running (but not visible on any screen), you can do the following:

  1. Go to the console with Ctrl+F1 and log in
  2. Set your display variable export DISPLAY=:0
  3. Execute xrandr and check output
  4. Try to reactivate one of the connected displays with xrandr --output LVDS-0 --auto (where LVDS-0 is my built-in laptop display).
  5. Log out and switch back to X with Ctrl+F7. Now you can reset your display configuration as usual.

Good luck!


  • If xrandr gives you `Can't open display', then either you forgot to export DISPLAY variable, or your X-Server is not up and running
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.