I'm using Ubuntu 15.10 and i want to know which display server is running. In first version of Ubuntu it is definitely X server, but recently i got updated my Ubuntu 15.10 and i came to know that some Mir Server packages are going to be installed so how will i know that either Mir is running or X Server?
3 Answers
(Trying to improve @shcherbak answer.)
To get info about the running display server write in the console:
ps -e | grep tty
The out put might be, for example:
1475 tty2 00:00:00 gdm-x-session
1478 tty2 00:00:40 Xorg
1489 tty2 00:00:00 gnome-session-b
One of the tty* results is the terminal where you have the GUI in your linux system (usually tty7 though I use tty2 in my example). Therefore, this should be the terminal where the display server (X11, Mir, or whatever) is running.
For example, the results show 1478 tty2 00:00:40 Xorg, so this would be running Xorg (that is, X11).
Shscherbak answer would just output the running processes that contain a capital X, "X". Among others, of course, Xorg, in case it is present. But if another display server is running, you miss the information. :)
-
2It output nothing on my computer.Elouan Keryell-Even– Elouan Keryell-Even2019-06-12 13:20:21 +00:00Commented Jun 12, 2019 at 13:20
-
@ElouanKeryell-Even the
psandgrepcommand are really basic commands of linux, therefore I can only infer that your computer does not uses thetty7for the GUI. I am sorry. askubunt-u.com/questions/27339/…loved.by.Jesus– loved.by.Jesus2019-06-18 19:50:09 +00:00Commented Jun 18, 2019 at 19:50
try look your process list:
ps -e | grep X
-
2This would return the running processes that contain a capital X (e.g., Xorg), but would not show another display server if it is running.iND– iND2020-01-09 14:19:14 +00:00Commented Jan 9, 2020 at 14:19
with Ubuntu Ubuntu 22.04.2 LTS
I needed a slightly different approach:
ps -ef | grep -i tty
shows me an entry that contains
/var/run/sddm
so I currently use SDDM Display Manager.
next step:
Find out if Wayland or X is active ...