Using Xorg to view images on server...

I have a small test based application which is used, by its users, via ssh over the lan. They now want to view images on the server. Searching has suggested using ssh with the -Y parameter, to enable X11 forwarding. The client systems use Linux Mint. Is this a viable route? Would a different approach be better. Advice please. Ta.
 
Is this a viable route?
Yes. Assuming Mint uses X, not wayland. Because you're going to need a working X server on the Mint clients.

Note however that X-Forwarding is off by default server-side nowadays. You will need to enable X11Forwarding in sshd_config.
 
Yes, I think Linux Mint is currently X by default. I think the Mint team are working on Wayland, but it' not the default. Are there detailed instructions for the lazy and hopeless somewhere?
 
Are there detailed instructions for the lazy and hopeless somewhere?
Don't need much, it's a typical X-forward. Usually works right out of the box (provided you enabled X11Forwarding on the SSH server).
 
I used putty a long time ago, I used -X , but there was a black screen, I was told that the client was compiled without X server support, maybe it was disabled somewhere in the configuration, enabling X, I didn't understand, honestly
 
Putty has no builtin X server. Never had.

I was told that the client was compiled without X server support
I suspect you meant the application you tried to run was built without X support (i.e. no GUI).
 
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?:
ssh -X user1@192.168.0.10 [enter]

How do I open the image over ssh?
I must learn this hidden knowledge.
 
ssh -X and ssh -Y set a suitable $DISPLAY variable automatically on remote login. You can call any old X11 image viewer (unless the viewer is SDLed but that is rare).
 
How do I configure X on a server with no display?
The system you are connecting to does not need a working X server, the X server runs on the Mint clients. The application runs on the server and connects over the SSH X forwarding to the X server running on the client. The application runs on the server, the GUI shows up on the client.
 
as far as I know SSH must be compiled with X support options
I use X forwarding sometimes.
It uses a regular sshd that is already installed in the system.
You just need to add the options -X -Y and as SirDice says: your "remote machine" just need an X application.
 
I think the remote machine also needs to know a target display for most prograns because it's not the default monitor..
 
-X and -Y are really just conveniences. You can manually forward X11 sockets, setup the xauthority, set DISPLAY easily enough. The real strength is in X11 and its network transparency.

So even if you are using a weird / proprietary ssh/sshd without the functionality, you can still emulate it.
 
No, $DISPLAY is managed by the ssh connection establishing. Don't touch it.
I never use X forwarding, but I remember that the DISPLAY var needed a local ip code. it might have changed.
How else does a program know where the output screen is?

Just tried xgalaga via a ssh -X -Y connection.
Code:
Authorization required, but no authorization protocol specified
Cannot open display "(null)"
Ssh should pass that display reference to the server during the shell session with forwarding? It seems an empty field.
 
-X and -Y are really just conveniences. You can manually forward X11 sockets, setup the xauthority, set DISPLAY easily enough. The real strength is in X11 and its network transparency.

So even if you are using a weird / proprietary ssh/sshd without the functionality, you can still emulate it.
I agree that one can do it without the options, but the logic/syntax of the options makes it preferable/easier for me. A user that understands the options can better debug or work around things.

No, $DISPLAY is managed by the ssh connection establishing. Don't touch it.
Agree completely here. Use the correct options on the ssh client command line (options that the server supports) and it all just works. My local use cases (FreeBSD client to Linux far end) the worst that I've run into is needing to wait maybe 15 to 30 secs before running the application on the far end (Linux). Haven't tracked it down, but seems to be "time sync between ssh client and ssh server system" related. The problem shows up as "I ssh from A to B, then type xterm. Sometimes it doesn't show up but if I wait 20 secs it works"
 
I agree that one can do it without the options, but the logic/syntax of the options makes it preferable/easier for me. A user that understands the options can better debug or work around things.
Absolutely. I use -X all the time (and almost never need to do things manually)

Its more that even in the most lame of ssh clients, X11 prevails ;)

And supporting X11 forwarding doesn't link the ssh client against e.g. libX11 either which is cool.
 
Back
Top