LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Straightforward way to shut down graphical display on Fedora 7 from command line (https://www.linuxquestions.org/questions/linux-newbie-8/straightforward-way-to-shut-down-graphical-display-on-fedora-7-from-command-line-618064/)

Sheridan 02-01-2008 07:44 PM

Straightforward way to shut down graphical display on Fedora 7 from command line
 
Hi Folks,

This has been killing me for some time... begginners question I know, but still.

How do you shut down the graphical display on Fedora 7 from the command line alltogether?

I mean, like in Mandriva, you just type "/etc/init.d/dm stop" and that's it.

Short of changing runlevel, I have no idea. Any help? Thanks!

Valik 02-01-2008 09:06 PM

as a root user type init 1 or init 3

{BBI}Nexus{BBI} 02-01-2008 09:08 PM

Try as root: init 3.

Oops 2 minutes too slow with my response :)

Sheridan 02-02-2008 05:36 AM

Thanks guys, thats a solution. :)

However...

The problem is that if I switch runlevel, some services go offline until I restart them. This comes with a disruption of the service (and lost sessions, uploads, etc etc). I guess the real catch is if I can kill out graphics without changing runlevel in Fedora 7? :)

tredegar 02-02-2008 05:54 AM

Quote:

I mean, like in Mandriva, you just type "/etc/init.d/dm stop" and that's it.
Try /etc/init.d/kdm stop or /etc/init.d/gdm stop
You'll need to be root.

Sheridan 02-02-2008 10:54 AM

Quote:

Originally Posted by tredegar (Post 3043447)
Try /etc/init.d/kdm stop or /etc/init.d/gdm stop
You'll need to be root.

Unfortunately, there's nothing remotely like that in there. See... :(

Code:

[root@gepard ~]# ls /etc/init.d/*dm*
/etc/init.d/ipvsadm  /etc/init.d/mdmonitor  /etc/init.d/rpcidmapd  /etc/init.d/sendmail


tredegar 02-02-2008 11:06 AM

Hmmm. Fedora is different :(
Try this (as root) /sbin/service --status-all
Look throught the list and identify whatever it is that refers to X
Then /sbin/service servicename {start|stop|status|reload|restart}
eg /sbin/service dm stop
(I am guessing here!)

Sheridan 02-11-2008 03:42 AM

Quote:

Originally Posted by tredegar (Post 3043692)
Hmmm. Fedora is different :(
Try this (as root) /sbin/service --status-all
Look throught the list and identify whatever it is that refers to X
Then /sbin/service servicename {start|stop|status|reload|restart}
eg /sbin/service dm stop
(I am guessing here!)

I've since found a not-too-elegant, but simple way to shut it down:

1) Grep for the process "/usr/sbin/gdm-binary -nodaemon"
2) When found, simply kill the process. Everything graphics related will die instantly. It's not enough to just kill Xorg, because it will be respawned immediately - but if you kill this gdm-binary, then all graphics will go away.

Well... it "works for me", but I'm long way from being sure it works for anyone else. At least problem solved.

tredegar 02-11-2008 10:20 AM

Thanks for posting a solution.


All times are GMT -5. The time now is 10:08 PM.