Mailing List Archive

mythwelcome + mythfrontend + fluxbox
I am setting-up a FE/BE combo system. I am using mythwelcome to start
the mythfrontend in case of a crash. I have set-up an ~/.xsesssion file
as follows:

#!/bin/sh

startfluxbox &
xset s off
mythwelcome

This almost works, except the frontend does not come to the top of the
windows (nor does mythwelcome). I always have to connect a keyboard and
use alt-tab to get it to raise to the top.

I've done many searches and tried several solutions without luck. Has
anyone else solved this?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythwelcome + mythfrontend + fluxbox [ In reply to ]
On Thu, 15 Jul 2021 21:12:27 -0700, you wrote:

>I am setting-up a FE/BE combo system. I am using mythwelcome to start
>the mythfrontend in case of a crash. I have set-up an ~/.xsesssion file
>as follows:
>
>#!/bin/sh
>
>startfluxbox &
>xset s off
>mythwelcome
>
>This almost works, except the frontend does not come to the top of the
>windows (nor does mythwelcome). I always have to connect a keyboard and
>use alt-tab to get it to raise to the top.
>
>I've done many searches and tried several solutions without luck. Has
>anyone else solved this?

It looks wrong to run "startfluxbox" in parallel but then run xset and
mythwelcome before you can be sure that fluxbox (your window manager)
is actually running. The window manager is responsible for handling
which window is on top. I would try adding a "sleep 1" before the
xset command. It may need to be a longer delay if the machine is not
booting from an SSD or is an older (slower) CPU. So try that and see
if it helps. If it does, then what would be even better would be
waiting until it was known that fluxbox was up and running. So
something like this might work:

while true
do
sleep 0.1
pgrep -x "fluxbox" >/dev/null
if [ $? -eq 0 ]; then
break
fi
done
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythwelcome + mythfrontend + fluxbox [ In reply to ]
On 7/15/21 11:09 PM, Stephen Worthington wrote:
> It looks wrong to run "startfluxbox" in parallel but then run xset and
> mythwelcome before you can be sure that fluxbox (your window manager)
> is actually running.
I liked the hypothesis here and I gave it a try. Seemed very promising
at first because the "Waiting for Database" message was on the screen
(which had not happened before).

Unfortunately, once the database connection was made I could not see the
frontend anymore. I am someone stumped.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythwelcome + mythfrontend + fluxbox [ In reply to ]
On 7/18/21 2:17 PM, Bob wrote:
> I liked the hypothesis here and I gave it a try. Seemed very promising
> at first because the "Waiting for Database" message was on the screen
> (which had not happened before).
>
> Unfortunately, once the database connection was made I could not see
> the frontend anymore. I am someone stumped.

Wouldn't it be better for fluxbox to start mythwelcome?

https://wiki.archlinux.org/title/fluxbox#Autostart

Doug
Re: mythwelcome + mythfrontend + fluxbox [ In reply to ]
Doug Lytle <support@drdos.info> writes:

> On 7/18/21 2:17 PM, Bob wrote:
>> I liked the hypothesis here and I gave it a try. Seemed very
>> promising at first because the "Waiting for Database" message was on
>> the screen (which had not happened before).
>>
>> Unfortunately, once the database connection was made I could not see
>> the frontend anymore. I am someone stumped.
>
> Wouldn't it be better for fluxbox to start mythwelcome?

Yes. Your ~/.fluxbox/startup file should look like:

#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.

# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.

mythwelcome & # or mythfrontend &

# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.

exec fluxbox
# or if you want to keep a log:
# exec fluxbox -log "/home/work/.fluxbox/log"

----
I use fluxbox as my window manager on all my work and almost all
personal linux machines (and have done so for about 15 years with
occasional tries with other small wms).

>
> https://wiki.archlinux.org/title/fluxbox#Autostart

Ahh. The arch wiki has a page for everything!

Leo
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythwelcome + mythfrontend + fluxbox [ In reply to ]
On 20/07/2021 17:01, Leo Butler via mythtv-users wrote:
> Doug Lytle <support@drdos.info> writes:
>
>> On 7/18/21 2:17 PM, Bob wrote:
>>> I liked the hypothesis here and I gave it a try. Seemed very
>>> promising at first because the "Waiting for Database" message was on
>>> the screen (which had not happened before).
>>>
>>> Unfortunately, once the database connection was made I could not see
>>> the frontend anymore. I am someone stumped.
>>
>> Wouldn't it be better for fluxbox to start mythwelcome?
>
> Yes. Your ~/.fluxbox/startup file should look like:
>
> #!/bin/sh
> #
> # fluxbox startup-script:
> #
> # Lines starting with a '#' are ignored.
>
> # Applications you want to run with fluxbox.
> # MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
>
> mythwelcome & # or mythfrontend &
>
> # And last but not least we start fluxbox.
> # Because it is the last app you have to run it with ''exec'' before it.
>
> exec fluxbox
> # or if you want to keep a log:
> # exec fluxbox -log "/home/work/.fluxbox/log"
>
> ----
> I use fluxbox as my window manager on all my work and almost all
> personal linux machines (and have done so for about 15 years with
> occasional tries with other small wms).
>
>>
>> https://wiki.archlinux.org/title/fluxbox#Autostart
>
> Ahh. The arch wiki has a page for everything!
>
I might add that it is customary in scripts like this to specify the full path to the executable, to
avoid obscure problems. It doesn't hurt, anyway.

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythwelcome + mythfrontend + fluxbox [ In reply to ]
On 7/21/21 1:50 AM, Mike Perkins wrote:
> I might add that it is customary in scripts like this to specify the
> full path to the executable, to avoid obscure problems. It doesn't hurt,
> anyway.

I removed my ~/.xsession file and added mythwelcome to my fluxbox
startup file, but mythfrontend does not automatically raise to the top,
I still have to use alt-tab to change the order. :(

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org