Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to stop X
Date: Tue, 07 Jul 2009 14:21:02
Message-Id: 4A5359C5.5000103@gmail.com
In Reply to: Re: [gentoo-user] How to stop X by David Relson
1 David Relson wrote:
2 > On Tue, 07 Jul 2009 02:22:26 -0500
3 > Dale wrote:
4 >
5 >
6 >> David Relson wrote:
7 >>
8 >>> On Mon, 6 Jul 2009 15:21:43 -0700
9 >>> Kevin O'Gorman wrote:
10 >>>
11 >>>
12 >>>
13 >>>> On Mon, Jul 6, 2009 at 2:17 PM, Paul
14 >>>> Hartman<paul.hartman+gentoo@×××××.com> wrote:
15 >>>>
16 >>>>
17 >>>>> On Mon, Jul 6, 2009 at 2:33 PM, Kevin O'Gorman<kogorman@×××××.com>
18 >>>>> wrote:
19 >>>>>
20 >>>>>
21 >>>>>> I'm having trouble configuring X, and to save time I'd like to be
22 >>>>>> able to shut it down, edit some stuff, and start it up again.
23 >>>>>>
24 >>>>>> What is the gentoo way to do that?
25 >>>>>>
26 >>>>>>
27 >>>>> It depends on how you started X in the first place. If you did a
28 >>>>> "startx" (or similar), logging out should be all you need to do to
29 >>>>> get out of X. If you use a login manager, XDM/GDM/KDM then it'll
30 >>>>> restart itself so you'll need to switch to a VT (ctrl-alt-F1) and
31 >>>>> then sudo /etc/init.d/xdm stop to shut down XDM (and therefore X).
32 >>>>> You can then rmmod your video drivers or do whatever changes you
33 >>>>> want to do. sudo /etc/init.d/xdm start to bring it back up.
34 >>>>>
35 >>>>>
36 >>>>>
37 >>>>>
38 >>>> Several of you suggested "/etc/init.d/xdm start" or so to get it
39 >>>> (re)started. It doesn't work. Instead the start-stop daemon
40 >>>> complains of not being able to stat "/usr/bin/xdm" which doesn't
41 >>>> exist. And no I didn't mispell it. I've never seen this before an
42 >>>> I'm baffled.
43 >>>>
44 >>>> ++ kevin
45 >>>>
46 >>>>
47 >>> Hi Kevin,
48 >>>
49 >>> This weekend I needed to stop and start X a lot because I was
50 >>> experimenting with running dosemu from a tty command line and the
51 >>> DOS application I'm running under dosemu hangs the command line.
52 >>>
53 >>> Using an ssh session (from another machine) I found that
54 >>> "/etc/init.d/xdm stop" works to stop X. However,
55 >>> restarting is a bit tricky since "/etc/init.d/xdm start" fails
56 >>> because of files in "/var/lib/init.d/*/xdm". If one runs "rm
57 >>> -rf /var/lib/init.d/*/xdm" then runs "/etc/init.d/xdm start" one is
58 >>> good to go.
59 >>>
60 >>> HTH,
61 >>>
62 >>> David
63 >>>
64 >>>
65 >>>
66 >>>
67 >> Then /etc/init.d/xdm zap may be easier and cleaner.
68 >>
69 >> Dale
70 >>
71 >
72 > I hadn't known of zap. Indeed it's an easier way to do the cleanup.
73 > However, use it _after_ stop.
74 >
75 > I tried it instead of stop. What it does is remove the
76 > /var/init.d/*/xdm files. With them gone, "/etc/init.d/xdm status"
77 > can't tell that xdm has been started and "/etc/init.d/xdm stop" doesn't
78 > do anything. I had to frog around to fix the problem.
79 >
80 > Be careful !!
81 >
82 > David
83 >
84 >
85 >
86
87 True, you do have to use it after stop. It is supposed to reset
88 everything to a stopped state. I think it also kills running processes
89 but I have not tested that to see if it does for sure. I just know that
90 it works and does so cleanly. It's certainly a better option than
91 trying to do it manually.
92
93 Dale
94
95 :-) :-)