0

I want to have the opportunity to run a GUI app at Ubuntu via cron and via PuTTY from Windows.

I explain.

Example:

Computer 1: Windows 10
Computer 2: Ubuntu 18.04

I run ./firefox via PuTTY at Computer 1 then I come to Computer 2, login and see opened firefox. Firefox is an example. I need to run any GUI app.

And I want to do the same action with cron.

Is it possible?

Bob
  • 208

1 Answers1

0

It is possible but you will have to fiddle a while. You need x forwarding with vnc, to allow disconnect and reconnect.

https://unix.stackexchange.com/questions/10597/reattach-to-lost-x11-session

Dr Phil
  • 293
  • Ok, thank you. What about a cron job? How can I do that Firefox runs at schedule itself? – Bob Jun 01 '19 at 23:26
  • ...else one question. Can do it from Computer 1 and ssh only? Or I must do it on Computer 1 then go to Computer 2 and do it there and finally go to Computer 1 and do the last action. Sorry, maybe it's a simple question, but I'm newer in Ubuntu. – Bob Jun 02 '19 at 02:24
  • You can say Street fitters from from cron or another scheduler but you will have to make sure when it starts it received the right environment variables. BTW, why do you want to start it unattended? Do you want to test some web page ? Curl or wget might be easier to control from come line – Dr Phil Jun 02 '19 at 14:35
  • Look here https://askubuntu.com/questions/514167/how-to-start-a-gui-application-from-cron – Dr Phil Jun 02 '19 at 14:38
  • Thank you. Just it is interesting for me. However, emerged a need during our talking. The need to run a JS script. – Bob Jun 04 '19 at 01:00