where to put xhosts commands

Michael Zoet Michael.Zoet at michaelzoet.de
Wed Nov 7 18:21:26 UTC 2007


Paul Lemmons schrieb:
> I need to allow several machines to use the x server on my machine. I 
> have altered kdm.conf and now if I run "xhost +" I can run x 
> applications from another server. I would like to be a little more 
> granular that "xhost +" and I don't want to have to type in the commands 
> every time. On my Fedora box I set up a script in xinit.d. No such 
> directory exists on Kubuntu. Where would one put a series of xhost 
> commands so that I can set it up once for all users and forget it? Is 
> there a better way than xhost?
>
>   
What you want to do is setup an .xsession file in your home directory.
That is not easy and you should learn how to do this! If you do things
wrong your X11 (and KDE) will not start!

Since I use Kubuntu I did not feel the needs of maintaning my own
.xsession, so I can not provide you with an example.

As far as I can remember something like this in an .xsession file could
work:

==== .xsession start =====
xterm & # to have a rescue shell available
xhost + <computer1> <computer2> <computer3> ... # put all your machines
in here
startkde # fire up KDE
==== .xsession end ======

Please read:

man xsession
man xinit
man startx

And every good HowTo on the subject in setting up an .xsession file in
your home directory ;-).

Hope this helps.





More information about the kubuntu-users mailing list