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?


-- 
Setaroi
------------------------------------------------------------------------



0
Setaroi
7/31/2008 3:46:04 PM
opensuse.org.help.applications 21533 articles. 1 followers. Follow

32 Replies
4206 Views

Similar Articles

[PageSpeed] 49

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


-- 
Novell dead? Been hearing that line for 10 years.. & fortunately
been deaf to hear it! Still gives a kick to experience their
innovations & now with Linux it makes my era an even more fun time to
be living in, got to love it! *WJM*
------------------------------------------------------------------------
Magic31's Profile: http://forums.opensuse.org/member.php?userid=289
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Magic31
7/31/2008 4:36:03 PM
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...


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
7/31/2008 4:56:03 PM
Setaroi;1848905 Wrote: 
> 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' (http://tinyurl.com/6f2v39)

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 :)


-- 
Novell dead? Been hearing that line for 10 years.. & fortunately
been deaf to hear it! Still gives a kick to experience their
innovations & now with Linux it makes my era an even more fun time to
be living in, got to love it! *WJM*
------------------------------------------------------------------------
Magic31's Profile: http://forums.opensuse.org/member.php?userid=289
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Magic31
7/31/2008 5:16:04 PM
Magic31;1848911 Wrote: 
> 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' (http://tinyurl.com/6f2v39)
> 
> 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).

Magic31;1848911 Wrote: 
> 
> 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.


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
7/31/2008 5:36:04 PM
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?


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/6/2008 2:16:05 PM
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
0
DenverD
8/6/2008 3:34:27 PM
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. :(


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/6/2008 5:16:03 PM
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. :(


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/6/2008 5:46:03 PM
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
0
DenverD
8/6/2008 5:56:23 PM
This sounds like exactly what I've been looking for.

It appears that X is already installed on the system, but I'm not
entirely clear on how to get it to work. It appears you're supposed to
start it with xinit or something like that, but then I get this error:

-Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.-

...maybe I should start a new topic for this.


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/6/2008 6:26:04 PM
> -Server is already active for display 0

well, perhaps X _is_ already running..
type this at a command line

top -bn1 | grep Xorg
(that X must be capital, all other lower case)

and, then

top -bn1 | grep  firefox

and get the results of both back to the forum..

BUT, if you got nothing from the firefox try, then type

firefox http://[the complete URL to the *.swf]

and if you get an error, record it back to here...if you do not get an 
error then say so, and REPEAT the

top -bn1 | grep  firefox

and bring it back here..

good luck..

-- 
DenverD (Linux Counter 282315)
A Texan in Denmark
0
DenverD
8/6/2008 7:38:56 PM
Okay, this is what I get from top -bn1 | grep Xorg:
3056 root      15   0 27476  12m 4008 S    0  0.6  25:16.64 Xorg

top -bn1 | grep Firefox returns nothing. It just goes right back to the
command prompt, doesn't even display a blank line.

I ran Firefox, and got the same error as before: (firefox-bin:10121):
Gtk-WARNING **: cannot open display:

Just to check, I tried top -bn1 | grep Firefox again after that and
still nothing.


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/6/2008 8:06:03 PM
hmmmm...well, we (you actually) need someone to tell you how to clear 
that firefox error...

and all my "help" was for naught....i will do more, but tomorrow...it is 
bed time in Denmark!

-- 
DenverD (Linux Counter 282315)
A Texan in Denmark
0
DenverD
8/6/2008 8:13:43 PM
[QUOTE=DenverD]hmmmm...well, we (you actually) need someone to tell you
how to clear that firefox error...

and all my "help" was for naught....i will do more, but tomorrow...it
is bed time in Denmark!

[/QUOTE]
Hi
You should be looking at using the X virtual frame buffer (from the
xorg server extras rpm). Have a google on Xvfb and this links may help;
http://testdrive.mapinfo.com/TECHSUPP/MIPROD.NSF/0/a832a07452b9a0e385256f8000760f68?OpenDocument

-- 
Cheers Malcolm ��� (Linux Counter #276890)
Ubuntu 8.04 x86 Kernel 2.6.24-19-generic
1 day, 3:18, 2 users, load average: 0.13, 0.13, 0.04
GPU GeForce 6600 TE/6200 TE - Driver Version: 173.14.12

0
Malcolm
8/6/2008 9:30:48 PM
Setaroi wrote:

> 
> 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. :(
> 
> 

I went back and read through the previous posts... fun!

You wish to execute firefox, to load a .swf, to trigger a database call, to
preload a cache...  (OMG!  isn't there a nursery rhyme like this?  ... that
lived in the house that jack built... right?)

Does the .swf need to be interacted with at all?  or simply the invocation
thereof does the deed?

If no interaction is required... then it's very doable (I won't say simple,
if it were 'simple', you'd already be off and running, right?)

If interaction IS required, I'd recommend using a VNC server on the linux
box, to which you could connect from windows and issue the commands needed.

But, considering you mentioned a cron job... something that can be triggered
to run, allowed to run for 'x' minutes, then killed... is what you need.

A quick clarification:  firefox is a 'gui' application, thus it needs to
talk to a 'server', this server is pointed to by an environment variable,
DISPLAY.  If you're local to the machine, it's usually ':0.0', which
implies 'localhost:0.0'.  If you're physically distant, you can actually
use the power of a bigger machine, and display the output on a terminal (an
X-terminal) somewhere else.  Pretty handy.  If you connected from a unix
box, there are ways to forward the X-server connection so everything works. 
Windows doesn't support that natively, and solutions for that involve more
software on your windows box.  Not a good solution.  So when you log on
from windows/putty, DISPLAY is empty (undefined actually).  When firefox
goes looking for it, it fails... thus the error message.

Ok, back to the main stream of consciousness here...

This might get long... raise your hand if you have questions, I'll try to
provide a complete solution.

Please install the xorg-x11-server-extra package, which will install Xvfb.

from an ssh connection (as root), the following command will install the
package:

zypper install xorg-x11-server-extra

I ran that on my 10.3 server here, it'll work properly... although it may
take a few minutes (!!) to complete... yast/zypper prior to 11.0 is/was
slow.

I went away to do some research, seems Malcolm has beat me to the
punchline... {Smile}

yes, we're going to use Xvfb to create a 'virtual' display, to be used to
run firefox, to load the .swf, to trigger the database, to load the cache,
to save the users... STOP IT!!! Sorry... got carried away.

A cron job would want to perform these steps:

start xvfb to create a virtual display
start firefox with a command line argument giving the URL to read the .swf
wait for some period of time to let FF load, execute, run the flash, etc.
kill xvfb, which will kill FF, which will hopefully have loaded the .swf...
to trigger the... ARGH!

So... something akin to the following:

#!/bin/bash
#
# Super-duper cronjob script to build jack's house
#
# this is the URL we're hoping to access with firefox
URL="http://www.example.com/path/to/trigger.swf"
#
# our display number (37's a good number, right?)
DISPLAY=":37"
#
# Create the virtual framebuffer, with a unique (hopefully) DISPLAY number
echo "============ Starting Xvfb"
/usr/bin/Xvfb $DISPLAY -screen 0 1024x768x24 -ac  &
#
# short pause to allow Xvfb to start
sleep 5
#
# Start firefox
echo "============ Starting Firefox"
/usr/bin/firefox --display=$DISPLAY "$URL"  &
#
# short pause to allow firefox to start
# yes, this could be removed, but...
sleep 5
#
# Wait 60 seconds, so FF can do its job
echo "============ Sleeping"
/bin/sleep 60
#
# kill firefox
# need to be careful, it might not be the only one active
# argument to pkill must match command which started program
echo "============ Kill firefox"
/usr/bin/pkill -9 -f "/usr/bin/firefox --display=$DISPLAY"
#
# kill Xvfb server, same precautions
echo "============ Kill Xvfb"
/usr/bin/pkill -9 -f "/usr/bin/Xvfb $DISPLAY"
#
# All done


==========================

All paths are specified, since cronjobs don't have much of an environment. 
Script tested thoroughly here on 10.2, 10.3 and 11.0.

But there ARE some caveats....

If root has never executed firefox yet, firefox will STALL, as it needs
someone to accept the license.  Dug through the firefox source briefly, no
command line options to bypass that, didn't expect any really.

So I've created tarballs of the 'default' setups for firefox 2.x and 3.x to
untar into your root home directory, which will cause firefox to start
normally.

You may download a tarball containing the two firefox profiles, the script
(as above) and a short README/setup document from my server at:

http://www.lornix.com/files/cronjob-trigger.tar.gz

I hope this can help you.

Take Care,

Loni

-- 
L R Nix
lornix@lornix.com
0
L
8/7/2008 12:37:16 AM
> I went back and read through the previous posts... fun!

thank you for finding this mess and giving it some direction!!

that is, i was WAY out of my league!

-- 
DenverD (Linux Counter 282315)
A Texan in Denmark
0
DenverD
8/7/2008 8:07:27 AM
lornix;1852362 Wrote: 
> AWESOME goes here

Hey, that worked (nearly) perfectly. Everything started up, Firefox
ran, it executed the .swf, closed Firefox...

It gave this error on the line where it tried to pkill Xvfb, though:
gecko: Fatal IO error 11 (Resource temporarily unavailable) on X server
:37.0.

Maybe I need to insert a 'sleep' statement between the two pkill lines
(I'm thinking it might be trying to pkill Xvfb while it's still
technically 'running' Firefox?)...


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/7/2008 2:36:03 PM
Hm. I've also noticed that there seems to be some trouble with
successively running the script. I haven't put it in a cronjob yet, I
wanted to test it first. The first time I ran it everything ran fine.
Yay! Then I shut down the BlazeDS server and turned it back on, which
clears the cache. Then I tried the script again. I figured this would
simulate the data expiring naturally (the cache flushes itself every 24
hours). The second time I tried to run it, all the little warnings about
'font paths' that previously appeared were gone, and it no longer
appears to be running the .swf (data isn't getting pulled, anyway).
It's also still giving me the error when I try to pkill Xvfb, so maybe
that's part of it.


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/7/2008 3:26:03 PM
Setaroi wrote:

> 
> lornix;1852362 Wrote:
>> AWESOME goes here
> 
> Hey, that worked (nearly) perfectly. Everything started up, Firefox
> ran, it executed the .swf, closed Firefox...
> 
> It gave this error on the line where it tried to pkill Xvfb, though:
> gecko: Fatal IO error 11 (Resource temporarily unavailable) on X server
> :37.0.
> 
> Maybe I need to insert a 'sleep' statement between the two pkill lines
> (I'm thinking it might be trying to pkill Xvfb while it's still
> technically 'running' Firefox?)...
> 
> 

The "Fatal IO Error..." error is a consequence of using pkill to terminate
firefox, since we have no way to 'gracefully' close firefox, it has to be
killed.  This causes the shell to complain about it.  I tried very hard to
eliminate that error (and it's message)... no luck.  But it *is* an
expected error, along with the corresponding one for Xvfb if it occurs.  No
harm, they're just complaining about being shot down.

Loni
-- 
L R Nix
lornix@lornix.com
0
L
8/7/2008 5:29:59 PM
Hm, okay. So they're just grumpy. That I can live with (be quiet old
man! ;))

The script still doesn't seem to be working if I call it a second time,
though. I've been trying to see if it's just a matter of waiting, but
that doesn't seem to be the case.


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/7/2008 5:46:03 PM
Setaroi wrote:

> 
> Hm. I've also noticed that there seems to be some trouble with
> successively running the script. I haven't put it in a cronjob yet, I
> wanted to test it first. The first time I ran it everything ran fine.
> Yay! Then I shut down the BlazeDS server and turned it back on, which
> clears the cache. Then I tried the script again. I figured this would
> simulate the data expiring naturally (the cache flushes itself every 24
> hours). The second time I tried to run it, all the little warnings about
> 'font paths' that previously appeared were gone, and it no longer
> appears to be running the .swf (data isn't getting pulled, anyway).
> It's also still giving me the error when I try to pkill Xvfb, so maybe
> that's part of it.
> 
> 

Hmmm, I ran it a considerable number of times here during testing, but the
difference being I didn't have the trigger.swf to run.

If Xvfb isn't complaining about the font stuff, then it's not getting run it
seems, which would then prevent firefox from starting, to run the .swf,
to... (you know, that dang sequence is contagious)

Have you tried simulating that sequence of events manually?

Can you access that .swf from your current machine? Trigger it, close
firefox, restart BlazeDS server, open firefox, trigger .swf again.

There might be cache issues on the firefox side, could be issues with
the .swf watching the time too.

Did Xvfb get killed properly the first time you ran the script?  after you
run the script, if you type

ps ax | grep Xvfb

Do you see any processes there?  (ignore the 'grep', it always finds itself)

Could you post the entire output of the script?  

I always get TWO 'Killed' lines, one after "=== kill firefox", the other
after "=== kill xvfb", with the 'Fatal IO Error' in between.

hmmm, maybe the error from firefox/gecko is causing the script to exit
prematurely... there is a shopt in bash that controls that.  wonder if
yours is set.  let's see...

in bash, the 'set -e' turns on this "feature", so I suppose 'unset -e' would
turn it off.  but it's obscure and rarely used.  unlikely cause.

How about this, comment out (or remove) the firefox pkill line.  This will
prevent the error from occurring at that point.

firefox will die when the Xvfb is killed, so you'll likely get an error
message still, but it'll be too late to affect the script.

Loni


-- 
L R Nix
lornix@lornix.com
0
L
8/7/2008 5:47:58 PM
Okay, here's what I get when I run the script now (I should have tried
to catch the output when it was working...oh well...). This is with the
'pkill Firefox' line commented out, and I had also changed the sleep
time after Firefox runs to 20m (like I said, slow server):
============ Starting Xvfb
Could not init font path element /usr/share/fonts/TTF/, removing from
list!
Could not init font path element /usr/share/fonts/OTF, removing from
list!
============ Starting Firefox
============ Sleeping
============ Kill Xvfb
<prompt goes here> # gecko: Fatal IO error 11 (Resource temporarily
unavailable) on X server :32.0.

Yeah, it output the error message into my prompt. I had to type CTRL+C
before I could do anything else.

When it was working, there would be some more kvetching about the fonts
after the Starting Firefox line, and I could see from the window I had
running the server that data was being pulled (I set up some lines in
the class files to output as they go through).

I did test my ability to access the .swf manually the old way; I turned
on the server, pointed IE (on my Windows box) at the URL, got the .swf
which loaded the cache, turned off the server, and tried again. Still
works.

If I run the Xvfb line manually, replacing $DISPLAY as appropriate,
everything seems to go fine. I have to start a new PuTTY window since
the current one is now occupied with running Xvfb, but okay. When I run
Firefox...nothing happens. I don't get back to the command prompt, but I
don't get an error message and it doesn't pull data. The two error
messages from above about the font path appear in the window where Xvfb
is running, though. When I press CTRL+C to cancel the Firefox process, I
get this in the Xvfb window:

FreeFontPath: FPE "/usr/share/fonts/misc/" refcount is 2, should be 1;
fixing.

Plus another repetition of the previous two errors.

And I ran that check you asked about. After running 'ps ax | grep Xvfb'
after running the script the only thing that came up was grep Xvfb.


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/7/2008 6:36:03 PM
Argh, I hate this edit timer. Anyway, I should clarify that the line
where it was running Firefox worked before. I checked and made sure
it's going to the same address, so I'm not sure what the problem is
there.


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/7/2008 6:46:03 PM
Setaroi wrote:

> 
> Argh, I hate this edit timer. Anyway, I should clarify that the line
> where it was running Firefox worked before. I checked and made sure
> it's going to the same address, so I'm not sure what the problem is
> there.
> 
> 

You needn't press ctrl-c to get your prompt back, it's waiting for you, just
that it printed the prompt, then printed the 'fatal io error'.  no worries,
just press enter. {Smile}

If you see grumbling about fonts when firefox loads, that's good too, not to
worry there.

{Chuckle}  you started the .swf twice with IE... not with Firefox... there's
a difference. But it sounds like the script DOES work as intended.

when you started the Xvfb manually, and opened another putty window to
execute firefox... did you execute firefox with the appropriate $DISPLAY
value *AND* the full web address?  ($URL)?

I believe that with the commenting out of the 'pkill firefox' command,
everything is working as it should.

A thought!! (I get them once in a while!)

If you were to boot from a LIVE CD of any distro, you could run the script
(with a slight modification) and see the results as it worked to test it.

Boot from the live cd on your windows machine
log into server using console and ssh command, just as you would using putty

ssh -X user@system
-or-
ssh -X user@ip.addr.ess  (just in case DNS doesn't work as expected in live
cd)

the -X option causes X11 to be forwarded to your system.

edit the script, changing the 

DISPLAY=":37"

line to read

DISPLAY="localhost:10"

which is what default ssh X11 forwarding *usually* defaults to. (fingers
crossed!)

and run the script.  You'll get a failure of Xvfb to start, since the
DISPLAY you're trying already exists, and then firefox should start up, do
it's job and (oh pooh!) .. not be killed since it wasn't running on Xvfb. 
but you could 'file->quit' yourself after it finished.

remember to undo the changes to the DISPLAY variable in the script when
you're done testing.

You might give it a few hours and try the script again, watching to see if
it works (or not).  there might be some sort of limitation on when the .swf
can be run again.

{Sigh}  I'm trying!  Honest!!

Loni
-- 
L R Nix
lornix@lornix.com
0
L
8/7/2008 9:48:30 PM
Setaroi wrote:
> (be quiet old man! ;))

don't bring me back into this again, please! Loni is doing a great job

-- 
old man (Linux Counter 282315)
A Texan in Denmark
0
DenverD
8/8/2008 7:33:25 AM
Setaroi;1852845 Wrote: 
> Argh, I hate this edit timer. Anyway, I should clarify that the line
> where it was running Firefox worked before. I checked and made sure
> it's going to the same address, so I'm not sure what the problem is
> there.
Just wanted to add in you sure have the stamina to get this sorted! 
Hope you find your solution soon.

Cheers,
Wj


-- 
Novell dead? Been hearing that line for 10 years.. & fortunately
been deaf to hear it! Still gives a kick to experience their
innovations & now with Linux it makes my era an even more fun time to
be living in, got to love it! *WJM*
------------------------------------------------------------------------
Magic31's Profile: http://forums.opensuse.org/member.php?userid=289
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Magic31
8/8/2008 7:56:03 AM
DenverD;1853191 Wrote: 
> don't bring me back into this again, please! Loni is doing a great job

Aww, I didn't mean you. ;) I just had this mental image of an old man
in a rocking chair grumbling about 'those whippersnappers and their
pkill, always giving me fits'.

Aaanyway, back to Loni:

I did make sure to replace $DISPLAY and $URL with the appropriate
values when I ran Firefox manually. I can't really try the Live CD
testing method because it's not my Linux box and I highly doubt they'd
give me permission to muck about with the installer.

I thought it might be good to wait a bit as well, so I left it alone at
the end of the day yesterday and tried it again just now. Still
nothing.

It's kind of strange that the first couple of times I'd see these font
error messages after the Firefox line and it would work, then they
stopped after a couple of runs. 

(I also tested the .swf with Firefox on my end and it works fine.
Strange.)


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/8/2008 1:36:03 PM
Setaroi wrote:

> I did make sure to replace $DISPLAY and $URL with the appropriate
> values when I ran Firefox manually. I can't really try the Live CD
> testing method because it's not my Linux box and I highly doubt they'd
> give me permission to muck about with the installer.
> 
> I thought it might be good to wait a bit as well, so I left it alone at
> the end of the day yesterday and tried it again just now. Still
> nothing.
> 

Well, I meant booting the live cd on your windows machine that you typically
connect from using putty.

You might also try removing / reinstalling the .mozilla subdir in root's
home.  maybe something went weird.

Loni

-- 
L R Nix
lornix@lornix.com
0
L
8/8/2008 2:01:31 PM
Okay, I tried reinstalling Firefox...nope, that doesn't work either. I'm
starting to wonder if it's even running Firefox, since I've discovered
that I can pass it a bad URL or even entirely comment out the line
where $URL is assigned and not get an error message or anything. If
it's trying to access a variable that hasn't been assigned, shouldn't
Bash (or something) go 'OMG no way D:' and bomb out?


-- 
Setaroi
------------------------------------------------------------------------
Setaroi's Profile: http://forums.opensuse.org/member.php?userid=6981
View this thread: http://forums.opensuse.org/showthread.php?t=391511

0
Setaroi
8/8/2008 2:36:03 PM
Setaroi wrote:

> 
> Okay, I tried reinstalling Firefox...nope, that doesn't work either. I'm
> starting to wonder if it's even running Firefox, since I've discovered
> that I can pass it a bad URL or even entirely comment out the line
> where $URL is assigned and not get an error message or anything. If
> it's trying to access a variable that hasn't been assigned, shouldn't
> Bash (or something) go 'OMG no way D:' and bomb out?
> 
> 

Well, let's step back a moment... what is the URL you're requesting?

Does it contain any '&' characters?

Yes, I'm sort of brainstorming and shotgunning things... this worked here
consistantly for me when I coded it... but of course, I didn't have your
url to work with either.

Perhaps something was inadvertantly changed in the script?  Could you post
the current contents of your version of the script?

Loni

-- 
L R Nix
lornix@lornix.com
0
L
8/9/2008 4:05:02 AM
> I can't really try the Live CD
> testing method because it's not my Linux box and I highly doubt they'd
> give me permission to muck about with the installer.

wait...i thought it was _your_ box, on your network!

do you have permission to set up a cron job on that box?

i wonder out loud because assuming it IS possible to provoke FF to arise and 
strike the db--eventually a cron will be required *IF* you are gonna meet your 
goal of having that 24/7 box do the work that you are now doing manually (if you 
remember) twice a day..

and, now i wonder out loud if there isn't a better way: i've never set up apache 
(or even looked at the docs), but i almost have to assume it has some built in 
scheduling means to do some routine activities....and, wouldn't it be able to 
schedule a .swf hit every 12 hours, therein?

-- 
DenverD (Linux Counter 282315)
A Texan in Denmark
0
DenverD
8/9/2008 7:03:50 AM
DenverD wrote:

>> I can't really try the Live CD
>> testing method because it's not my Linux box and I highly doubt they'd
>> give me permission to muck about with the installer.
> 
> wait...i thought it was _your_ box, on your network!
> 
> do you have permission to set up a cron job on that box?
> 
> i wonder out loud because assuming it IS possible to provoke FF to arise
> and strike the db--eventually a cron will be required *IF* you are gonna
> meet your goal of having that 24/7 box do the work that you are now doing
> manually (if you remember) twice a day..
> 
> and, now i wonder out loud if there isn't a better way: i've never set up
> apache (or even looked at the docs), but i almost have to assume it has
> some built in scheduling means to do some routine activities....and,
> wouldn't it be able to schedule a .swf hit every 12 hours, therein?
> 

To me, the horror is the usage of flash to do actual work.  AND the fact
that it needs to be running for 20+ minutes to do the work... sounds like
the flash is actually doing the database pull... instead of triggering the
cache preload... it's DOING the cache preload.   ewwwwww.

Of course, if it's a database cache preload... why not have a SQL script do
the same thing... flash is supposed to be for games, gaudy web pages and
demo/tutorials... {sigh}  but to each their own...

A simple script could query any database much more efficiently, and much
more portably.  Of course, the Microsoft mindset of "if it ain't a gui, it
ain't for youi" seems to hold here.

Yes, I *can* program in actionscript/flash... but I wouldn't do anything
mission critical in it... icky.

Loni

-- 
L R Nix
lornix@lornix.com
0
L
8/10/2008 5:30:07 AM
Reply:

Similar Artilces:

Gtk-WARNING **: Cannot open display
Hello, I am new in using SuseLinx version 10.2. My machine used to boot up fine and I arrived in the GUI desktop. I have installed VMWare Server 2.0 and this was running fine. I was able to login with the Firefox browser that was installed. When booting now, I end up in a command prompt. Giving the command "desktop-launch" I wait 10 seconds and get the error (firefox-bin:5239): Gtk-WARNING **: cannot open display: I researched some forums, tried a couple of things, but can not get it back working again. :( - when I execute -xhost localhost- I get -xhost: unable to o...

Gtk-WARNING **: cannot open display
OES2 Had this error when trying to run visual app as root when logged to the server as a user The working solution was: Run visudo Add env_keep+="DISPLAY XAUTHORITY" to the Defaults line so it may look like: Defaults !lecture,tty_tickets,!fqdn,env_keep+="DISPLAY XAUTHORITY" Then sudo and gksudo won't mess up with 'Gtk-WARNING **: cannot open display:' from here: 'Gtk-WARNING **: cannot open display: [Archive] - Ubuntu Forums' (http://ubuntuforums.org/archive/index.php/t-166863.html) Might help somebody else Seb ...

SSH: Gtk-WARNING **: cannot open display: :0
Hi, I've used multiple operating systems; Fedora, Debian and Ubuntu and with them all I have installed and worked with SSH. I recently started to look into openSuSE just to get a flavour of using it day to day. My problem is the following with SSH: I have a computer and a server (in my tests there is someone logged onto the Server). I SSH into the server (as the user that is logged into the Server) and try to get Zenity to display a dialog on the server. In the other flavours I have used I just use: export DISPLAY :0 Then called Zenity, but I get Gtk-WARNING **: cannot ...

gedit No protocol specified Gtk-WARNING cannot open display
I'm getting following error in openSUSE 11.1 Beta 2 when I try to open gedit (after becoming root / super user) : ::::: openSUSE111:~ # gedit No protocol specified (gedit:4800): Gtk-WARNING **: cannot open display: :0.0 ::::: Though gedit does open as a regular user. - Many thanks in advance. -- *hobbyist / enthusiast :* Windows Vista Ultimate / Debian Unstable / *OpenSUSE 11.1 Beta 2* :) ------------------------------------------------------------------------ $ su - <password> # gedit -- <>---><^> ----------------------...

Using gedit as root: "Gtk-WARNING **: cannot open display:"
I've been searching for a permanent solution for some time now, but the threads containing the same error message never seem to be about the same issue. *I want to:* I'm not trying anything fancy, all I want to do is open a write-protected file with gedit as root, like so: Code: -------------------- # sudo gedit /usr/bin/deadbeef -------------------- ..but every time I try, no matter the file, I get this error message: Code: -------------------- (gedit: [process #] ): Gtk-WARNING **: cannot open display -------------------- *I alread...

[beginners-help@perl.org: ezmlm warning] Bounce warning...what can i do?
Below it's a mail i received from ezmlm program...complains about some mails send to me from the list are bouncing. What can i do about it? I use gmail (you can see that) and mutt MUA. Thank you. ----- Forwarded message from beginners-help@perl.org ----- Date: 16 Dec 2012 12:54:08 -0000 From: beginners-help@perl.org To: athanasios.zygouris@gmail.com Subject: ezmlm warning Hi! This is the ezmlm program. I'm managing the beginners@perl.org mailing list. I'm working for my owner, who can be reached at beginners-owner@perl.org. Messages to you from the beginn...

HELP!HELP!HELP!HELP!HELP!HELP!
I was using powerbuilder4.0 a month ago I decided that migrate it to PB7.0 When Im using 4.0, in datawindows I was using extra colums additional to stores procedure. I mean that for example; stored proc. returns 4 columns. I was using 2 extra columns to modify something from client. But I cant do the same thing in PB7.0. How can I do that??? please help. Gurcan yucel gyucel@infina.com.tr "I was using 2 extra columns to modify something from client." what does this mean that you added to the result set? If so then just goto the SQL and add a param. Then set the...

Help Help Help Help Help Help
------=_NextPart_000_0074_01C2960E.EBE13A30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Can someone please help me. I have installed mysql on Unix Solaris and it works fine I have Perl installed previously which is working and with which i have installed other perlmodules before and are working fine. I have also installed DBI and it works fine with the Sybase drivers which i have installed. When i tried to install the Msql-Mysql-modules-1.2219 drivers i get the following error. # make /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/...

Help with a Help application
 HelloI am looking for an application that can be integrated with my ASP.NET application to provide context sensitive help. When users navigate to different pages and click on the help icon, they should be able to see the help for the page they are on. The help text will be manually entered by a team that is not technically inclined.Currently, we have ASPX/HTML pages that holds the help information and link it from the header that has the help icon.Please let me know which products I can look at.Thanks! what I did: I put an help button on my masterpage....Javascript code on the maste...

The Hendrix-mozilla.org system is very helpful to us in the family. It helps us easily open our internet which makes us very comfortable with it.
Name: Truman Bagani Gayyed Product: Mozilla Suite Summary: The Hendrix-mozilla.org system is very helpful to us in the family. It helps us easily open our internet which makes us very comfortable with it. Comments: It enables us to open the internet very easily. It makes us very comfortable. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13 From URL: http://hendrix.mozilla.org/ ...

Gtk warning while launching application
after installation of a s/w for authentication from my ISP I couldnt launch the same and the following msg appears pradipta@linux-auem:~> sudo sifyconnect root's password: pradipta@linux-auem:~> (sifyconnect:5062): Gtk-WARNING **: cannot open display: -- pradiptasaha ------------------------------------------------------------------------ pradiptasaha wrote: > after installation of a s/w for authentication from my ISP I couldnt > launch the same and the following msg appears > > pradipta@linux-auem:~> sudo sifyconnect > root's passw...

Help Help Help Help
i need to create a crosstab report using Crystal reprot for VS 2003 i face aproblem when i need to order my Fileds by their names my data must be like this Basic Cola Housing Gross Deduction1 Deduction2 Deduction3 Net but when i run my report it give my a not sorted data acutally i have acode field which can i order field using it. but i don't knwo how to do thisSo..................? Select Report tab | |-->Select Record Sort expert Choost the fields you want to sort --Select the corresponding sort direction f...

help help help help
Name: chef mario Email: chefusa_at_pacbell.net Product: Firefox Summary: help help help help Comments: Heard great reports about Firefox!!! Downloaded & installed Firefox !!!! Lost All my very very valuable BOOKMARKS!!! CAN ANYONE HELP!!!!! All bookmarks were in Internet Explorer Did bookmark transfer to Firefox. Seem the Fox eat all m,y bookmarks Need serious help anyone. chef mario Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 ...

How to either open a particular application or open a particular window of the same application
I'm sure this a FAQ, but I've never done this so it is new to me. I have an application, written in PB but shouldn't matter, that has a window with a resultset. When a the user double clicks on a row within the resultset I want to launch another PB application passing in the claim_id from the row, and if the application is already running then I want the application to open the claim window using the claim_id passed in. I'm guessing to do the first part would be simply calling the RUN command with the clai_id as a command parameter. run "c:\apps\btoclaim...

Web resources about - Gtk-Warning: Cannot Open Display - opensuse.org.help.applications

Resources last updated: 12/23/2015 1:08:43 PM