[CLUE-Tech] Headless Mozilla
Collins Richey
crichey at gmail.com
Wed Oct 13 22:04:59 MDT 2004
On Wed, 13 Oct 2004 21:48:40 -0400, Angelo Bertolli
<angelo at freeshell.org> wrote:
>
>
> Chris Tubutis wrote:
>
> >On 13 Oct, Angelo Bertolli wrote:
> >
> >
> >
> >>(My default display is :0.0 )
> >>
> >>
> >
> >This brought up an idea... I was originally thinking you could set up a
> >second, dummy display (:0.1) but I couldn't easily find how to do that
> >in X and I'm too lazy to go RTFM.
> >
> >But I thought of something else... in a prior life I've used a cool
> >little utility called xvfb (X virtual framebuffer, google it) to allow
> >headless servers to run FPOS commercial software that for whatever
> >reason thinks it needs an X display. I'll bet you could set up xvfb on
> >:0.1 and then have your background client "display" to it.
> >
> >
> >
> >
> I'll see if I can make it work. But the next question is whether or not
> running later instances of Mozilla will also use that display.
>
I must be missing something in this (IMHO) overly complex thread. I
just do the following:
1. I start Firefox (same principle with Mozilla) in the startup script
for my window manager (xfce). I do have to wait a few seconds for
Firefox to claim the first desktop.
2. I set Sylpheed (you could do the same for Thunderbird, but I don't
know what the commands are) to invoke the following script. Thus,
whenever I open a url in Sylpheed, a new tab is opened in my running
Firefox instance.
--- cut here
#!/bin/sh
MOZ_NAME=firefox
MOZ_PATH="/usr/bin"
MOZ_EXE="$MOZ_PATH/$MOZ_NAME"
# Seems like pidof resides in /sbin on some boxes
# Modifying the PATH to reflect that
PATH="/sbin:${PATH}"
if [ -z "`pidof $MOZ_NAME-bin`" ]; then
# No browser running
${MOZ_EXE} $@
else
# browser already running - open a new tab
${MOZ_EXE} -remote "openURL($@ ,new-tab)"
fi
~
-- end of script
HTH
--
/\/\
(CR) Collins Richey
\/\/ "I hear you're single again." "Spouse 2.0 had fewer bugs than
Spouse 1.0, but the maintenance ... was too much for my OS."
- Glitch (tm)
More information about the clue-tech
mailing list