Bug 2837 - (int-94132) osso-gtk.defs assumes that user is the only valid user
(int-94132)
: osso-gtk.defs assumes that user is the only valid user
Status: RESOLVED FIXED
Product: Desktop platform
startup-shutdown
: 4.1.2 (4.2008.36-5)
: All Linux
: Low minor (vote)
: 5.0-alpha
Assigned To: Kimmo Hämäläinen
: startup-shutdown-bugs
:
: community-diablo, patch
:
:
  Show dependency tree
 
Reported: 2008-01-26 01:16 UTC by Erik Hovland
Modified: 2009-10-22 07:57 UTC (History)
5 users (show)

See Also:


Attachments
Changes the osso-gtk.defs file so it works with any arbitrary user (326 bytes, patch)
2008-01-26 01:20 UTC, Erik Hovland
Details
Change all variable calls to use curly braces (3.80 KB, patch)
2008-12-10 01:31 UTC, Erik Hovland
Details
assign $USER or user if $USER is not set (339 bytes, patch)
2008-12-10 01:32 UTC, Erik Hovland
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Erik Hovland (reporter) 2008-01-26 01:16:38 UTC
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'.
Comment 1 Erik Hovland (reporter) 2008-01-26 01:20:36 UTC
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.
Comment 2 Danny Milosavljevic 2008-07-31 19:37:58 UTC
you might want to use "${USER}" so that spaces in the user name work (a shell
script, right?)
Comment 3 Andre Klapper maemo.org 2008-10-22 14:14:31 UTC
Erik, can you update your patch according to Danny's comment?
Comment 4 Eero Tamminen nokia 2008-10-27 18:09:12 UTC
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???
Comment 5 Andre Klapper maemo.org 2008-11-20 21:14:44 UTC
So, is this something that makes sense to change/"fix" for Fremantle?
Comment 6 Andre Klapper maemo.org 2008-11-27 13:10:24 UTC
Hmm, so is this WONTFIX/INVALID nowadays, or shall I import this for Fremantle?
Comment 7 Kimmo Hämäläinen nokia 2008-11-27 15:15:28 UTC
(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.
Comment 8 Erik Hovland (reporter) 2008-12-10 01:31:17 UTC
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.
Comment 9 Erik Hovland (reporter) 2008-12-10 01:32:21 UTC
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.
Comment 10 Gabriel Schulhof nokia 2009-01-15 14:21:10 UTC
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
Comment 11 Andre Klapper maemo.org 2009-01-15 14:37:14 UTC
Cool. Thanks a lot!
Setting Target Milestone.
Comment 12 Lucas Maneos 2009-10-22 07:57:07 UTC
Marking patches of interest to Diablo (Maemo4) community updates, please excuse
the noise.