Good Netiquette! :-) (Was Re: [vox-tech] ssh with X11 remote - resolved)

ME vox-tech@lists.lugod.org
Tue, 25 May 2004 13:49:27 -0700 (PDT)


[soapbox]
For people who may be new to vox-tech, what Jonathan did here is *perfect*
for contributing to the OpenSource community.

There are other people who will use google or the search engine for these
archived lists who will have the same problem and find this thread. Now,
by taking the time to reply back to this thread with a solution that
worked for him, Jonathan improves the quality of documentation available
to all users.

This is very good netiquette.

This shows people can contribute to OpenSource even if they cannot program.
[/soapbox]

(I'm not suggesting Jonathan can't program, but am instead pointing out
something that people who feel they have nothing to offer can actually do
when they feel they have nothing to offer.)

-ME

Jonathan Stickel said:
> Thanks for the various (different) responses.  Here is what is working
> for me:
>
> $ssh remotehost
> $screen                           (if desired, run screen)
>
> $startx -- :1 &   (actually displays an X session on the remotehost)
> 	OR
> $Xvfb :1 -screen 0 800x600x16 &   (virtual X server, no real display)
>
> $export DISPLAY="remotehost:1.0"
>
> Xvfb works great for my purposes.  I don't seem to have the command
> "xvfb-run" as suggested by Ken, but the above works just fine.
>
> Jonathan
>
>
> ME wrote:
>> If you are actually running (logged into and using) an X11 session on a
>> machine
>> with an IP address avaulable to the actual host (or local) and you
>> specify
>> on that host (with the xhost command) what hosts may connect, then yo u
>> can log into
>> a machine and alter your DISPLAY env var from the one created by ssh in
>> its session for X11 forwarding to be the IP address : X
>> Session.SessiondID
>> of that host.
>> For example. I ssh to 192.168.0.1 from 10.0.0.1.
>>
>> After I log in, i do this:
>> $ echo $DISPLAY
>> and I see:
>> localhost:10.0
>>
>> If I have previously logged into a sesison on the target machine (could
>> be
>> itself or another machine on the network) and set xhost to allow X11
>> display from the 192.168.0.1 host, then you can take the DISPLAY env var
>> from that target machine and alter the DISPLAY env var within your ssh
>> session to match that:
>> (Assuming bash, and sample SessionID/#)
>> $ export DISPLAY="targetmachineIP:0.0"
>>
>> Now, when you start X apps from that ssh session, the graphics will all
>> be
>> redireted to that DISPLAY instead of your local one.
>>
>> (This was a method that was used to sometimes play pranks on people
>> using
>> shared systems... Before web-popups, there were xeyes, xclock, and funky
>> screen mod popups where buddies would harass each other by altering each
>> other's X session contents)
>>
>> HTH,
>> -ME
>>
>>
>> Jonathan Stickel said:
>>
>>>I have an interesting problem with ssh and X11.  I know how to use ssh
>>>with X11 forwarding to my local machine.  However, I have a program that
>>>generates a series of image files, and it insists on connecting to an X
>>>server to do so.  Running this via ssh means that ALL the data involved
>>>gets forwarded to my local machine and then back again; this is very
>>>inefficient.
>>>
>>>Is there any way to run ssh and tell it to use its own X server?
>>
>>
>> _______________________________________________
>> vox-tech mailing list
>> vox-tech@lists.lugod.org
>> http://lists.lugod.org/mailman/listinfo/vox-tech
>>
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>
>