Search code examples
linuxcommand-line-interfacecentos7gnomegnome-shell

CentOS 7 how to stop / start Gnome desktop from command line


I have remote server running under CentOS 7, usually it's enough to operate using SSH CLI - but sometimes I need a graphic access, so I installed Gnome Desktop there too.

But how to stop or start Gnome Desktop ? Especially because gnome-shell eats CPU when I don't need Gnome.

It seems strange but 3 pages of Google search did not help. I'm afraid there are no a simple solution here like

service gnome stop | start

So thanks in advance for any hint or howto !


Solution

  • But the solution was simple. First of all - check if you GDM service is running.

    service gdm status
    

    If not - start it to make active. (my case service gdm was loaded but inactive and it causes a confusing) After that I just stopped gdm service

    service gdm stop
    

    and checked any Gnome processes

    ps aux | grep gnome
    

    an output is empty, Gnome desktop gone until started again by

    service gdm start