LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   start gqview from windows over ssh with putty/plink (https://www.linuxquestions.org/questions/linux-newbie-8/start-gqview-from-windows-over-ssh-with-putty-plink-781344/)

Peterken 01-10-2010 06:12 PM

start gqview from windows over ssh with putty/plink
 
Hi guys,

I'm trying to figure out how to start/stop gqview remotely from a batch script on a windows machine.
Stopping works with killall (thanks to Greenfuse here on LQ) but starting gives me a
Code:

Gtk-Warning **: cannot open display
warning.

Is this because it tries to open a GUI in the terminal and if so, can anyone point me in the direction on how to solve this?

Thanks a lot in advance!
Peter

Tinkster 01-10-2010 08:30 PM

Depends on where you want the images to show?


On a (remote) Linux box, or on the Windows machine?



Cheers,
Tink

Peterken 01-10-2010 09:36 PM

Hi Tinkster, thank you for responding.

Well, the situation is like this:
- a linux box with a samba share (server) is running gqview - fullscreen in a loop. The machine will be out of reach, boots and shuts down automatically.
- from a windows machine, pictures are added and removed from that samba share.

From a batch script on the windows pc, I would like to be able to start/stop the presentation for adding/removing pictures and boot (wol), reboot and shutdown the linux box.

I hope the situation is more clear now. ;)
P.

Tinkster 01-11-2010 01:57 AM

Somewhat more clear, but not all clear ;}

That server - when it reboots, does it automatically log in a user?
Which user is it using?
Which distro/version of Linux are you using, how does it authenticate
the display of X sessions?

Anyway - at the end of the day the machine needs to
a) have a running X session with someone logged in
b) it must permit X programs to display even if not
started from the current session (which is what your
remote script is doing).

b) is commonly something like "xhost +localhost" which you need
to run from whichever autostart mechanism that users X-session has.

And invoking gqview from the windows box you'll need to prepend the
execution with "DISPLAY=<servername-or-ip>:0.0"



Cheers,
Tink

Peterken 01-11-2010 07:51 PM

Hi Tinkster, thank you for that tip; it got me a little further.
I didn't think the rest was important but here it is:

- yes, I configured it for autologon with a normal user and gqview autostarts after logon.
- I've used debian with gnome
- since the system is physically not reachable, it will be started through a wol script at logon on a windows machine.
- shutting down will be done through crontab

There are just a few tweaks left to do.
I guess there is a problem with the graphics driver since the system doesn't always show the desktop but just a black screen. If I connect to it with vnc, everything seems fine.
I have not found any info about it yet but even by starting gqview from command line, it briefly shows the program interface and I wonder if there is a way to start it minimized.


All times are GMT -5. The time now is 11:38 PM.