[mythtv-users] Fwd: Re: Fwd: Re: Mythfrontend freezing and VDPAU?
Stephen Worthington
stephen_agent at jsw.gen.nz
Thu Mar 5 02:33:31 UTC 2020
On Wed, 4 Mar 2020 10:23:57 -0800, you wrote:
>>
>> I just put those 2 (with some extra checking) eg:
>>>
>>
>> #!/bin/bash
>> while true ; do
>> systemctl isolate multi-user.target
>> if [ $? -eq 0 ]; then
>> systemctl isolate graphical.target
>> exit 0
>> fi
>> sleep 1
>> done
>>
>> (something along those lines - untested)
>> Put in a script and call the script from irexec
>>
>>
>>
>>> Allen
>>>
>>> _______________________________________________
>>
>>
>I tested the script suggested and found two problems.
>1) I need to call my script with sudo. I don't know how to do that but if
>it works on the next myth lockup I assume I can figure it out or ask for
>help.
>2) I had to change one line so the script is now
>#!/bin/bash
> while [ true ]; do
> systemctl isolate multi-user.target
> if [ $? -eq 0 ]; then
> systemctl isolate graphical.target
> exit 0
> fi
> sleep 1
> done
>
>I obviously cannot test it from the local terminal but it works fine from
>my desktop upstairs. My plan is to try this the next time that myth hangs
>up so I can confirm that it works under the actual locked conditions. My
>fear is that it is the video card itself that is hung and that this will
>not clear it.
>
>Putting it in a button should be easy but not sure about the permissions
>part.
>
>Allen
Any script or program can be set up in the /etc/sudoers file (or
better in /etc/sudoers.d) to be able to be run with sudo without
asking for a password. If you still want proper security, you need to
make sure that anyone who can run the script is unable to modify it,
so write permission should be set to root only. I do this for my
mythtv-systemctl-helper.sh file that is run from mythfrontend to shut
down or restart the system.
See this post for full details:
https://lists.gt.net/mythtv/users/625993
More information about the mythtv-users
mailing list