From: Todd on
Hi All,

I love ssh's "-X" option that allows me to remotely
run a particular app..

If I wanted to display my entire desktop, in a single
window, in the style of VNC, is there a way for ssh
to do this?

Many thanks,
-T
From: J G Miller on
On Sun, 20 Jun 2010 13:25:11 -0700, Todd wrote:

> If I wanted to display my entire desktop, in a single window, in the
> style of VNC, is there a way for ssh to do this?

Not in a single window.

What you would do is to start up your local X11 server without a window
manager by going to failsafe mode. Then in the failsafe X terminal
issue an ssh -X command to the remote machine to run the Xsession
or Xinitrc file relevant to your remote user, which would then start
the window manager and whatever clients are association with the
Xsession, Xinitrc, or Xclients files.
From: David W. Hodgins on
On Sun, 20 Jun 2010 16:25:11 -0400, Todd <todd(a)invalid.com> wrote:

> If I wanted to display my entire desktop, in a single
> window, in the style of VNC, is there a way for ssh
> to do this?

After I use ssh to connect to a remote computer, using
the same userid as a logged on user, that has the desktop
showing on that computer, I run the following script ...

#!/bin/bash
killall x11vnc
x11vnc -ncache 10 -localhost -display :0 &
sleep 6
vncviewer -compresslevel 9 -quality 3 -encodings "copyrect tight zlib hextile" localhost:0

That allows me to see the existing desktop, and use my mouse
and keyboard, to provide input to it (the mouse/keyboard on the
remote still work too).

Regards, Dave Hodgins

-- Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
From: Todd on
On 06/20/2010 02:11 PM, David W. Hodgins wrote:
> On Sun, 20 Jun 2010 16:25:11 -0400, Todd <todd(a)invalid.com> wrote:
>
>> If I wanted to display my entire desktop, in a single
>> window, in the style of VNC, is there a way for ssh
>> to do this?
>
> After I use ssh to connect to a remote computer, using
> the same userid as a logged on user, that has the desktop
> showing on that computer, I run the following script ...
>
> #!/bin/bash
> killall x11vnc
> x11vnc -ncache 10 -localhost -display :0 &
> sleep 6
> vncviewer -compresslevel 9 -quality 3 -encodings "copyrect tight zlib
> hextile" localhost:0
>
> That allows me to see the existing desktop, and use my mouse
> and keyboard, to provide input to it (the mouse/keyboard on the
> remote still work too).
>
> Regards, Dave Hodgins
>
> -- Change nomail.afraid.org to ody.ca to reply by email.
> (nomail.afraid.org has been set up specifically for
> use in usenet. Feel free to use it yourself.)


Thank you!

Follow up question. This sounds like I could use it
as a substitute for Go To Assist Express (www.gotoassistexpress.com).
In other words, I would be seeing what a user is seeing
on his screen and we could both manupliate the mouse and keyboard.
Am I correct?

Also, if I changed the display variable to localhost:1,
would I get my own desktop?

-T
From: David W. Hodgins on
On Sun, 20 Jun 2010 20:55:51 -0400, Todd <todd(a)invalid.com> wrote:

> Follow up question. This sounds like I could use it
> as a substitute for Go To Assist Express (www.gotoassistexpress.com).
> In other words, I would be seeing what a user is seeing
> on his screen and we could both manupliate the mouse and keyboard.
> Am I correct?

Yes. The remote desktop is accessible in a scrollable dialog on
your desktop. Just be careful to keep your mouse out of that
window, when you don't want it to interfere with the person you
are assisting.

> Also, if I changed the display variable to localhost:1,
> would I get my own desktop?

The following script will start a new desktop manager, and
provide similar access on your desktop ...

#!/bin/bash
IFS=$'\n' # Seperate command output by newlines only
vncout=($(vncserver -depth 24 2>&1 ))
vncdisplay="${vncout[0]}"
vncdisplay="${vncdisplay##*:}" # strip string ":" and everything before it
echo "vncdisplay=$vncdisplay"
sleep 2
vncviewer -bgr233 -nocursorshape -compresslevel 9 -quality 3 -encodings "copyrect tight zlib hextile" :$vncdisplay
vncserver -kill :$vncdisplay

-- Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)