Opened 15 years ago

Closed 15 years ago

#2000 closed defect (fixed) appears not to inherit PATH from mytharchive

Reported by: mythtv@… Owned by: paulh
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no


I compile mythtv with --prefix=/opt/mythtv so I can remove old versions easily. I then set the mythtv user's PATH in .xsession to include /opt/mythtv/bin. This works fine for everything in mythtv except that the script fails to run mytharchivehelper, mythreplex or mythtranscode.

Creating symbolic links to these three in /usr/local/bin fixes the problem and mytharchive works fine.

I'm using r10286 at the moment.

Change History (3)

comment:1 Changed 15 years ago by paulh

Seem to work fine here?

Can you add

write("PATH: %s" % os.environ['PATH'])

at around line 3032 just after where some additional paths are appended to the PATH.

If you now re-run the script it will print out the PATH the script is using. Does it look OK?

comment:2 Changed 15 years ago by mythtv@…

I get:

PATH: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/java/bin:/opt/mythtv/bin/bin:/sbin:/usr/local/bin:/usr/bin:/opt/bin:

Which suggests that the line:

os.environ['PATH'] += "/bin:/sbin:/usr/local/bin:/usr/bin:/opt/bin:"

should maybe be:

os.environ['PATH'] += ":/bin:/sbin:/usr/local/bin:/usr/bin:/opt/bin:"

comment:3 Changed 15 years ago by paulh

Resolution: fixed
Status: newclosed

(In [10354]) Fix a problem with appending some paths to the PATH used by the script. Also ensures the script can find mythtranscode, mythreplex etc by adding the install path to the PATH used by the script. This will mostly be of importance to the web interface to the script because the user that is running the web server usually doesn't have a proper PATH setup.

Fixes #2000

Note: See TracTickets for help on using tickets.