[Solved] Running Mythfrontend at Login
[Solved] Running Mythfrontend at Login
Rebuilding a 0.39 frontend on Ubuntu 18.04. All the mythfrontend files are installed from PPA.
Figured out the GDM3 autologin to the mythtv user. Now how the heck do I get mythfrontend to auto-run at login? All my old methods aren't working.
Thanks for the help.
Figured out the GDM3 autologin to the mythtv user. Now how the heck do I get mythfrontend to auto-run at login? All my old methods aren't working.
Thanks for the help.
Re: Running Mythfrontend at Login
Search for "Startup Applications", run that, select add
Re: Running Mythfrontend at Login
Thanks for the help jfbauer but I'm looking the command line answer. In my other frontend I do basic X configuration through /home/mythtv/.xsession. But for some reason it isn't being read in this default installation of Ubuntu 18. Is this some GDM3 magic I am not aware of? Is there something to be done to enable .xsession?
Re: Running Mythfrontend at Login
I am sure, but you could try ~/.Xclients instead of .xsession.
Re: Running Mythfrontend at Login
Nope. .Xclients does not do it.
I can't seem to figure out how to auto-run mythfrontend under GDM3.
So https://www.mythtv.org/wiki/Frontend_Au ... _Autostart Says .gnomerc. I've got that. Just the way the wiki says. But it's still not running.
Re: Running Mythfrontend at Login
So this is an old Ubuntu bug:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1895781
There is a workaround in the bug post to get .gnomerc to be read
https://bugs.launchpad.net/ubuntu/+sour ... ug/1895781
There is a workaround in the bug post to get .gnomerc to be read
-
- Senior
- Posts: 266
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Running Mythfrontend at Login
I had autologin working and launching mythfrontend on Ubuntu 22.04, but I'm pretty resource constrained and it was running a bunch of additional stuff I didn't need (like processes to support an email client I don't use, on a machine without internet access, that's used ONLY as a frontend). I tried switching to a light-weight window manager, but it wouldn't take. I tried masking services with systemctl, even removing execute permissions, and something just kept undoing my changes.
I don't mind fighting with an unfamiliar desktop manager, but when it starts fighting back, we're done. Time to step outside. Let's see how you like runlevel 3.
Not the most elegant solution in the world, but it just works.
[EDIT: Added icewm. Turns out you need a window manager when using an external video player (at least if you want to pass keyboard input to it). Tried ratpoison, but it made my screen blink when playing AV1 files].
[EDIT: Making the switch to Devuan, which has NO SYSTEMD! I didn't install a desktop environment, so it defaulted to runlevel 2, which is cool. Both this, and the agetty entry for autologin are handled in /etc/inittab: ]
I don't mind fighting with an unfamiliar desktop manager, but when it starts fighting back, we're done. Time to step outside. Let's see how you like runlevel 3.
Code: Select all
#switch to default runlevel 3
$ sudo systemctl set-default multi-user.target
# setup mythtv for automatic login on tty1
$ sudo EDITOR=vi systemctl edit getty@tty1.service
### Editing /etc/systemd/system/getty@tty1.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin mythtv --noclear %I $TERM /usr/bin/startx
### Lines below this comment will be discarded
...
# yeah, that blank ExecStart= line is actually necessary
# set ksh to start X on tty1 (probably .bashrc for most people)
$ cat .kshrc
...
if [ "`tty`" == "/dev/tty1" ]; then
/usr/bin/startx
fi
# set X to run mythfrontend
$ cat ~/.xsession
#!/bin/sh
if [ -x $HOME/.xinitrc ]
then exec $HOME/.xinitrc
else exec xterm -geometry 80x24+0-60 -ls
fi
$ cat ~/.xinitrc
/usr/bin/icewm &
/usr/bin/mythfrontend
$ chmod 755 ~/.xsession ~/.xinitrc
# Reboot, just for good measure
[EDIT: Added icewm. Turns out you need a window manager when using an external video player (at least if you want to pass keyboard input to it). Tried ratpoison, but it made my screen blink when playing AV1 files].
[EDIT: Making the switch to Devuan, which has NO SYSTEMD! I didn't install a desktop environment, so it defaulted to runlevel 2, which is cool. Both this, and the agetty entry for autologin are handled in /etc/inittab: ]
Code: Select all
# The default runlevel.
id:2:initdefault:
#1:2345:respawn:/sbin/getty --noclear 38400 tty1
1:2345:respawn:/sbin/agetty --autologin mythtv --noclear 38400 tty1
Last edited by white_haired_uncle on Thu Oct 19, 2023 7:28 pm, edited 2 times in total.
Re: Running Mythfrontend at Login
@kbocek: Something like this (what I use): systemctl edit --user --force --full mythtv-frontend.service
and add:
Starts the FE after I login to the GUI. Modify the mythfrontned command switches to your liking.
and add:
Code: Select all
[Unit]
Description=MythTV Frontend
Wants=mythtv-backend.service
After=mythtv-backend.service graphical-session.target
[Service]
Environment=XDG_SESSION_TYPE=
ExecStart=/usr/local/bin/mythfrontend --loglevel warning --jumppoint 'TV Recording Playback' --systemd-journal
Type=notify
[Install]
WantedBy=graphical-session.target
Re: Running Mythfrontend at Login
So I finally just moved to nodm as documented in the wiki. Reads .xsession just fine and loads the frontend.
New issue though. I've got my remote configured and it is reading button presses just fine. But when I'm in the frontend a single press seems to repeat endlessly. Eventually the frontend locks up.
Any thoughts on what might be causing that?
I see notes here but no fix:
viewtopic.php?t=4426
The fix is said to be to change the kernel. I have tried changing to 5.8.0 and 5.8.18. The repeating keys problem does not go away. So again, anyone have any ideas?
====================
Edit:
I discovered lircd was running in the background. I stopped and disabled lircd and the issue was resolved.
New issue though. I've got my remote configured and it is reading button presses just fine. But when I'm in the frontend a single press seems to repeat endlessly. Eventually the frontend locks up.
Any thoughts on what might be causing that?
I see notes here but no fix:
viewtopic.php?t=4426
The fix is said to be to change the kernel. I have tried changing to 5.8.0 and 5.8.18. The repeating keys problem does not go away. So again, anyone have any ideas?
====================
Edit:
I discovered lircd was running in the background. I stopped and disabled lircd and the issue was resolved.