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 am new to xubuntu, somtimes my xfce desktop crashes, and I can only use tty1 from command line.

I want to know how can I restart my xfce in tty7 from tty1?

I've googled it, but didn't found the solution. Tnanks.

share|improve this question
up vote 4 down vote accepted

Try killing user by

pkill -KILL -u yourusername

This will bring you back to login screen though.

share|improve this answer
Sometimes lose current windows is not a choice :X, u can do same restarting ldm service ( or the login manager you have ). Killing every process of a user it's the last option, because you may be working on tty1 and you will kill it too. Login manager (wich is x based) would not close other sessions. – erm3nda Oct 23 '15 at 4:20

You can try startxfce4.

As this site says:

Restart XFCE4 : from the command line, you would better use "startxfce4" to bypass stupid distribution X startup scripts that can drive you crazy, really.

share|improve this answer
That's the start XFCE4, not to to restart it. When I ran startxfce4 I got these messages: /usr/bin/startxfce4: X server already running on display :0.0 xfce4-session: Another session manager is already running – Enkouyami Jul 4 '15 at 21:43

For me startxfce4 didn't work, but pkill did.

You could try the following command:

xfwm4 --replace

It restarts the windows manager.

share|improve this answer
Yeah. This is, first try to reload window manager, if don't work try restarting login service, and in the worst of cases, kill your user then start again your work :) – erm3nda Oct 23 '15 at 4:20

pkill worked but seemed a little extreme to me. If I had other stuff going on in other tty sessions it would kill those too.

Another solution is:

sudo restart lightdm

A great strength of Linux is that there are always multiple ways to achieve the same task.

share|improve this answer
--replace does try to save things :) – erm3nda Oct 23 '15 at 4:20

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.