3

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?

asked Nov 3, 2014 at 13:03

1 Answer 1

4

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).

Gilles 'SO- stop being evil'
865k204 gold badges1.8k silver badges2.3k bronze badges
answered Nov 3, 2014 at 13:09
3
  • 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 terminal Commented 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. Commented Nov 3, 2014 at 23:02
  • compiz does not get reloaded in tty7; nothing changes. Commented Nov 4, 2014 at 9:09

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.