On my Ubuntu 14.04 virtual machine compiz freezes often. I usually swtich to tty1 and kill the process, then switch back to tty7 and, if I can see a terminal window, I run compiz --replace &
in it.
But there are times when I don't see any terminal window, and right clicking on the desktop doesn't give any menu so I can open one and I have to restart lightdm service. This is work blocking.
My question is: how can I run compiz --replace &
or any other command from a different tty on tty7?
I read this thread, but I don't know how to make tmux connect to a different tty on my machine, and the second one involves using the homebrew program. I also read this, but it involves having a daemon run on tt7 expecting for my commands. Isn't there any easier way to do this?
1 Answer 1
What matters is actually not what console you run the command from, but that you tell the program to connect to the still-existing X display. To do this, set the DISPLAY
variable and restart Compiz from a standard terminal. Depending on your distribution and configuration, you may need to set XAUTHORITY
as well. Switch to tty1 and type:
$ export DISPLAY=:0
$ compiz --replace &
The display may be different on your machine. Use who
to find yours:
$ who
you tty1 [time] < This is you from tty1.
you :0 [time] (:0) < This is you from tty7.
^^ ^^
This is your display on tty7
Note: you must be logged in as yourself on tty7 (graphically). Fortunately, when Compiz crashes, you are not disconnected from tty7 (even though you can't do much).
-
this doesn't seem to work or there is some other problem:
$compiz (core) - Info: Loading plugin: core compiz (core) - Info: starting plugin: core
than it hangs. All this in the tty1 terminalAlex Burdusel– Alex Burdusel2014年11月03日 14:25:26 +00:00Commented Nov 3, 2014 at 14:25 -
1@Burdu I wouldn't expect to see anything else in the terminal. The new instance of Compiz is now running. What is the effect on the GUI? Maybe you need to set
DBUS_SESSION_BUS_ADDRESS
as well.Gilles 'SO- stop being evil'– Gilles 'SO- stop being evil'2014年11月03日 23:02:27 +00:00Commented Nov 3, 2014 at 23:02 -
compiz does not get reloaded in tty7; nothing changes.Alex Burdusel– Alex Burdusel2014年11月04日 09:09:38 +00:00Commented Nov 4, 2014 at 9:09