Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#4593 closed defect (fixed)

/.mythtv/ should *not* get created (blank homedir)

Reported by: xris Owned by: Nigel
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


Myth should probably error out if no homedir is defined, rather than creating a .mythtv directory a /

Attachments (1)

homeenvvar.patch (796 bytes) - added by andrei@… 13 years ago.
set HOME environment variable on Win32

Download all attachments as: .zip

Change History (13)

comment:1 Changed 13 years ago by Nigel

Owner: changed from Isaac Richards to Nigel
Status: newaccepted

Yes, if HOME isn't set, QDir::homeDirPath() seems to return '/'. The real question is, what should it be in this situation? Current directory? /tmp?

comment:2 Changed 13 years ago by Nigel

Resolution: fixed
Status: acceptedclosed

(In [15796]) Prevent startup if no home directory path, and suggest env. var change. Thanks to Mike Dean for the clarifying discussion. Closes #4593

comment:3 Changed 13 years ago by andrei@…

Resolution: fixed
Status: closednew

Even though QDir::homeDirPath() will use other environment variables on Windows when HOME is not set, libdvdnav needs HOME, and segfaults without it.

Changed 13 years ago by andrei@…

Attachment: homeenvvar.patch added

set HOME environment variable on Win32

comment:4 Changed 13 years ago by taco_mel@…

An additional comment - I run my mythbackend out of inittab, and since HOME is not set there, this change would have broken my ability to do this without hacking around at the environment in a wrapper script. I have since commented out the new "return false" so that this works again, but I would suggest that preventing startup might be harsh.

comment:5 Changed 13 years ago by xris

How about a way to pass in a HOME var on the commandline?

comment:6 Changed 13 years ago by andrei@…

How many windows users (home users, not developers) do you know who are aware that an application can be launched with command line parameters?

comment:7 Changed 13 years ago by xris

How many "windows users" are running mythbackend straight out of inittab?

My suggestion wasn't to replace the env var check, but to add extra functionality for the edge case.

comment:8 Changed 13 years ago by sphery <mtdean@…>

Though, really, with a proper command line, the user can pass HOME (or any other environment variable) even when running directly out of inittab. I.e. as in Option 2 at (but without the need for a VT in the case of mythbackend, where the user can use either /bin/su - or /bin/sh -l to get a proper environment) or

comment:9 Changed 13 years ago by anonymous

Please back out the change that prevents startup if the HOME var is not found. Printing a warning is fine, but not preventing startup. This entire ticket is a non issue.

comment:10 Changed 13 years ago by stuartm

Anon - please state your reasons on the -dev list. We aren't going to respond to anonymous requests, especially when you don't give any reasons.

comment:11 Changed 13 years ago by stuartm

Resolution: fixed
Status: newclosed

Can we open a new ticket for the issue of setting HOME etc on other platforms? They aren't strictly related to this ticket.

comment:12 Changed 13 years ago by stuartm

Milestone: unknown0.21
Note: See TracTickets for help on using tickets.