You are not logged in.

#1 2008-10-31 05:57:28

colbert
Member
Registered: 2007-12-16
Posts: 809

setting home environment variable

I have mythbackend as daemon in rc.conf, and it does not start on boot, with the following error from the log:

2008-10-30 21:52:49.737 Using runtime prefix = /usr, libdir = /usr/lib
2008-10-30 21:52:49.789 Cannot locate your home directory. Please set the environment variable HOME or MYTHCONFDIR
2008-10-30 21:52:49.933 Failed to init MythContext, exiting.

Now I put this in my ~/.bashrc:

# Set $HOME variable
export $HOME=/home/myuser

But this will not kick-in on boot, right? How do I set it so it happens at boot before the mythbackend daemon starts?

TIA for any help smile

Offline

#2 2008-10-31 08:09:55

Statix
Member
From: Hangzhou, China
Registered: 2008-02-16
Posts: 240

Re: setting home environment variable

You can always just add it to the daemon's start up script I suppose.

nano /etc/rc.d/mythbackend


Madly in love with Arch64, Openbox, DotA, and of course... penguins!
Happy to help if you're not a Help Vampire. Use your wonderful resources like ArchWiki, Google, and our wonderful search page.

Offline

#3 2008-10-31 16:23:47

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: setting home environment variable

colbert wrote:

export $HOME=/home/myuser

That's a syntax error, for a start. Remove the dollar sign.

Offline

#4 2008-10-31 17:58:49

PeteMo
Member
From: H'Burg, VA
Registered: 2006-01-26
Posts: 191
Website

Re: setting home environment variable

I don't think setting a variable in ~/.bashrc is going to help at boot time...

Offline

#5 2008-10-31 22:48:01

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: setting home environment variable

Yes I was seeing the error show when I opened a shell. I don't want to mess with the mythbackend script as I constantly update myth via svn and it gets overwritten.

Where can I add it so it takes effect at boot??

Thanks smile

Offline

#6 2008-10-31 23:19:10

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: setting home environment variable

You could probably create a new script and load it before the myth one


Website - Blog - arch-home
Arch User since March 2005

Offline

#7 2008-10-31 23:54:46

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: setting home environment variable

As per the wiki http://wiki.archlinux.org/index.php/Myt … kend_setup
you add it to /etc.rc.conf

HOME="/root"

I have in my rc.conf

MYTHCONFDIR=/home/mythtv

Have a look here as well http://wiki.archlinux.org/index.php/Myt … _Variables smile

Offline

#8 2008-11-01 01:41:57

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: setting home environment variable

Thanks so much my0pic! If any errors on reboot I'll post back but I think that will work big_smile smile

Offline

Board footer

Powered by FluxBB