Re: [Rhythmbox-devel] timed shutdown



On Mon, 2007-06-04 at 10:45 +0200, Gilles Dartiguelongue wrote:
> Le dimanche 03 juin 2007 à 00:25 -0400, Matt a écrit :
> > James Kern wrote:
> > > You could also just run "sleep 60m; killall -15 rhythmbox" in a
> > > terminal.
> > >
> > > -James Kern
> > >
> > > On Sat, 02 Jun 2007 11:50:40 -0700
> > > Jon Phillips <jon rejon org> wrote:
> > >
> > >   
> > >> On Sat, 2007-06-02 at 14:33 -0400, Nachiket Gokhale wrote:
> > >>     
> > >>> Hello,
> > >>>
> > >>> First of all, I'm sorry if this is a FAQ. I was wondering if I could
> > >>> setup Rhythmbox to play for a given time, say an hour or so, and
> > >>> then shut itself down.
> > >>>
> > >>> Thanks,
> > >>>
> > >>>  -Nachiket
> > >>>       
> > >> >From the commandline with cron:
> > >>
> > >> http://en.wikipedia.org/wiki/Crontab
> > >>
> > >> Just make a line for running it and then one where you kill it.
> > >>
> > >> Jon
> > >>     
> > 
> > There are times when I use
> > 
> > sleep 1h && rhythmbox-client --pause
> > 
> > but, that doesn't stop the program...
> 
> probably because you need DBUS_SESSION_BUS_ADDRESS set in your shell
> environment ?

# find DBUS session bus for this session
DBUS_SESSION_BUS_ADDRESS=`grep -z DBUS_SESSION_BUS_ADDRESS \
        /proc/$pid/environ |sed -e 's/DBUS_SESSION_BUS_ADDRESS=//'`

# use it
DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS \
        rhythmbox-client --pause

reference : http://gnome-hacks.jodrell.net/hacks.html?id=82



-- 
Ritesh Khadgaray
ॐ मणि पद्मे हूँ
LinuX N Stuff
Ph: +919970164885
Eat Right, Exercise, Die Anyway.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]