On Sat, Jun 14, 2014 at 10:43 AM, Arun Khan <knu...@gmail.com> wrote:
> On Sat, Jun 14, 2014 at 6:06 AM, Shrinivasan T <tshriniva...@gmail.com> wrote:
>> I have a GUI application to be run on a headless server, in cron
>> periodically.
>
> I don't think this is possible.   You *need* an X server to display.
> Does your application work from CLI i.e. output on a console?
>
>>
>> It runs well on local laptop in cron  as I have logged in a GUI environment.
>>
>> Ex-
>>
>> 10 10 *  * * display:0  firefox
>>
>> I have to run the same application on a remote server where I have SSH
>> login as root.
>
> 'root' ?  bad idea.   FF can run as any user, as root you have the
> full authority to create a regular user!
>
> Curious, where did the FF display come up?
>
>> The server has all the gnome and kde installed.
>>
>> But the GUI app is not running as I did not logged in GUI.
>
> Good.  The libs must be on the headless server.
>
>> I don't know if the ctrl+F7 area has only gdm login screen or someuser has
>> logged in already.
>
> It is 'CTL+ALT+Fn' to switch the VGA console of your headless system,
> so how does this matter?
>
> Provide a use case scenario for a better understanding of what you are
> trying to do.
>
>> Is there any way to login as GUI user remotely even no one logged in GUI
>> locally ?
>
> Yes but It is necessary to understand how X windows works.   In a X
> desktop, the applications run as client and talk to it's X server over
> a unix socket (in the early days, the X server also took connections
> over the network but that is not the default setup.   With headless
> setup i.e. no X server running, you are out of luck.  To me it does
> not make sense to run firefox from a cron job to display on the same
> headless server.
>
> On a remote desktop, you can try:
>
> (a) open up the X server to accept connections from the headless
> server and program firefox at the headless server to display on this
> desktop.   I leave the mechanics of this for your research.   Once
> this works, accordingly modify your cron entry on the headless server.
> Make sure there is another entry to kill this job, otherwise you will
> have multiple displays

For the above method, minor clarification, it should read
(a) open up the X server on the remote desktop to accept connections
from the headless
..............

 With this method these links may work for what you want to achieve.
<http://ubuntuforums.org/archive/index.php/t-105250.html>
<http://forums.fedoraforum.org/showthread.php?t=286840>
FWIW, I found the above links on the first page with search keywords
'executing X application via cron'

-- Arun Khan
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines

Reply via email to