Install and Configure HTPC Browser Launcher
- Navigate to https://github.com/heyted/htpc-browser-launcher/releases.
- Under the latest release, download the tar.gz file and put it in your home folder.
- Open Terminal and enter "tar -xzf htpc-browser-launcher-20200329.tar.gz && cd htpc-browser-launcher-20200329 && ./install" without the quotes. Edit the release numbers if needed to match the tar.gz file name and press enter. The message "HTPC Browser Launcher was successfully installed" should appear in the terminal.
- The tar.gz file and htpc-browser-launcher-20200329 folder can be deleted
- Enter "nano ~/.htpc-browser-launcher/htpc-browser-launcher.cfg" without the quotes.
- Leave "True" for Keynav to enable it while the browser is open, or change this to "False" if you do not want to use TV remote keys to control the mouse pointer.
- Leave "True" for Unclutter to have the mouse pointer disappear when not being used, or change this to "False" if desired.
- Leave "False" for no screensaver if the screen saver and screen blanking are turned off using the operating system settings or if Gnome is not being used, or change this to "True" if desired.
- Leave "True" for the streaming links site setting to have the browser open the site mentioned above, or change this to "False" if desired.
- Leave "chromium-browser" if it is installed and is the desired browser. Change this to "google-chrome" or "firefox" without the quotes if desired.
- Press Ctrl+s to save the file.
- Press Ctrl+x to exit nano.
Optional Additional Software
Keynav allows control of the mouse pointer using a dynamically moving and shrinking grid in which the pointer jumps to a selected position instead of the conventional method of moving the pointer to the new position. Kevnav requires an X11 or Xorg graphical system such as that used by Ubuntu 18.04 and 20.04, and it is not compatible with Wayland. By default, HTPC Browser Launcher uses the 1, 2, 3, 4, 6, 7, 8, and 9 number keys to move the selected grid, the 5 key moves the pointer and left clicks, the 0 key moves the pointer and right clicks, and the p key starts a sequence. These keys must be included in the ir-keytable rc_keymps file to control the pointer with a TV remote. Unclutter is used to make the pointer disappear when not being used.
- Open Terminal.
- Enter "sudo apt install keynav" without the quotes.
- Enter "sudo apt install unclutter" without the quotes.
- Enter "sudo nano /etc/default/unclutter" without the quotes.
- Change START_UNCLUTTER="true" to START_UNCLUTTER="false" to disable starting it when booting.
- Press Ctrl+s to save the file.
- Press Ctrl+x to exit nano.
Enable Launching and Closing the Browser with a TV Remote
- Edit your ir-keytable /lib/udev/rc_keymaps file to include KEY_F14 and KEY_Pause. KEY_F11 is also useful to toggle full screen mode. F11 cannot toggle the full screen mode in kiosk mode (see notes below).
- Reboot the computer.
- In Ubuntu, open Settings, select Devices and Keyboard.
- Scroll to the bottom, and click + to create a custom shortcut.
- For the name, type "Launch Browser" without the quotes.
- For the command, type "./.htpc-browser-launcher/htpc-browser-launcher.py" without the quotes.
- For the shortcut, press the button on the remote that is assigned to KEY_F14.
- Click Add.
- Click + to create a custom shortcut.
- For the name, type "Close Active Window" without the quotes.
- For the command, type "wmctrl -c :ACTIVE:" without the quotes.
- For the shortcut, press the button on the remote that is assigned to KEY_Pause.
- Click Add.
Notes
- Chrome and Chromium start in full screen mode, and Firefox starts in the full screen kiosk mode.
- Firefox not always starting full screen is a known issue. Comments are welcome and appreciated about this.
- The script can be started using a command line switch which overrides the browser in the configuration file. The switch options are "google-chrome", "chromium-browser" and "firefox".
This browser launcher appears simple and useful. I will check it out. Thanks for providing this.
ReplyDeleteYou're welcome.
Delete