Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: Gtk-Warning: Cannot Open Display

  1. #1

    Default Gtk-Warning: Cannot Open Display

    I'm not entirely sure if I should be posting this here on the Firefox forums, but I think it's a SuSE issue, so here we are.

    I have access to a UNIX server running OpenSuSE 10.3. It's hosting a website that I'd like to access via a script (accessing the page sets some things in motion, yadda yadda, I won't bore you with the details). Since the page contains a .swf file, I figured the most expedient thing to do would be to install the Linux version of the Flash Player and call Firefox from the command line. It turned out that Firefox was already installed (how convenient). However, when I try to run it I get this error:

    (firefox-bin:19787): Gtk-WARNING **: cannot open display:
    I tried running a Google search for this error, but none of the solutions I could find were very helpful. Does this mean I need to install something?

  2. #2
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    1,273

    Default Re: Gtk-Warning: Cannot Open Display

    I'm not sure if I understand you correctly.. but I think you want to redirect the screen output of the Unix server to your openSUSE station?

    If you are ssh'ing to the server you should add the X forward option to the ssh session (e.g. ssh -X <username>@<ip or name server> ).

    This sets the session so that starting applications looking for an X screen will get redirected to your station.

    I haven't ever done this connecting to a Unix server, but good chance it will work. Curious to know though!

    Cheers,
    Wj
    Have a lot of fun!

  3. #3

    Default Re: Gtk-Warning: Cannot Open Display

    Sort of. The computer that I'm using (the one that I'm physically sitting at, typing out this post right now) is a Windows box. I've been getting to the SuSE box that the project files are on using PuTTY.

    I'm assuming the reference to 'X' means X11, right? That's an option for PuTTY, but not quite what I'm looking for...what I eventually want to do is have Firefox navigate to a particular site automatically at a particular time. When I started on this project I thought this be an easy thing for Linux to do...

  4. #4
    Join Date
    Jun 2008
    Location
    The Netherlands
    Posts
    1,273

    Default Re: Gtk-Warning: Cannot Open Display

    Quote Originally Posted by Setaroi View Post
    Sort of. The computer that I'm using (the one that I'm physically sitting at, typing out this post right now) is a Windows box. I've been getting to the SuSE box that the project files are on using PuTTY.
    sidetracking, but for the Windows workstation have a look here what Xming and Putty can do for you : Xming & Putty - Manage Linux On Windows - openSUSE Forums

    Yes, it's X11 forwarding I'm referring to.

    ...what I eventually want to do is have Firefox navigate to a particular site automatically at a particular time. When I started on this project I thought this be an easy thing for Linux to do...
    I would think you should be able to do this using the cron or at scheduling. Although I'm not seeing where you are trying to go with that... Do you want firefox to do that when logged in as a certain user? Or is it to do some action?

    There are a couple of members here that can do neat things with scheduled scripts... sadly I'm not one of them
    Have a lot of fun!

  5. #5

    Default Re: Gtk-Warning: Cannot Open Display

    Quote Originally Posted by Magic31 View Post
    sidetracking, but for the Windows workstation have a look here what Xming and Putty can do for you : Xming & Putty - Manage Linux On Windows - openSUSE Forums

    Yes, it's X11 forwarding I'm referring to.
    Hm. Interesting, but not quite what I was looking for. I don't really need anyone to see the output of that particular visit to the site; running the .swf triggers a database call, and that's what I'd like to have happen (I've set up the .swf so that I know it works; like I said, I thought running it on Linux would be five minutes' work instead of a week-long odyssey).

    Quote Originally Posted by Magic31 View Post
    I would think you should be able to do this using the cron or at scheduling. Although I'm not seeing where you are trying to go with that... Do you want firefox to do that when logged in as a certain user? Or is it to do some action?

    There are a couple of members here that can do neat things with scheduled scripts... sadly I'm not one of them
    Well, I want to schedule it so that it runs once a day early in the morning. The problem is that if I can't get Firefox to run from the command line on this machine I doubt it'll work much better with cron.

  6. #6

    Default Re: Gtk-Warning: Cannot Open Display

    Err...well, I hate to bump my own thread after so long but...I'm still getting the same error.

    I'm relatively new to Linux and UNIX, so the only exposure I have to it is via command-line editing. I've never even seen a GUI running Linux before. So I have absolutely no idea how to do this. What step in the process am I missing? So far as I know the steps are:

    1) type 'firefox <url>' at the command line
    2) Get error message 'Gtk-WARNING **: cannot open display:'

    Is there something I need to do beforehand? Afterward? I've tried this with another browser (Opera) and gotten the same problem, so there has to be something I'm missing.

    And will whatever I have to do beforehand work if I put it in a crontab and let it run sometime at night when there's nothing to display to?

  7. #7
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Gtk-Warning: Cannot Open Display

    well, there is a real good chance i don't know what i'm talking
    about...but, let me start by explaining what i _think_ you are trying to do:

    you have a SuSE 10.3 server hosting a web site which has a page with a
    ..swf file which, when run (via an http thought apache?) accesses a db
    _on_ that same SuSE server...mean while, you sit at a Windows[tm] box
    somewhere and want to provoke an instance of firefox _on_ that same SuSe
    server to (twice a day) fire up and go to a certain URL _on_ that sa,e
    site/SuSe server...did i do good?

    if i'm pretty close then i think the problem is that you probably are
    not running X (windows) on the server...i mean, there is probably no
    reason to....apache runs very happily with NO X, so why waste the cycles..

    now, if X is not running and firefox *is* a program that runs_in_
    windows then bingo...*every* time you try to launch it it can't open a
    windows display (because there is NO environment for a 'display' to open
    in)..

    now, if i understand what you need then surely you can 'teach' your
    Windows[tm] IE to twice a day go to the URL and do what you want done...

    now, i don't know enough about flash to know if it can be provoked to
    'run' and/or tap that db via a simple http 'get' command...if so, there
    are "command line" browsers [lynx for one, but there are others] that
    CAN be called to work with a cron that has little other than (for example)

    lynx http://www.SetaroiSite.com/[someDirectory]/[target].swf

    but, as mentioned i do NOT know if the resulting http 'get' will cause
    [target].swf to actually tap the db....but, certainly i'd guess that you
    do NOT need to start windows twice a day, so you can launch firefox
    twice a day, so you can hit that flash twice a day..

    if that will work it will save a LOT of system resources on that
    server...lynx is TINY, and so fast it will make you dizzy..

    if i miss understood your problem, i'm not surprised--because i'm not a
    real guru..

    --
    DenverD (Linux Counter 282315)
    A Texan in Denmark

  8. #8

    Default Re: Gtk-Warning: Cannot Open Display

    Yeah, you got the situation exactly right.

    The problem, though, is that I'm trying to get the server (which runs 24/7) to handle this for me so that other users can access the site without having to deal with the excessive load time (the first call to the .swf loads a cache, which allows subsequent users over the next 24 hours to get the data basically instantly). There may be times when I'm not around, or forget to visit the website to get things rolling, so that's why I'm trying to get Linux to automate the task. I'll try lynx, but I'm not too sure it'll run the .swf file unless it has Flash Player for some odd reason.

    It's kind of annoying that this would take me maybe five seconds to do in Windows if I downloaded and installed a port of the 'cron' function. Which I can't do because, again, the server runs Linux and I have to work with that instead of trying to install something on the Windows machine of every possible viewer.

  9. #9

    Default Re: Gtk-Warning: Cannot Open Display

    Hm, I can't edit my post anymore. Oh well: I tried links, which is like lynx, and no dice. Like I suspected, no Flash Player = no running the .swf.

  10. #10
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Gtk-Warning: Cannot Open Display

    well, you can if you really want to:

    - install X on the server (if it is not there already)

    - configure firefox to run flash, see http://tinyurl.com/6r84sb

    - set up a cron on the server to twice daily
    -- launch X
    -- run firefox http://[somewhere.com]/[someFlash].swf
    -- shutdown X

    that should work, AND not tie up unnecessary resources running X 24x7

    --
    DenverD (Linux Counter 282315)
    A Texan in Denmark

Page 1 of 4 123 ... 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
  •