I would like to launch firefox from mythfrontend. This is on a dedicated appliance, where mythfrontend uses the entire screen. Normally the only control of mythtv is via an IR remote control through lirc, although there is also a mini keyboard that is a PITA to use but much less so than standing next to the box with a wired full size keyboard held in one hand.
I tried changing the browser from "internal" to "firefox" (it is on the path) and saving that. However, after that I couldn't figure out how to make it start from the mythfrontend menu. In one place in the information center there was a panel which could hold links, the instructions said to "add bookmark", unfortunately a command which I couldn't find anywhere.
Mostly I want this for watching youtube. We have been using an Nvidia Shield for that, and the playback was great, but the Android youtube client has become increasingly unpleasant and intrusive to use. Ideally once firefox starts we could switch back and forth between it and mythfrontend. However, since mythfrontend uses the entire screen, and so would firefox, I don't see how that would work using the IR remote. Currently they are on different HDMI channels, so we just tell the TV to go from one to the other.
Thanks.
launch firefox from mythfrontend?
Moderator: Forum Moderators
Re: launch firefox from mythfrontend?
Some methods that could be adapted for what you want to do are on GitHub.
Ted | My blog
-
- Senior
- Posts: 563
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: launch firefox from mythfrontend?
I don't know that this would work, I don't use a remote and have never looked into what you can map their keys to.
Your Linux box is almost certainly running multiple virtual terminals (ctrl+alt+f1, ctrl+alt+f2, etc to switch between them, your X session is usually on f7). And while you probably only have one X session running, there's no reason you can't run more than one at a time (see the -display or -- options to xinit for example). So in theory, you could probably start multiple X sessions, one that just runs mythtv, one that just runs firefox, etc (I know you can do this much), and then map a couple unused buttons on the remote (here's where I'm not sure) to switch between sessions.
Of course, if Wayland can even handle multiple sessions I suspect the systemd will find a way to break it. I don't use either, so multiple sessions work fine for me.
EDIT: Actually, if you can map your remote's keys you could probably just do the same basic thing above but with your window manager instead of virtual terminals and X sessions. For example, ctrl-f1/ctrl-f2/etc to switch between desktops in XFCE, alt-1/alt-2/etc for WindowMaker... I used to use different X sessions because I wanted to use different users, but if you just want the same user running myth and ff, attacking the wm might be simpler.
Re: launch firefox from mythfrontend?
Have you tried MythBrowser the browser plugin?
I know for sure on current master which now uses QtWebEngine the YouTubeTV web page works OK but it does require some simple tricks to get it to work. The good thing with that is you don't even need a mouse for that interface you just need the arrow keys, space/enter and escape to navigate.
I was thinking of adding a simple YouTube plugin or adding it to MythNetVision but it seems there is very little enthusiasm for it so probably wont bother.
Re: launch firefox from mythfrontend?
Sorry for the long delay, I only got around to this today. Using heyted's tools from here
https://htpc.tedsblog.org/2020/03/htpc- ... ncher.html
I now have it launching firefox. Thanks. For some reason the button in the mythfrontend menu still says "chrome" even though I changed all instances of that to firefox, probably I missed one, or I need to reinstall to make the changes visible. Once it launches navigation works normally with a keyboard.
Unfortunately, navigation is totally nonfunctional with the remote.
The browser comes up on heyted's page with a list of streaming sources but the arrow keys on the remote do nothing. The "exit" button on the remote is mapped like this
in the ~/.lirc/firefox file (my system is still using the old lirc, not the one built into the kernel) and like all other keys, it is ignored. On the keyboard Alt+F4 exits from the kiosk and goes back into mythtv, which works normally with the remote, using its lirc configuration file. I double checked and buttons {left,right,up,down} map to config {left,right,up,down} in both the firefox and mythtv lirc files. If it matters the linux box is running ubuntu 18.04.1 LTS with xfce4.
https://htpc.tedsblog.org/2020/03/htpc- ... ncher.html
I now have it launching firefox. Thanks. For some reason the button in the mythfrontend menu still says "chrome" even though I changed all instances of that to firefox, probably I missed one, or I need to reinstall to make the changes visible. Once it launches navigation works normally with a keyboard.
Unfortunately, navigation is totally nonfunctional with the remote.
The browser comes up on heyted's page with a list of streaming sources but the arrow keys on the remote do nothing. The "exit" button on the remote is mapped like this
Code: Select all
button = exit
config = Alt+F4
Re: launch firefox from mythfrontend?
If having ~/.mythtv/mainmenu.xml in the home folder is the method being used to add a MythTV frontend menu button to launch the browser, this file can be edited to change the name of the menu button.
I am not familiar with the non-kernel LIRC method, so maybe someone else can help with that. I have used ir-keytable with the IR capabilities baked into the kernel (does not require application specific settings in the keycode file) to control the browser.
Note: The lv.tedsblog.org site may be going away soon, but the html files are on GitHub. The ~/.htpc-browser-launcher/htpc-browser-launcher.cfg file can be edited, and "False" can be entered for the applicable setting to not have the browser open this site.
I am not familiar with the non-kernel LIRC method, so maybe someone else can help with that. I have used ir-keytable with the IR capabilities baked into the kernel (does not require application specific settings in the keycode file) to control the browser.
Note: The lv.tedsblog.org site may be going away soon, but the html files are on GitHub. The ~/.htpc-browser-launcher/htpc-browser-launcher.cfg file can be edited, and "False" can be entered for the applicable setting to not have the browser open this site.
Ted | My blog