[mythtv-users] Shutdown check (a few more things please)
Andrew Williams
andy at tensixtyone.com
Fri Dec 28 09:08:19 UTC 2007
On 28/12/2007, David Brodbeck <gull at gull.us> wrote:
>
> On Dec 27, 2007, at 4:12 PM, glenhawk at optusnet.com.au wrote:
> > Does anyone have any suggestions? Is there anyway to modify the
> > shutdown check script (shown below) to check for a desktop login as
> > well as a MythTV client login?
First of all, do you mean check for remote mythtv clients connected to
the backend?
>
> Find something that runs when you're logged in, but *only* when you're
> logged in, and grep for it in the output of 'ps ax'. I use kdesktop.
>
Checking your TTY is the best, for example:
nikdoof at mythtv ~ $ w
09:02:57 up 3 days, 19:50, 2 users, load average: 0.06, 0.10, 0.09
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
mythtv tty1 Mon13 3days 43:29 0.00s -bash
nikdoof pts/0 09:02 0.00s 0.00s 0.00s w
Remote user is logged into pts/0, standard pseudo terminal, where as
the actual mythfrontend on this shared front/backend is running a X
session and logged into tty1.
If your login is managed by xdm/kdm/gdm then when your on the inital
login screen it will not create a login session, and therefore not
showing the "w" listings.
---
Andrew Williams
w: http://nikdoof.net
e: andy at tensixtyone.com
More information about the mythtv-users
mailing list