maemo.org Bugzilla – Bug 2837
osso-gtk.defs assumes that user is the only valid user
Last modified: 2009-10-22 07:57:07 UTC
You need to log in before you can comment on or make changes to this bug.
SOFTWARE VERSION: (Control Panel > General > About product) 2.2007.50-2 STEPS TO REPRODUCE THE PROBLEM: useradd foo su - foo EXPECTED OUTCOME: mkdir $USER/.osso ACTUAL OUTCOME: mkdir: cannot create directory '/home/user/.osso': Permission denied cp: cannot stat '/home/user/.osso/current-gtk-theme': Permission denied cp: cannot stat '/home/user/.osso/current-gtk-key-theme': Permission denied REPRODUCIBILITY: (always/sometimes/once) always EXTRA SOFTWARE INSTALLED: skype, fbreader, lxdoom, hp calculator, battle gweled, kagu OTHER COMMENTS: I understand that having more then the 'user' user account on a N8x0 is not actually supported. But the file /etc/osso-af-init/osso-gtk.defs makes a hardcoded assumption that 'user' is the only one, when there is no real reason why it can't at least work if another user logs in. I have modified my osso-gtk.defs to change the line: HOME=/home/user ;# needed for some root processes to: HOME=/home/$USER ;# needed for some root processes And now it works for more then just 'user'.
Created an attachment (id=709) [details] Changes the osso-gtk.defs file so it works with any arbitrary user Changes one line to allow for other users beside root and 'user' to log into a shell on the device.
you might want to use "${USER}" so that spaces in the user name work (a shell script, right?)
Erik, can you update your patch according to Danny's comment?
I think this was there originally (in 770) because part of the current theme stuff was installed/linked under the device user and when they were missing, things broke. Things should have improved by now, i.e. things shouldn't break when theme is missing, just look funny. On multiuser (supporting) systems new users should get default theme, not "user" user's theme. There should probably be related bug about how well applications work with whatever Maemo Gtk users as default theme. > mkdir: cannot create directory '/home/user/.osso': Permission denied Does this come from osso-gtk.defs too???
So, is this something that makes sense to change/"fix" for Fremantle?
Hmm, so is this WONTFIX/INVALID nowadays, or shall I import this for Fremantle?
(In reply to comment #6) > Hmm, so is this WONTFIX/INVALID nowadays, or shall I import this for Fremantle? > I'm not sure if we still use that. I think we need to define those anyway somewhere. Please report to make sure.
Created an attachment (id=1068) [details] Change all variable calls to use curly braces Per the other posters suggestion, this patch changes all variable usage to using curly braces.
Created an attachment (id=1069) [details] assign $USER or user if $USER is not set This is the same patch as the original, but it uses the ${VAR:-var} syntax to make sure that HOME is assigned to something.
Fixed as of hildon-initscripts-1.19-1: https://stage.maemo.org/svn/maemo/projects/haf/tags/hildon-initscripts/1.19-1 Note that it's not enough to useradd foo because useradd doesn't create /home/foo. This is a separate issue. Thus, to create a new user, you have to useradd -m foo
Cool. Thanks a lot! Setting Target Milestone.
Marking patches of interest to Diablo (Maemo4) community updates, please excuse the noise.