PDA

View Full Version : QSettings::SystemScope in Linux



jpn
4th May 2006, 13:27
Does anyone else have problems using QSettings::SystemScope in Linux?
According to the docs (http://doc.trolltech.com/4.1/qsettings.html#platform-specific-notes), folder /etc/xdg/ is used for storing system-wide settings.
At least in my Kubuntu Breezy installation, this folder doesn't have a write permission for normal users.

Btw. TT seems to be updating their website and I couldn't access Task Tracker to check if this is a known issue..

nupul
4th May 2006, 13:46
I think this folder generally does have write permissions for users other than root, infact I too have the same problem!! In my observation most programs that have written to /etc/xdg/ have done so when I was logged in as root. I don't think this folder is given write permissions on all systems .... i use SuSE 10.

Cheers

Nupul

jacek
4th May 2006, 13:54
AFAIR Qt3 behaves in the same way (i.e. normal users can't change the system-wide settings unless you change the access rights). IMO the reason is simple --- it's administrator's responsibility to setup the system and normal users shouldn't mess with that.

jpn
4th May 2006, 15:21
Oh, that's a pity. I'm working on an application which has a remote user authetication. I had planned to store all application's user specific settings in a global location, so that all users of the application could retain their personal settings regardless of the current OS login. QSettings::SystemScope would've been perfect for this.. :) (..and actually, in Windows, it still is)

I suppose there is no distro/desktop independant folder like /etc/something which would have write permission for all users by default. Yuck, that even sounds like a horrible security threat.

jacek
4th May 2006, 15:43
I had planned to store all application's user specific settings in a global location, so that all users of the application could retain their personal settings regardless of the current OS login. QSettings::SystemScope would've been perfect for this..
Just set the correct access rights for the .conf file and everything will work.