You are not logged in.

#26 2015-10-22 12:36:14

nobody0
Disabled account
Registered: 2015-09-29
Posts: 664

Re: lightdm / dm-tool user switch / nitrogen

^ When you use

# adduser <user_name>

The adduser program would use the configs in /etc/adduser.conf, and that would direct to the /etc/skel, but not to /usr/share/bunsen/skel or to /usr/lib/bunsen/bl-user-setup.
bl-user-setup

#!/bin/bash
# BunsenLabs User Set-up

# USER="$1" USER is exported by lightdm

[ -f "/home/$USER/.config/bunsen/bl-setup" ] && exit 0

cd /usr/share/bunsen/skel
tar cpzf skel.tar.gz .
mv skel.tar.gz /home/$USER/skel.tar.gz
cd /home/$USER
tar --suffix="~$( date +%FT%T )~" -xpsf skel.tar.gz
rm skel.tar.gz

for i in "/home/$USER/.gtk-bookmarks" "/home/$USER/.config/nitrogen/nitrogen.cfg"
do
    [ -f "$i" ] && {
        sed --in-place="~$( date +%FT%T )~" "s/REPLACEME/$USER/g" "$i"
    }
done

ln -s /usr/share/backgrounds "/home/$USER/Pictures/wallpapers/shared"

mkdir -p "/home/$USER/.config/bunsen" # this should already exist
touch "/home/$USER/.config/bunsen/bl-setup"
chown -R "$USER":"$USER" "/home/$USER"

exit

Offline

#27 2015-10-23 00:18:33

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,842
Website

Re: lightdm / dm-tool user switch / nitrogen

@ostrolek
bl-user-setup is executed by lightdm on login, as I posted above.

johnraff wrote:

Please check the facts before making statements like this.

Test it: 'adduser somename', it only takes a few seconds.
Log into the new user's account, and then tell me if it doesn't work.

Making statements based purely on your own imagination doesn't help anybody.

Last edited by johnraff (2015-10-23 01:33:59)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#28 2015-10-23 01:00:22

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: lightdm / dm-tool user switch / nitrogen

I did test it and it did work as expected. I ended up with a complete new BL config for the new user I added. I was a bit concerned about useradd til you told me that lightdm is triggering the new user setup. Then it all made sense. Apologies for not testing it and making assumptions on the code I saw. Anyway, as far as I am concerned, until the OP posts back, I can only assume that user switching works and figure it's case closed  tongue Thanks for taking the time to enlighten me  lol

Offline

#29 2015-10-23 01:35:56

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,842
Website

Re: lightdm / dm-tool user switch / nitrogen

@tknomanzr sorry I failed to make clear to whom my remarks were addressed. (above post edited)
Thanks for taking the time to test it anyway!


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#30 2015-10-23 05:49:05

nobody0
Disabled account
Registered: 2015-09-29
Posts: 664

Re: lightdm / dm-tool user switch / nitrogen

open@open:~$ sudo su
[sudo] password for open: 
root@open:/home/open# adduser bob
Adding user 'bob' ...
Adding new group 'bob' (1001) ...
Adding new user 'bob' (1001) with group 'bob' ...
Creating home directory '/home/bob' ...
Copying files from '/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for bob
Enter the new value, or press Enter for the default
	Full Name []:
	Room Number []:
	Work Phone []:
	Home Phone []:
	Other []:
Is the information correct? [Y/n] y
root@open:/home/open#

Offline

#31 2015-10-23 05:59:56

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,842
Website

Re: lightdm / dm-tool user switch / nitrogen

^well done!
Now log into bob's account from lightdm's interface. smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#32 2015-10-23 06:57:43

nobody0
Disabled account
Registered: 2015-09-29
Posts: 664

Re: lightdm / dm-tool user switch / nitrogen

^ That's exactly what I am trying to say. Lightdm would try to find the folder /home/bob/Pictures/wallpapers/shared to link it to /usr/share/backgrounds, only there is no such folder. The program adduser won't create such a folder. Does it create in your install?

Offline

#33 2015-10-23 09:12:00

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,842
Website

Re: lightdm / dm-tool user switch / nitrogen

Yes.

Have you actually tried logging in via lightdm, instead of just speculating what "would" happen?

Are you just being deliberately obtuse? That's known as "trolling", and if so please stop. It's just wasting everyone's time.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#34 2015-10-23 09:33:01

nobody0
Disabled account
Registered: 2015-09-29
Posts: 664

Re: lightdm / dm-tool user switch / nitrogen

I logged out and logged in from lightdm as bob. As bob, the Pictures folder doesn't have wallpapers folder. Logged out again, logged in as open (my user name), there is a wallpapers folder in the Pictures.  The install is RC1.

I created this bob, just to check out as directed. I'd always have one user in my system, so this is not a big deal for me. Just got interested because of the OP's question, that's all.

Offline

#35 2015-10-23 13:37:23

damo
....moderator....
Registered: 2015-08-20
Posts: 6,566

Re: lightdm / dm-tool user switch / nitrogen

I just created a user, using both `sudo adduser` and `sudo su -  --> adduser`, in case there was a difference. Whichever way, the user dirs are as intended, as @johnraff described.

(The output does say it is copying from `/etc/skel` though)

Users bill@ and bob@ both had a Pictures folder containing the correct wallpapers.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#36 2015-10-24 03:58:25

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 7,842
Website

Re: lightdm / dm-tool user switch / nitrogen

/etc/skel is copied by the debian utilities - it's standard, but only contains a couple of (Debian default) files. The rest comes from our BL location.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB