Re: tazx problem

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


Rohit,

Thank you for bringing some direction to this problem.

I have just looked at your fixes and I don't think any changes need to
be made to the installer, as long as tazx is able to grep the right
$USER -- as it stand now, the appropriate files are copied to
/home/<null> which is what causes .xinitrc to show up in the wrong
place.

I tried adding multiple users with tazctrlbox, and using that,
..xinitrc is copied for each new user.  However, not all of the needed
files show up.  When logging into a newly created account, X starts,
but openbox does not.  The fix was to run tazx, making sure it was
using the right $USER variable.

Perhaps I should rename this thread, but having looked through the
files in my newly created /home/guest, there's definitely a bug in
tazctrlbox.  Not only is .config/openbox missing, but the entire
/etc/skel directory is copied to /home/guest/skel -- this is needless,
but the files are also copied to the right place, so it doesn't cause
any errors.  One potential problem, however, is that
/home/guest/.local/share/applications now has two .desktop files with
errors.  Xdefaults.desktop and shell-profile.desktop both contain the
line: Exec=leafpad /home/user_name/<filename>... 'user_name', of
course, should read 'guest', in this case.  Running tazx successfully
did not change this.  The respective files in /home/tux, strangely,
are just as they should be.  Perhaps using the ubiquitous ~/ in
/etc/skel would do the trick?

As for being able to add multiple users, the bigger problem is when
adduser is used from the command line.  When this happens, none of the
needed files are copied to /home/$USER, and X doesn't even start.  I
still think the solution may be to simplify tazctrlbox, so that it
doesn't bother to copy anything from /etc/skel, but just runs adduser,
as is.  Slim can check to see if .xinitrc exists before trying to run
it, and if it doesn't exist, run tazx first.  Tazx, then, can be
responsible for creating all of the local user files.  This is better
than only checking for /etc/X11/screen.conf, as a new user would not
miss the configuration process, but it should still be smart enough to
know if Xorg is already installed before downloading the package list
and trying to install it again.  If it finds Xorg is already
installed, it could offer to use the global configuration, skip the
menu, and just copy the necessary files from /root....

This may not be the right way of dealing with the issue.  I leave it
to the coders and the developers, of course.  I am still very much a
beginner.  And sorry for the long post...


On Thu, Nov 11, 2010 at 12:37 AM, Rohit Joshi <rj.rohit@xxxxxxxxx> wrote:
> Hi Indigo,
>
> You are spot on. New users are created with "1008" and above code using the
> slitaz installer. Slitaz installer correcly copies "/etc/skel/*" files to
> /home/$USER. But ".config"  and ".xinitrc" are not copied.
>
> tazx creates .xinitrc and .config files but copies it to /home instead of
> /home/$USER.
>
> tazx is having problem with $USER and $HOME variables. Result is that you
> cannot login on the graphical Slim login screen as a new user.  I realized
> that none of these files are copied to ~/.config:
> a) /etc/xdg/openbox/*
> b) /etc/slitaz/applications.conf
>
> I think these fixes should temporarily do:
> tazx: http://hg.slitaz.org/slitaz-tools/rev/1442140ec3d0
> slitaz-installer: http://hg.slitaz.org/slitaz-tools/rev/7f85db867875
>
> Adding a new user using Tazctrlbox should be fine.
>
> Tazx is fixed for 1 new user. May be we have to add "for loop" for
> multi-user login. This is a major BUG.
>
> Christophe, can you please have a quick look on the above commits.
>
> Thanks
>
> ~ Rohit
>
>
> On Fri, Nov 5, 2010 at 12:51 PM, Indigo <pointofavailability@xxxxxxxxx>
> wrote:
>>
>> On my system, /etc/groups shows a number of devices, starting with
>> cdrom 1000, and leading up to tux 1008...
>> but tazx uses /etc/passwd to get the username and assumes the group
>> name to be the same.  Would it be wiser to make a group 'users' to
>> ease the creation of multiple accounts?  I've looked and I think a
>> check for .xinitrc should be in slim.conf as part of the login_cmd,
>> running tazx if it's not there.  Even though tazx is run as part of a
>> boot script, I don't think the redundancy would cause any problems.
>> If the USER variable is taken from the login, instead, tazx would not
>> have to be responsible for updating the home directories of all known
>> users, but could instead be done for each user, allowing for some
>> users to have different language prefs, and so on.  As for the group,
>> it just makes sense that I would have tux:users and indigo6:users, but
>> I don't know if this would cause other problems...
>>
>>
>> On Fri, Nov 5, 2010 at 4:29 PM, Paul Issott <paul@xxxxxxxxxxxxxxxxxxx>
>> wrote:
>> > Hi
>> >
>> > [From memory] Looking at the etc/group file: both tux and cdrom groups
>> > have the same number 1000
>> >
>> > Paul
>> >
>> >
>> > On Fri, 2010-11-05 at 14:47 +0000, Indigo wrote:
>> >> I was having the same problem with the new cooking ISO, that tazx
>> >> fails to copy the right files to the home directory, therefore slim
>> >> refuses to log in except as root -- but I found the bug!
>> >>
>> >>
>> >> Line 20 in /usr/bin/tazx reads: USER=`cat /etc/passwd | grep 1000 |
>> >> cut -f ":" -n 1`
>> >>
>> >>
>> >>
>> >> The problem is that user tux is actually 1008 on my system, so
>> >> USER=null which causes the configuration files to be copied to /home
>> >> instead of /home/tux, and the script ends with a chown error.  After
>> >> changing 1000 to 1008 and running the script again, everything worked
>> >> as it should, and I can now log in as a regular user.
>> >>
>> >>
>> >> I question if the script can handle multiple users, too.  Not only is
>> >> tazx used in live mode or during an install, but it could also be run
>> >> later when there may be more than one regular user.  I don't see how
>> >> it's capable of handling that, so anyone using adduser will inevitably
>> >> run into the same problem.  I'll leave it to the coders to fix this
>> >> the right way, but I wonder if maybe slim should invoke tazx on more
>> >> of a per user basis, if .xinitrc doesn't exist.  This would allow for
>> >> the creation of new users with individual configurations.  However it
>> >> happens, though, there's surely a better way to handle the USER
>> >> variable.
>> >>
>> >>
>> >> I'm posting this on the mailing list, instead of in IRC, because I
>> >> suspect this issue affects a number of people.
>> >
>> >
>> >
>> >
>> >
>> > ---
>> > SliTaz GNU/Linux Mailing list - http://www.slitaz.org/
>> >
>> >
>>
>> ---
>> SliTaz GNU/Linux Mailing list - http://www.slitaz.org/
>>
>
>

---
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/