[lug] how to automate xhost? FC2

Michael Hirsch mdhirsch at gmail.com
Wed Mar 9 08:25:02 MST 2005


On Tue, 08 Mar 2005 10:58:31 -0700, D. Stimits <stimits at comcast.net> wrote:
> Michael Hirsch wrote:
> > On Mon, 07 Mar 2005 19:54:22 -0700, D. Stimits <stimits at comcast.net> wrote:
> >
> >>I use x2x to avoid a KVM between two FC2/KRUD machines. The problem is I
> >>must always manually run the xhost command before x2x is allowed. If I
> >>create a ~/.Xsession line I have to add
> >>exec startkde
> >>(I use KDE not Gnome) to get it to start up normally. It seems like I
> >>should be able to add an xhost + line either before or after this as
> >>well to get it to add the 2nd machine to the host list, but this never
> >>happens. The xhost line in .Xsession is completely ignored. Can anyone
> >>tell me how to automate the 2nd machine being added with xhost or any
> >>other mechanism? The .Xsession fails.
> >
> >
> > I've never used x2x, but I know how X works.  I'm a little confused as
> > to what you are trying to do.  If you just need a way to make sure
> > that 'xhost +' gets run at KDE startup, you should be able to put that
> > in your .kde/Autostart directory.  Create an executable shell script
> > with just that line in it in your Autostart directory (usually
> > ~/.kde/Autostart/).  The script will get run at KDE startup.
> 
> This was exactly what I needed. I created an xhost script and put it in
> the Autostart directory. My thinking was too global, I was trying to
> find X11 methods rather than KDE methods.

Good, glad to help.

> FYI, x2x is just an app to
> remote display so far as X servers are concerned. This app though is
> special, it causes the mouse and keyboard of a 2nd machine to control
> the first machine. Once I log in with the 2nd keyboard, I run x2x, then
> put the 2nd keyboard/mouse away and work only from the first. Not as
> good as Xinerama, but it does have other advantages. Much cheaper than
> buying a KVM, and significantly less irritating than hitting a kvm
> switch...I just move my mouse to the edge of the screen in the direction
> of the 2nd machine, and suddenly the 2nd machine uses my original mouse
> and keyboard without any hassle. Even old and slow machines work really
> nicely with this for things like web browsing while keeping work going
> on the first machine.

It seems like VNC would be a solution, too.  I was in a development
shop where all the development machines were in the server room and we
connected to them with VNC, and it really wasn't bad.  (People tell me
that RDP, the windows remote desktop protocol is even better, but
there doesn't seem to be any rdp server for Linux.)  We set it up so
that VNC ran out of inetd, so you would actually log in via VNC and
never need the extra keyboard.  You can also set up KDE to share a
session automatically, but I think you'd need to log in once, first.

Michael



More information about the LUG mailing list