Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 had some problems before doing this where xfce won't start (applications started, but no borders and couldn't type anything on the keyboard) and someone told me to use this command sudo rm -rf /usr/share/xsessions

Now not even Xorg will start. I can do Ctrl + Alt + F1 and use tty-1 and I tried apt-get install --reinstall xfce4 but the same problem.

What do you recommend me to do?

share|improve this question
up vote 5 down vote accepted

I'm not sure I believe that in 2013 people still run commands with rm -rf they find on the internet without trying to work out what they're doing... Perhaps Ubuntu should pop up a big warning the first time a user runs rm...

But anyhow... The session file lives in the xfce4-session package. Reinstall that and you should be golden.

sudo apt-get --reinstall xfce4-session

And here are a few others:

  • For the standard Ubuntu desktop, reinstall gnome-session
  • For KDE you would want kde-workspace-data.
  • For Gnome-shell reinstall gnome-shell.
  • For AwesomeWM, reinstall awesome.

There are others but I don't know their xsession names to look them up by.

share|improve this answer
I did a --reinstall xfce4, isn't that the same? – Pacha Feb 20 '13 at 2:28
Not at all. xfce4 is a meta-package that depends on a whole raft of other packages. When you --reinstall a meta-package you tend not to actually reinstall anything. I've checked the archive and xfce4-session is where this file actually comes from. Reinstalling it will regenerate it. – Oli Feb 20 '13 at 2:31
Thanks, I will try that – Pacha Feb 20 '13 at 2:32

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.