Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Best/Fast/Simple way to add a GUI to a batch process

by zentara (Archbishop)
on Aug 27, 2018 at 21:06 UTC ( [id://1221232]=note: print w/replies, xml ) Need Help??


in reply to Re: Best/Fast/Simple way to add a GUI to a batch process
in thread Best/Fast/Simple way to add a GUI to a batch process

Hi, if I were in your shoes, this would be my approach. If you can, run your app thru ssh. If your server has an X server, you can even run X apps thru ssh and it will be displayed on your local display. The problem most run into, is that most servers don't allow an X server to be run, because of system bloat and insecurities. This normally means that you will have to run your programs remotely as commandline via ssh. There are numerous examples on google. What you can then do, is use the Tk::ExecuteCommand example I showed on your local machine, but with ssh remote commands instead of local commands. I hope that makes sense. For example, see Net::SSH2::Channel Net::SSH2 Interactive command example and A little demo for Net::SSH2.

Remember, unless your server has an X server running, which it probably dosn't, you won't be able to run any gui program. If you don't want to use Net::SSH2, you can always run (individual ssh with options) from a local Tk-ExecuteCommand gui. That way, you have your gui on your local machine, but run non-gui commands on the server you connect to.


I'm not really a human, but I play one on earth. ..... an animated JAPH
  • Comment on Re^2: Best/Fast/Simple way to add a GUI to a batch process

Replies are listed 'Best First'.
Re^3: Best/Fast/Simple way to add a GUI to a batch process
by Lotus1 (Vicar) on Aug 28, 2018 at 03:13 UTC

    The OP described it as a Windows server so I assumed an RDP session is being used. Even if you aren't allowed to install things you can put a portable Perl folder such as from Strawberry Perl onto the server. This is the situation I work in with servers that are behind a firewall that doesn't allow web access. Most servers have an older version of ActiveState Perl that is required by a software application. I have a portable Perl folder that I have installed authentication email modules to on my personal workstation using CPAN. I can then deploy this folder to the servers so I can send authenticated emails. In the good old days I created install scripts to install modules on the ActiveState Perl in a particular order according to dependancies and hoped I didn't mess something up. It took me hours to deploy to multiple servers. Now I just give teammates a document describing how to copy the portable Perl folder and use portableshell.bat.

Re^3: Best/Fast/Simple way to add a GUI to a batch process
by RonW (Parson) on Aug 30, 2018 at 00:09 UTC

    Actually, the server doesn't need to have an X server. Properly configured, an application running on a server can use an X server running on a desktop (or laptop) PC. (Has been many years since I last did this, but as best I can determine, it it still possible.)

      Hi, thanks for that info/correction. I'm not sure if I believe it though. The last time I tried it, the server needed an X server in order to do X forwarding. Can any more knowledgable monk clarify whether a server needs X running in order to forward X thru ssh? Seaching the docs on Google dosn't reveal that detail. From what I can gather, you need to have the xauth program running on the server, but if that requires a full X install, I'm not sure. Server GUI

      Update: After some thought, it dawned on me that you probably need the X server installed on the server, but not neccessarily running. Why? Because when you try to execute the remote X program, it must find the various X libraries it needs, otherwise it will complain and fail. Your remote client can't provide the needed libraries, they must be on the server. So it seems RonW you are right, the X server does not need to be running, but the libraries must be installed. So .... X installed, but not neccessarily running, would be required.


      I'm not really a human, but I play one on earth. ..... an animated JAPH

        There are (were?) X client libraries. Last time I set up a "headless" server, I only installed the client libraries. I also configured SSH for X forwarding. I did notice that the option for installing the X server was enabled by default. I disabled that with no problems.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1221232]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-19 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found