Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 14434  / 3 Years ago, sun, november 21, 2021, 4:28:48

I am using Ubuntu Server 14.04 LTS. How can I tell whether it has a graphical user interface installed?


More From » server

 Answers
4

Look at /usr/share/xsessions/ directory to see if there are any X sessions available on your Ubuntu:



$ ls /usr/share/xsessions/
openbox.desktop


which says I've got "openbox" on my machine, it can be "Unity", "Gnome" or anything else for you. If you get nothing, so nothing has been installed.






Extra step:



You can run something like this on that file to see if its binary really exist on your machine and it's not a leftover file:



file $(grep -Po "(?<=^Exec=).*" /usr/share/xsessions/openbox.desktop)



  • grep -Po "(?<=^Exec=).* returns something similar to: /usr/bin/openbox

  • file will check if that really exist.


[#11182] Monday, November 22, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mugustered

Total Points: 193
Total Questions: 123
Total Answers: 108

Location: Bermuda
Member since Wed, Mar 22, 2023
1 Year ago
;