I've just installed Mir and I'm wondering if I'm actually running it or if it fell back to X. How can I tell if Mir is running?
3 Answers
You can also simply check if the system compositor process is running:
ps afx | grep unity-system-compositor
On my system running Mir it returns something like this:
jorge@jillociraptor:~$ ps afx | grep unity-system-compositor
4260 pts/0 S+ 0:00 | | \_ grep --color=auto unity-system-compositor
1606 ? S 0:00 /usr/sbin/unity-system-compositor --from-dm-fd 9 --to-dm-fd 13 --vt 7
Machines NOT running Mir will not show unity-system-compositor
running.
Reference:
- Running Mir - Olli Reis
-
2You can also use
ps -e | grep unity-system-compositor
to avoid matchinggrep
itself. With this, no output will be shown if Mir is not running.– kiriJan 2, 2014 at 5:42 -
1@minerz029 Running Jorge's Command, I get 4868 pts/4 S+ 0:00 _ grep --color=auto unity-system-compositor Running your command, I get nothing. So I am confused.– AnonJul 26, 2014 at 23:23
ps -e | grep unity-system-co
Will return one response if Mir is running, nothing if it is not. This is because 'ps -e' actually truncates the process names to 15 characters (known upstream bug/limitation). I found the suggestion from minerz029 always returned nothing even if Mir was running.
-
Why would anyone use
ps | grep
when the commandpgrep
exists? Trypgrep -fa unity-system-compositor
.– muruSep 12, 2014 at 0:38
It's going to depend on what you mean by "I just installed Mir". Mir is really just a set of libraries. There are client libraries and server libraries. There are also several different packages that provide actual Mir server binaries.
There is a demo Mir server, but if you were running it you would know, because you'd have switched to a VT and typed in the command to run it. That server is found in the mir-demos package.
There's the Unity 8 Mir server. It runs as a part of Unity 8 (package unity8). You'd know you were running that because your desktop would look like a Unity 8 desktop.
Finally, there is the unity-system-compositor Mir server, which is generally started by LightDM. Unless you wrote your own LightDM integration scripts, you either need to install the Unity 8 desktop session (package unity8-desktop-session-mir), in which case the only way to run the Mir server is to log in to the Unity 8 desktop, or you installed the ubuntu-desktop-mir package, in which case the other answers are correct: a ps
will show the unity-system-compositor running underneath the X server.