! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
configuration files in wrong "$HOME" directory
Status:
CLOSED: WONTFIX
Product:
Libxfce4util
Component:
General

Comments

Description Piotr Sawuk 2004-10-05 09:58:34 CEST
older versions did search for configuration-files in the directory
indicated by the environment variable $HOME, while this version does
use ~$USER/ or whatever the operating system does report. this is
clearly a bug in my opinion (if not just an inconsistency), as it
does prevent the user from selecting his own favourite location for
configuration-files within a session. I would be happy if future versions
would at least use the $HOME variable thereby allowing me to have multiple
configuration-files for a single user, especially as KDE and GNOME suffer
from the same bug, and actively developed alternatives are getting rare...
Comment 1 Jasper Huijsmans editbugs 2004-10-05 10:33:18 CEST
Xfce 4.2 uses the freedesktop basedir spec. So what you want to do is set
$XDG_CONFIG_HOME and $XDG_CACHE_HOME. They default to ~/.config/ and ~/.cache/.

I don't know why it doesn't use $HOME, or even if it should. 

PS
Benedikt, I'm assigning this to you, since you're most familiar with that code I
think.
Comment 2 Benedikt Meurer editbugs 2004-10-05 11:14:01 CEST
Xfce 4.2 (like Xfce 4.0) use the home directory given in /etc/passwd by default.
$HOME is only used as a fallback. Please read the XDG base directory spec, thats
the standard, and thats what Xfce follows, if you want to use different
config/cache/data locations.
Comment 3 Piotr Sawuk 2004-10-11 09:40:24 CEST
In the XDG base directory spec 6.0 the /etc/passwd file isn't even mentioned!
All I read there is $HOME being the default location for the user's stuff.
Also, $HOME isn't even used as a fall-back for xfce4 in all cases. Try:

Create a user, delete his home-directory, log in as that user without starting
any window-manager, create a directory in /tmp, "export HOME=$PWD" inside
that new directory, start xfce4, alter the configuration, kill everything
which got started by xfce4, re-start it, and the configuration is lost,
even though $HOME does exist as a valid fall-back!

Of course someone creating his home-directory in /tmp doesn't plan to have
much persistent data, but it's still unexpected behaviour. I would be happy
if that would change in future versions, so that problems with mounting
/home wouldn't result in reconfiguring xfce everytime I re-login...

But thanks for the hint with the XDG environment-variables, somehow they
didn't get mentioned in any documentation I've read so far. They certainly
solve my little problem, even though they introduce a little inconvenience
of additional typing and actually remembering their names...
Comment 4 Benedikt Meurer editbugs 2004-10-11 12:25:50 CEST
In specifications and other documents $HOME doesn't neccessarily refer to the
environment variable HOME, but more often to the users home directory, which is
preferably taken from the NSS system (/etc/passwd is one possible source, but it
could be possibly everything from good old NIS to LDAP databases).

I haven't seen the problem with the $HOME fallback you describe so far, but I'll
investigate into this, as it really looks like a bug to me.

In addition, you are right, we really need to mention the XDG basedir spec in
the Xfce documentation, esp. since Xfce is the first desktop that conforms to
this spec.
Comment 5 Piotr Sawuk 2004-10-12 09:49:01 CEST
update:

the XDG basedir spec I read was 0.6 and not 6.0 of course. also I should
mention that I do not have any session-manager installed, so startxfce4
does directly start xfce-mcs-manager and xfwm4. but that shouldn't make
much of a difference since a session-manager isn't supposed to manage
configuration-files anyway -- although "strings" applied to those 2
programs and the libs in the mcs-plugins directory did not contain
any HOME, only in /usr/lib/libxfce* the string XFCE4HOME was found...

export XDG_DATA_HOME=$PWD/.xfce4/xffm
export XDG_CONFIG_HOME=$PWD/.xfce4/settings
export XDG_CACHE_HOME=$PWD/.xfce4

didn't help either: the configuration still was searched in and written
to the non-existant directory mentioned in passwd. rpm reports 4.0.5
as the version-number for all those packages.
Comment 6 Benedikt Meurer editbugs 2004-10-12 15:34:36 CEST
Ups, I wasn't aware that you are talking about Xfce 4.0. Forget everything I
said, since it only applies to Xfce 4.1/4.2.

For Xfce 4.0: Some programs failed to take into account the setting of XFCE4HOME
and used the hardcoded path relative to whats returned by NSS. It is unlikely
that this will be fixed, as the next stable release (4.2) is going to be
released soon.
Comment 7 Jasper Huijsmans editbugs 2004-10-27 13:56:18 CEST
Sounds like it should be closed as WONTFIX.
Comment 8 Jasper Huijsmans editbugs 2004-11-12 16:06:34 CET
Xfce 4.2 uses different file locations and should not have this problem.

Bug #361

Reported by:
Piotr Sawuk
Reported on: 2004-10-05
Last modified on: 2009-07-15

People

Assignee:
Benedikt Meurer
CC List:
0 users

Version

Attachments

Additional information