To login to my application I use Putty. To display a picture I do a systemcall, which opens a shell, and launch : 'display mypicture.jpg'. I get the answer : display: unable to open X server How can I get around this?
Roland Brouwers C.A.T. bvba Antwerp-Belgium roland@cat.be
On Fri, 2006-01-27 at 14:13 +0100, brouwers roland lx wrote:
To login to my application I use Putty. To display a picture I do a systemcall, which opens a shell, and launch : 'display mypicture.jpg'. I get the answer : display: unable to open X server How can I get around this?
Hi Roland,
If you are using putty, I presume you are doing this from Windows.
To do what you want to do, you will need to run a X-server on your windows PC. I'm a bit rusty on what is available (not being a windows user), but if you google for "windows X server" you should find something.
Once you have an X server running on your Windows PC, you then need to make sure that the X server allows connections from the client (the Linux machine). To do this, use the "xhost" command. Eg. xhost linuxpc.
To ensure the Linux PC knows how to display it's running application on your Windows PC's X server, either use the "-Y" option to ssh (trusted X11 forwarding) if putty supports this, or set the "DISPLAY" environment variable the the hostname and display of your Windows PC's X server. Eg.
export DISPLAY=winders:0
Good luck - this info plus some googling should get you there. You can also look at the man pages on the linux machine for xhost and ssh. Ie. "man ssh", and "man xhost".
Cheers, Ben
Roland Brouwers C.A.T. bvba Antwerp-Belgium roland@cat.be -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
On Sat, 2006-01-28 at 00:31 +1100, Ben Stringer wrote:
On Fri, 2006-01-27 at 14:13 +0100, brouwers roland lx wrote:
To login to my application I use Putty. To display a picture I do a systemcall, which opens a shell, and launch : 'display mypicture.jpg'. I get the answer : display: unable to open X server How can I get around this?
Hi Roland,
If you are using putty, I presume you are doing this from Windows.
To do what you want to do, you will need to run a X-server on your windows PC. I'm a bit rusty on what is available (not being a windows user), but if you google for "windows X server" you should find something.
Once you have an X server running on your Windows PC, you then need to make sure that the X server allows connections from the client (the Linux machine). To do this, use the "xhost" command. Eg. xhost linuxpc.
To ensure the Linux PC knows how to display it's running application on your Windows PC's X server, either use the "-Y" option to ssh (trusted X11 forwarding) if putty supports this, or set the "DISPLAY" environment variable the the hostname and display of your Windows PC's X server. Eg.
export DISPLAY=winders:0
Good luck - this info plus some googling should get you there. You can also look at the man pages on the linux machine for xhost and ssh. Ie. "man ssh", and "man xhost".
Cheers, Ben
Dear Ben, Thank you for your answer. I am not using windows. I am starting putty on the Linux-Centos-desktop of a Ltsp installation. I connect to my database, running on application that wants to display pictures, belonging to some data. When I do a system I get out of my application to the Linux shell, running display and going back to may application, after the display.
AS x-window is not my thing, I do not understand how to switch to a window where Linux can execute the display-command. Because if you open a standard-terminal-window on the desktop, this command works.
Roland
brouwers roland lx wrote:
Dear Ben, Thank you for your answer. I am not using windows. I am starting putty on the Linux-Centos-desktop of a Ltsp installation. I connect to my database, running on application that wants to display pictures, belonging to some data. When I do a system I get out of my application to the Linux shell, running display and going back to may application, after the display.
AS x-window is not my thing, I do not understand how to switch to a window where Linux can execute the display-command. Because if you open a standard-terminal-window on the desktop, this command works.
Roland
You need to enable X11 forwarding in PuTTY. As long as the SSH server on the other end allows X11 forwarding, then DISPLAY will be set properly, and you will get a windows on your local desktop.
Mikkel
On Fri, 2006-01-27 at 15:09, Mikkel L. Ellertson wrote:
brouwers roland lx wrote:
Dear Ben, Thank you for your answer. I am not using windows. I am starting putty on the Linux-Centos-desktop of a Ltsp installation. I connect to my database, running on application that wants to display pictures, belonging to some data. When I do a system I get out of my application to the Linux shell, running display and going back to may application, after the display.
AS x-window is not my thing, I do not understand how to switch to a window where Linux can execute the display-command. Because if you open a standard-terminal-window on the desktop, this command works.
Roland
You need to enable X11 forwarding in PuTTY. As long as the SSH server on the other end allows X11 forwarding, then DISPLAY will be set properly, and you will get a windows on your local desktop.
Don't forget to have an xserver running on the windows box such as Exceed or cygwin.