Using Xorg to view images on server...

But what does X11DisplayOffset 10 mean?
Well if you notice the talk around here you see $DISPLAY
That seems to be a terminal/shell environment. Look at your ENV and see that usually DISPLAY:0 is usually your primary display.
Using the offset 10 gives you another display server at DISPLAY:10 for the x-forwarding session.

That is my best guess.
 
Well if you notice the talk around here you see $DISPLAY
That seems to be a terminal/shell environment. Look at your ENV and see that usually DISPLAY:0 is usually your primary display.
Using the offset 10 gives you another display server at DISPLAY:10 for the x-forwarding session.

That is my best guess.
That is what happens.
ssh client started on "my client system" to remote system with -X and -Y. You wind up at a shell. If you echo $DISPLAY you wind up with something like "localhost:10.0". Keep in mind that is on the REMOTE system. Now on that remote system you start an application, that does X. Remote system, X-application runs, discovers $DISPLAY and sends X stuff to $DISPLAY. $DISPLAY on the remote system for this ssh session sends things to one end of an ssh tunnel. Data flow over ssh tunnel and is displayed on the system the ssh client session originated from "my client system" in this example.
So yeah, if you ssh client with -X -Y don't try to muck with the value of DISPLAY on the remote or local system unless you know what you are doing. ssh magic does the right things.
 
Thanks for that. How do I configure X on a server with no display? What is a good option for opening the image file on the server?. Is this the basic operation?:
I will give you my embedded recipe.
Install Xorg minimal if that application set works for you. (IE. No Xterm/XCalc/ yada yada)
My favorite for these over the wire operations is a lightweight FOX toolkit program x11-fm/xfe
It contains Writer, Image Viewer and File Explorer.

So for me I do pkg install xorg-minimal xfe and that's it. Setup sshd_config for xforwarding.

For real use without embedded constraints I would do:
pkg install xorg viewnior

Then ssh -X into server. Then run Image Viewing program name from ssh command prompt. xfe also includes xfi for images and xfw for text.
 
That is what happens.
ssh client started on "my client system" to remote system with -X and -Y. You wind up at a shell. If you echo $DISPLAY you wind up with something like "localhost:10.0". Keep in mind that is on the REMOTE system. Now on that remote system you start an application, that does X. Remote system, X-application runs, discovers $DISPLAY and sends X stuff to $DISPLAY. $DISPLAY on the remote system for this ssh session sends things to one end of an ssh tunnel. Data flow over ssh tunnel and is displayed on the system the ssh client session originated from "my client system" in this example.
So yeah, if you ssh client with -X -Y don't try to muck with the value of DISPLAY on the remote or local system unless you know what you are doing. ssh magic does the right things.
In my case, the display is set to ":0.0". This is the local X-server that runs programs on the local screen, if it's runnng. That's not the graphical output of a remote terminal. It has to be something else, but, any X program with any DISPLAY string gives error "Cannot open display (null)".
What sets the DISPLAY variable? I have it manually configured as :0.0 for years. ":0." is also valid.

Is there any official howto to run a simple graphical program that's on a remote LAN computer? This thread kind of implies it's 3 commands or so but I don't think that's realistic.
 
In my case, the display is set to ":0.0". This is the local X-server that runs programs on the local screen, if it's runnng. That's not the graphical output of a remote terminal. It has to be something else, but, any X program with any DISPLAY string gives error "Cannot open display (null)".
What sets the DISPLAY variable? I have it manually configured as :0.0 for years. ":0." is also valid.

Is there any official howto to run a simple graphical program that's on a remote LAN computer? This thread kind of implies it's 3 commands or so but I don't think that's realistic.
DISPLAY is the id of the server your client talks to. You should rarely if ever have to explicitly set it, as it is set by the server. :0.0 is the local default server. sshd by default uses localhost:10:0 to point to the local server via X11 forwarding when you start the client with -X or -Y.
 
Good news </Prof Farnsworth>. I've done it, at least as far as proof of concept. I got a small python3 program written by ChatGPT which runs in the background on the Linux systems. A shell script that opens a reverse tunnel using ssh and a Netcat command that the server creates to send the images, which open using xdg-open. Should anybody be interested i can post all the details?
 
Back
Top