stop and start X server in FreeBSD 9.0

2012-10-02 Thread Istvan Gabor
Hello:

I configured FreeBSD 9.0 RELEASE with X starting automatically at boot.
I use kdm3 login manager, and it works.
I would like to make changes to xorg.conf and test the effects.
How can I stop X in a terminal temporarily?
If I kill kdm it is restarted immediately.
In openSUSE I could do this by switchiong runlevels but
I learned that FreeBSD has no runlevels.

Thanks,
Istvan

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: stop and start X server in FreeBSD 9.0

2012-10-02 Thread Polytropon
On Tue, 02 Oct 2012 15:33:50 +0200, Istvan Gabor wrote:
 Hello:
 
 I configured FreeBSD 9.0 RELEASE with X starting automatically at boot.
 I use kdm3 login manager, and it works.
 I would like to make changes to xorg.conf and test the effects.
 How can I stop X in a terminal temporarily?
 If I kill kdm it is restarted immediately.

For the desired test scenario, I'd suggest to disable KDE
(kdm) startup in /etc/rc.conf, and finally stop the related
service (from /usr/local/etc/rc.d probably). Then you can
easily use the startx command to start an X session from
a user's VT, test your settings, terminate the session,
and you'll be back in text mode.

If you are happy with your settings, re-enable KDE (kdm)
by the corresponding /etc/rc.conf entry.



 In openSUSE I could do this by switchiong runlevels but
 I learned that FreeBSD has no runlevels.

Yes, FreeBSD uses the rc.d mechanism (see man 8 rc for details).



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: stop and start X server in FreeBSD 9.0

2012-10-02 Thread Mike Clarke
On Tuesday 02 October 2012 14:49:54 Polytropon wrote:

 For the desired test scenario, I'd suggest to disable KDE
 (kdm) startup in /etc/rc.conf, and finally stop the related
 service (from /usr/local/etc/rc.d probably). Then you can
 easily use the startx command to start an X session from
 a user's VT, test your settings, terminate the session,
 and you'll be back in text mode.

The OP is using kdm3 which is normally  managed through /etc/ttys instead of 
an rc script.

To stop kdm3:

* edit /etc/ttys, find the line 'ttyv8   /usr/local/bin/kdm xterm on secure' 
and changie on to off
* kill -1 1
* killall kdm-bin

To restart

* edit /etc/ttys and change off back to on for kdm
* kill -1 1

But it isn't necessary to do all this just to pick up changes in xorg.conf. 
Just make your desired changes to xorg.conf, then log out of kde and switch 
to a console as root and killall kdm-bin. This will stop and start X as well 
as kdm.

You can do all this from a terminal window in your kde session but I prefer to 
logout cleanly instead of having the rug pulled from under my feet which has 
sometimes corruptedf my kdmrc file.

-- 
Mike Clarke
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: stop and start X server in FreeBSD 9.0

2012-10-02 Thread Istvan Gabor
Polytropon, Mike,

Thank for your answers.


2012. október 2. 17:29 napon Mike Clarke jmc-freeb...@milibyte.co.uk írta:

 On Tuesday 02 October 2012 14:49:54 Polytropon wrote:
 
  For the desired test scenario, I'd suggest to disable KDE
  (kdm) startup in /etc/rc.conf, and finally stop the related
  service (from /usr/local/etc/rc.d probably). Then you can
  easily use the startx command to start an X session from
  a user's VT, test your settings, terminate the session,
  and you'll be back in text mode.
 
 The OP is using kdm3 which is normally  managed through /etc/ttys instead of 
 an rc script.
 
 To stop kdm3:
 
 * edit /etc/ttys, find the line 'ttyv8   /usr/local/bin/kdm xterm on 
 secure' 
 and changie on to off

I did this one before. I hoped I could make it without editing ttys every time.

 * kill -1 1
 * killall kdm-bin

Thanks for pointing out which program has to be killed.

 
 To restart
 
 * edit /etc/ttys and change off back to on for kdm
 * kill -1 1
 
 But it isn't necessary to do all this just to pick up changes in xorg.conf. 
 Just make your desired changes to xorg.conf, then log out of kde and switch 
 to a console as root and killall kdm-bin. This will stop and start X as well 
 as kdm.
 
 You can do all this from a terminal window in your kde session but I prefer 
 to 
 logout cleanly instead of having the rug pulled from under my feet which has 
 sometimes corruptedf my kdmrc file.
 

I guess this is the way to go. Thanks!

Istvan



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org