# Re X forwarding

## satimis

Hi folks,

Re ssh X forwarding

How to set the display size avoiding taking up the whole screen.

e.g.

$ ssh -XC -c blowfish user@ip_address display:1 "gnome-panel"

Does it take up the complete screen?

B.R.

satimis

----------

## Hu

Could you clarify the question?  X forwarding grants the remote program access to your local display.  There is only one screen, and both local and remote programs have access to it.  If the remote program is using too much screen real estate, that is a problem with the remote program, not with the X forward.

----------

## satimis

 *Hu wrote:*   

> Could you clarify the question?  X forwarding grants the remote program access to your local display.  There is only one screen, and both local and remote programs have access to it.  If the remote program is using too much screen real estate, that is a problem with the remote program, not with the X forward.

 

Hi,

The remote screen takes up the complete local screen.  I need to display both (2) screens side-by-side, not switching between them.  Thanks

B.R.

satimis

----------

## Hu

Do you have two monitors?  If not, where will the second screen come from?  If so, then you need to tell the remote program on which monitor it should appear.  Your window manager may be able to coerce some uncooperative programs into doing the right thing.  Success may also depend on how you drive the two monitors.  If you used a single merged desktop, getting the correct behavior will be difficult.

----------

## cwr

You might want to look at Xnest.

Direct X-window stuff can be done by running

  Xnest -ac :1.0 &

  twm -display :1.0 &

to start an X-server, and then logging into the client with ssh -X

and setting the DISPLAY variable to <server address>:1.0.  X applications

run on the client will then appear on the server. /etc/X11/xinit/xserverrc

may first need to be edited to remove the "-nolisten tcp" argument.

Works for me - Will

----------

## satimis

 *cwr wrote:*   

> You might want to look at Xnest.
> 
> Direct X-window stuff can be done by running
> 
>   Xnest -ac :1.0 &
> ...

 

Hi,

Thanks for your advice.

I have no problem to forward remote desktop with VNC client and rdesktop respectively.  I'm interested to learn how to make it with ssh.

B.R.

satimis

----------

## Hu

X11 forwarding is not designed to forward a remote desktop.  Forwarding an entire desktop wastes screen real estate, relative to forwarding the windows that you need.  It also makes it more difficult for your local window manager to adequately interleave the local and remote windows.  If you still want to forward an entire desktop, the solution proposed by cwr is a good one.  You could also run a VNC server remotely, connect the X applications to it, and then use ssh port forwarding to forward a VNC connection over the secure tunnel.

----------

## dmpogo

 *satimis wrote:*   

> 
> 
> I have no problem to forward remote desktop with VNC client and rdesktop respectively.  I'm interested to learn how to make it with ssh.
> 
> B.R.
> ...

 

use  ssvnc package - it will make setting ssh tunnels for vnc easier

----------

