Re: [Freevo-users] $HOME for /usr/bin/freevo start ?

2009-01-31 Thread Jim Duda
I used Duncan's suggestion of defining a site-wide asound.conf.
Each of my freevo boxes has it's own configuration
I created a soft link from /etc/asound.conf to /tmp/asound.conf
Each freevo node has a unique /tmp directory.
During startup, I copy the proper .asoundrc to /tmp/asound.conf

This works fine.  I have reverted back to running freevo as root.
I couldn't get freevo to run as a normal user, and have mplayer
fetch .asoundrc via $HOME.  Very odd, must be something with 
my LTSP setup.

Michael Brown wrote:

 I'm curious about your LTSP set-up.  How many freevo terminals do you have, 
 and are they similar in hardware configuration, or different?  How do you 
 find it as far as maintenance goes?  How fast do the terminals boot up?  

I have 3 different terminals. Boot takes maybe 15 seconds (or less) before 
freevo starts. 
Each has a different hardware configuration.  Mainly different video and audio 
hardware.
The maintenance isn't too bad.  I use yum for software updates, I only have to 
update one file system.
I can either do the updates on the server using yum --installroot=, or, telnet 
to one of the freevo
boxes and run yum update as root.

 
 In my set-up, I have a central server running Debian which functions as a 
 Freevo web  record server, Samba file  print server, IMAP mail, Misterhouse 
 home automation, etc., which is the hub of my set-up.  It presently tftp 
 boots the MediaMVP, and serves up the content to it and two other Freevo 
 boxes which have identical motherboards, but vary in remotes and other 
 hardware.  They started life as Ubuntu 6 boxes, and have been 
 frankensteined with upgrades from both Ubuntu 7 and Freevo Debian packages 
 and their dependencies.  Needless to say, they're getting to be a lot of work 
 to maintain, and I've been thinking about an LTSP or other net-booted disk 
 image ideas.

Me too.

 
 To get there sometime in the future, I started by having a 'freevo' user on 
 each box, with the same UID/GID.  My two Freevo frontends mount the freevo 
 home directory, which has a ~/.freevo directory, which contains just the 
 cache at the moment.  So, the cache gets shared between the three machines 
 (main/record server which hosts /home, and the two frontends).  Eventually, 
 I want to have one local_conf.py in the freevo home, and have it include the 
 appropriate /etc/freevo/local_conf.py which would contain the 
 machine-specific configuration items.

I configure each of my freevo boxes using a different $HOME.
The $HOME is defined by the hostname (livingroom, bedroom, gym).
My freevo service scripts sets $HOME before starting freevo, freevo finds the 
proper local_conf.py
So, each freevo box has a different $HOME/.freevo/local_conf.py, which allows 
for unique configuration.
The services loaded on each box is controlled by /etc/lts.conf.
lts.conf allows me to start different services and load different modules as 
necessary.
I've found that LTSP isn't friendly with the new upstart methodology found in 
fedora 9 and beyond, 
which requires me to massage the LTS rc scripts.  

For some reason, $HOME doesn't propagate to mplayer, mplayer doesn't fetch 
$HOME/.asoundrc
This issue started this thread.

 
 In the mean time, one AMD 3500 box boots off a SATA2 7200rpm disk (boots to 
 Freevo menu in about 45 seconds), and the other in the bedroom boots off a 
 slw Kingston 4GB flash drive in about 2 minutes.  They're functional 
 enough, but it's getting to be a pain to maintain them.
 
 Thanks for your time!
 
 /Mike
 
 
 
 - Original Message 
 From: Jim Duda j...@duda.tzo.com
 To: freevo-users@lists.sourceforge.net
 Sent: Wednesday, January 28, 2009 10:30:21 AM
 Subject: [Freevo-users] $HOME for /usr/bin/freevo start ?
 
 I run freevo on different diskless computer machines in my house.
 I use a modified version of the LTSP scripts for bootstrap from a tftp server.
 I have to modify the scripts to keep LTSP4.2 compatible with newer versions 
 of fedora.
 I've tried numerous ways to boot freevo automatically, all of which I get to 
 work somehow, 
 but most are usually hacks.
 
 My distro is basically fedora 9 which boots from a central server.
 
 The easiest method I've found is to run freevo as root (right or wrong) 
 and start freevo as a server from rc.d/init.d
 
 
 SNIP
 
 Thanks,
 
 Jim
 
 
 
   __
 Looking for the perfect gift? Give the gift of Flickr! 
 
 http://www.flickr.com/gift/
 
 --
 This SF.net email is sponsored by:
 SourcForge Community
 SourceForge wants to tell your story.
 http://p.sf.net/sfu/sf-spreadtheword


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Freevo-users mailing list

Re: [Freevo-users] $HOME for /usr/bin/freevo start ?

2009-01-29 Thread Duncan Webb
Jim Duda wrote:
 I run freevo on different diskless computer machines in my house.
 I use a modified version of the LTSP scripts for bootstrap from a tftp server.
 I have to modify the scripts to keep LTSP4.2 compatible with newer versions 
 of fedora.
 I've tried numerous ways to boot freevo automatically, all of which I get to 
 work somehow, 
 but most are usually hacks.
 
 My distro is basically fedora 9 which boots from a central server.
 
 The easiest method I've found is to run freevo as root (right or wrong) 
 and start freevo as a server from rc.d/init.d
 
 Recently, I inadvertently deleted my freevo filesystem, and lost my backups, 
 losing all my scripts. I've recovered most of my scripts, and repaired my 
 backup processes :-)
 
 One thing I haven't restored is my method for automatically starting freevo 
 as a service.  For the life of me, I cannot recall how I hacked it to work.

Easy enough, I use init level 4 and simply have an init script that
contains loadproc /usr/bin/freevo -fs

 
 I cannot explain some behaviour, I'm hoping someone can shed some light.
 
 I want to run freevo as root, however, use an alternate HOME directory (not 
 /root).
 
 In my service script, I set HOME before I launch freevo.

What do you want to achieve? To determine which config files and
directories freevo uses?

If so you can set environment variable such as FREEVO_LOGDIR, see the
log file they should be reported as the start.

 In a nut-shell I have:
 
 #!/bin/bash
 setenv HOME=/home/'hostname'
 /usr/bin/freevo start
 
 I am expecting that freevo runs with the new HOME directory, but as user root.
 I believe this is happening, because the log files indicate freevo is finding
 its local_conf.py in the proper place of /home/(host 
 name)/.freevo/local_conf.py
 So far, so good.
 
 What doesn't happen is when freevo spaws off mplayer.
 In this situation, mplayer is running with a HOME of /root, not 
 /home/(hostname).
 I know this because I need to have a proper .asroundrc in /root for
 my audio to work.  I am expecting mplayer to look for .asoundrc in 
 /home/(host name)/.asoundrc.  But, I've determined mlayer is using 
 /root/.asoundrc
 
 Can anyone explain why mplayer is using a different $HOME than freevo?

You can set-up a root equivalent user, UID=0 and GUI=0 in /etc/passwd
and then start freevo as this user.

You can use a system-wide asound.conf file as an alternative.

Duncan

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users


Re: [Freevo-users] $HOME for /usr/bin/freevo start ?

2009-01-29 Thread Michael Brown
Jim,

On Debian, I can use /etc/rc.local to start programs as root (or as someone 
else).  For example, this starts some stuff to assist a MediaMVP I have that 
runs mvpmc that's used to play back stuff in my wife's hobby room.

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will exit 0 on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
/usr/local/bin/mvprelay 16881 5906 6337 192.168.2.15 
sudo -u freevo vlc -I telnet 2/var/log/vlc 
exit 0

So theoretically, (and assuming it works on Fedora like it does on Debian) you 
should be able to just put in 
freevo recordserver start
freevo webserver start
freevo start
exit 0

I'm curious about your LTSP set-up.  How many freevo terminals do you have, 
and are they similar in hardware configuration, or different?  How do you find 
it as far as maintenance goes?  How fast do the terminals boot up?  

In my set-up, I have a central server running Debian which functions as a 
Freevo web  record server, Samba file  print server, IMAP mail, Misterhouse 
home automation, etc., which is the hub of my set-up.  It presently tftp boots 
the MediaMVP, and serves up the content to it and two other Freevo boxes which 
have identical motherboards, but vary in remotes and other hardware.  They 
started life as Ubuntu 6 boxes, and have been frankensteined with upgrades 
from both Ubuntu 7 and Freevo Debian packages and their dependencies.  Needless 
to say, they're getting to be a lot of work to maintain, and I've been thinking 
about an LTSP or other net-booted disk image ideas.

To get there sometime in the future, I started by having a 'freevo' user on 
each box, with the same UID/GID.  My two Freevo frontends mount the freevo 
home directory, which has a ~/.freevo directory, which contains just the cache 
at the moment.  So, the cache gets shared between the three machines 
(main/record server which hosts /home, and the two frontends).  Eventually, I 
want to have one local_conf.py in the freevo home, and have it include the 
appropriate /etc/freevo/local_conf.py which would contain the machine-specific 
configuration items.

In the mean time, one AMD 3500 box boots off a SATA2 7200rpm disk (boots to 
Freevo menu in about 45 seconds), and the other in the bedroom boots off a 
slw Kingston 4GB flash drive in about 2 minutes.  They're functional 
enough, but it's getting to be a pain to maintain them.

Thanks for your time!

/Mike



- Original Message 
From: Jim Duda j...@duda.tzo.com
To: freevo-users@lists.sourceforge.net
Sent: Wednesday, January 28, 2009 10:30:21 AM
Subject: [Freevo-users] $HOME for /usr/bin/freevo start ?

I run freevo on different diskless computer machines in my house.
I use a modified version of the LTSP scripts for bootstrap from a tftp server.
I have to modify the scripts to keep LTSP4.2 compatible with newer versions of 
fedora.
I've tried numerous ways to boot freevo automatically, all of which I get to 
work somehow, 
but most are usually hacks.

My distro is basically fedora 9 which boots from a central server.

The easiest method I've found is to run freevo as root (right or wrong) 
and start freevo as a server from rc.d/init.d


SNIP

Thanks,

Jim



  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users