9

I've installed some new drivers and restarted, and much to my amusement when I log in my screen goes black, then white, and it never draws properly. I switched to the command line using Ctrl + Alt + F1 but I'm not sure how to disable compiz and enable metacity as the default window manager. Using metacity --replace doesn't work since the command line appears to be a separate login instance altogether... Any tips?

EDIT:

I've done this for now:

http://www.ubuntugeek.com/how-to-install-classic-gnome-desktop-in-ubuntu-12-04-precise.html

ish
  • 138,666
  • 36
  • 303
  • 312
Aram Kocharyan
  • 3,680
  • 2
  • 15
  • 8

1 Answers1

8

Running metacity --replace from a virtual console doesn't work because it doesn't know which X11 display to attach to. The default behavior is to attach to the display it runs in...and a shell running in a virtual console isn't on any X11 display.

Instead, you must manually specify the display. It will be :0 unless you've configured your X11 display differently. (Even if you have multiple monitors, it will still be :0 unless you've changed your X11 configuration.)

To do that, use this command:

metacity --display=:0 --replace

If that does't work, then try manually killing the compiz process first. To do that:

  1. Run killall compiz. Wait a few seconds. Perhaps compiz will respond to this signal and terminate.

  2. Run killall -KILL compiz. This almost always ensures that compiz will be immediately terminated.

Step 1 is optional, but can help processes free some resources and finish up some kinds of important actions (like writing buffered data to files).

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
  • Thanks, that :0 seems promising. I managed to switch to classic gnome and update the driver to a second option in the list, seems to work. – Aram Kocharyan Jun 21 '12 at 13:03
  • 1
    @izx That is not correct. SIGHUP is what a process receives when the controlling terminal dies. Many processes completely ignore SIGHUP, or do interesting things to accommodate the lack of a terminal. Most treat it like SIGTERM. Most *do not* restart. For example, try running a `nano` instance and, in a separate terminal, running `killall -HUP nano`. `nano` will terminate, and it will not restart. As [Wikipedia mentions](http://en.wikipedia.org/wiki/SIGHUP), background services *sometimes* restart from SIGHUP. This is not canonical or standardized and it doesn't work with most processes. – Eliah Kagan Jun 21 '12 at 13:08
  • Also, in this situation, we *do not want* `compiz` to restart, because we're replacing it with `metacity`. – Eliah Kagan Jun 21 '12 at 13:09
  • 1
    You're right -- I seem to have subconsciously mixed compiz up with a daemon; Compiz happily ignored SIGHUP with "I'm too young to remember what a serial line is..." :) – ish Jun 21 '12 at 13:15
  • It worked for me with just `metacity --replace`. Is that a bad thing? – enchance Aug 06 '14 at 15:17
  • @enchance No, that's not bad at all. At worst it means my answer is wrong or incomplete. :) Did you run `metacity --replace` from a text-based [virtual console](https://en.wikipedia.org/wiki/Virtual_console)? That's what I'm saying in this answer will not work. If you ran it from a terminal window that is part of the GUI, it will (often) work fine. – Eliah Kagan Aug 06 '14 at 20:49
  • @EliahKagan I ran it in Run Application (Alt + F2). Works just fine. – enchance Aug 17 '14 at 16:21