查看Linux用的桌面是GNOME、KDE或者其他(转)

时间:2022-10-29 21:32:07

http://superuser.com/questions/96151/how-do-i-check-whether-i-am-using-kde-or-gnome

1) pgrep -l "gnome|kde|mate|cinnamon|lxde|xfce|jwm"

2556 gnome-session
2580 gnome-settings-
2594 gnome-power-man
2598 polkit-gnome-au

2) ps -A | egrep -i "gnome|kde|mate|cinnamon|lxde|xfce|jwm"

  

2556 ? 00:00:00 gnome-session
2580 ? 00:00:06 gnome-settings-
2594 ? 00:00:03 gnome-power-man
2598 ? 00:00:00 polkit-gnome-au

3) ls /usr/bin/*session*

  1. in GNOME returns /usr/bin/gnome-session (and more)
  2. in MATE returns /usr/bin/mate-session (and more)
  3. in LXDE returns /usr/bin/lxsession (and more)

4)

ps -ef | grep gnome  最简单