71

I know about unity --reset command. But how can I simply restart Unity without resetting its profile?

Jorge Castro
  • 71,754
Yuriy Voziy
  • 1,105

5 Answers5

80

I don't use Unity but given what I know of its mechanics, this should work:

unity

You'll want to stick that in a run box (Alt+F2) rather than a terminal or it'll break when you exit the terminal.

If you want to run it from a terminal use:

setsid unity
Jjed
  • 13,874
Oli
  • 293,335
  • 2
    That's correct. Although, logging out and back in works better in my experience (I'm using Unity as my main desktop environment at this point) – jrg Mar 24 '11 at 14:15
  • 8
    A good way to do it in a terminal, in case you want to see debug messages, is setsid unity. You can close the terminal when ever you like, but you'll still get the terminal output made by Unity. – Stefano Palazzo Mar 24 '11 at 19:45
  • 1
    If you want to run that in terminal without breaking it when you exit terminal, type: 'unity --replace &' – Rafał Cieślak Apr 27 '11 at 17:41
  • 2
    Just using unity will work as it is the identical command. – Cas May 11 '11 at 16:20
  • using unity --replace have a tiny catch, you have to launch the menu once then only the left bar will auto-hide after restarted – d4v1dv00 May 25 '11 at 13:49
  • unity --replace has the most stupid description: "--replace Run unity /!\ This is for compatibility with other desktop interfaces and acts the same as running unity without". I don't understand why they haven't name the option --restart or --refresh, as this are self explanatory words. As --replace reminds me of something completely different. – bioShark Jan 25 '12 at 23:21
  • @bioShark as it says, it's in line with other window decorators and compositors which do replace what's currently running. Eg metacity --replace displaces/replaces compiz just as compiz --replace displaces/replaces metacity as the compositor. – Oli Jan 25 '12 at 23:58
  • Ok, got the idea behind it. I am just not that used to this way of approaching statements. For me actually refresh would have made more sense :). – bioShark Jan 26 '12 at 00:03
  • Brought the house down for me. -1 – Kazark Jun 02 '12 at 20:19
  • To logout quickly, you can use shortcut key Alt+Printscreen+K or command kill -9 -1. – Ade Malsasa Akbar Jul 18 '14 at 14:52
7

I found killall -u USR1 -r -g unity* (optionally, with -i for interactive) to be more effective than @Andrew's answer. My only problem with this vs unity --replace is that it will kill your session which unity --replace doesn't do. So, reserve this for when it is severely broken.

1angdon
  • 111
  • 1
  • 4
5

killall -USR1 unity will restart it in an account (USR1) where you have not changed your killall defaults.

1

Another alternative that works is

pkill --signal USR1 unity
freethinker
  • 1,170
0
unity

which starts a new GUI connected to your terminal. however, if you run this over SSH, ehm, this is probably not the best IDE, because your local desktop 'unity' instance is then bound to this terminal on your remote-desctop...

funny things occur, when you terminate this session. Step by step your GUI will vanish and the only thing which remains under your control is the pointer of your mouse.

I found this post really helpful, which sumarises the commands mentioned in other answers.

Cutton Eye
  • 1,211