Newbie question: vncserver running on port :25, need to attach Perl script to this when it executes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there VNC gurus,

I have what I think is a pretty standard question, but I cannot seem  
to figure it out in the usual way (man pages, web search, etc).

I have a vnc server that I have got running on port localhost:25 via  
the command:

vncserver.rt :25 -name "My Display" -geometry 1024x1000 -localhost

This works well, and I can connect to it via the command:

vncviewer localhost:25

(I get prompted for a password, which I enter, after setting it up  
earlier using vncpasswd)

So I have a fully fledged working desktop on localhost:25. Now to what  
I really want to do....

I have a Perl script that I normally run from the X11 command line.  
This outputs much information, then opens up three Ghostscript  
windows, creates some postscript image files, then converts them to  
pdf files using the Ghostscript command ps2pdf.

I need this script to run via cron without me being logged in, hence  
why I thought Xvnc would be solution. However, I cannot seem to figure  
out how to force my script to attach to this port and run successfully.

One solution I tried was to force the display port  before running the  
script, by creating a wrapper script such as:

hostname{user}1% cat mywrapper.sh
#!/bin/sh

DISPLAY=localhost:25.0
export DISPLAY

/path/to/myperlscript.pl -args

DISPLAY=localhost:0.0
export DISPLAY

This forces the script to execute on (what I think is) the correct  
display. However, my script fails with a bunch of Ghostscript errors.

(Note that I cannot force the script to run on a different display by  
adding the -display option to my Perl script - it does not recognize  
that argument)

Does anyone have advice for a newbie? I am stuck.

Thanks in advance.

- Rob

_______________________________________________
VNC-List mailing list
VNC-List@xxxxxxxxxxx
To remove yourself from the list visit:
http://www.realvnc.com/mailman/listinfo/vnc-list

[Index of Archives]     [Spice Remote Desktop for Virtual Machines]     [Yosemite Questions]     [Open Source Now]
  Powered by Linux