Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 27
Could you please explain more about what your are trying to achieve?that might allow us to suggest alternate solutions (if any)....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758

    Could you please explain more about what your are trying to achieve?that might allow us to suggest alternate solutions (if any).
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  2. #12
    Just Joined!
    Join Date
    Jul 2009
    Posts
    17
    As wrote before :

    I have to schedule a cronjob which will open a firefox browser -do some operation and close it.

    So what i did is i have started a vncserver and used the session of this for exporting the display to the same session.like:

    export DISPLAY=<ip address of same machine>:1
    //where 1 is session of vnc.

    But when i cronjob starts it doesn't open display instead it gives above error.

    I have checked the file /etc/ssh/sshd_config for X11 forwarding but it is also proper.

    So please suggest something....

  3. #13
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Can you post the script, code snippet ?
    and also check thread [ubuntu] crontab runs invisible and does not start gui's - Ubuntu Forums
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  4. #14
    Just Joined!
    Join Date
    Jul 2009
    Posts
    17
    which code ?

    wht i do is:

    I login to a linux machine via putty session (root login)

    start VNCSERVER :1

    export DISPLAY=localhost:1

    set a cronjob to start firefox

  5. #15
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Can you login to linux machine (not using putty) normal desktop login.
    Is this command working for you
    xterm -e "firefox"
    I think,I'm running out of options/thoughts...lets see..
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  6. #16
    Just Joined!
    Join Date
    Jul 2009
    Posts
    17
    yes this command works with desktop login bt nt with putty

  7. #17
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    now edit crontab with this line
    */1 * * * * root /usr/bin/xterm -e "/usr/bin/firefox"
    Wait for 1 minute .. does work?
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  8. #18
    Just Joined!
    Join Date
    Jul 2009
    Posts
    17
    nope still same problem

    Xlib: connection to "10.58.190.140:1.0" refused by server
    Xlib: No protocol specified

  9. #19
    Just Joined!
    Join Date
    Jul 2009
    Posts
    17
    OK.I think i should do basic checks first.

    how do i check XServer is installed and running?
    Can i reinstall it?

  10. #20
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    okay ..let's specify DISPLAY value and then start firefox from crontab

    */1 * * * * root export DISPLAY=:0 && /usr/bin/xterm -e "/usr/bin/firefox"
    this one works for me. Check this .
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •