Welcome
Welcome to refracta

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!

added a user

Refracta Development, Scripts, etc.

added a user

Postby meandean » Sat Oct 22, 2011 5:18 am

Are the configs suppose to carry over when you create a new user? Just wondering because I added a user and got a different setup than the default 'user' user. I didn't know if this was intended, a bug, or on the fix-before-release list so I just wanted to be sure you knew.
User avatar
meandean
 
Posts: 392
Joined: Wed Mar 09, 2011 5:16 am

Re: added a user

Postby nadir » Sat Oct 22, 2011 11:46 am

As far i know (!):
it is not a bug, something which happened by accidence.
As you can see here:
https://github.com/fsmithred/refracta/b ... e-username
fsmithred made a script to _change_ the username and make the changes in ~/.all_hidden (and a few more files). Hence he must know about it, and probably did it by purpose (vague guessing....).

I mainly stick to the default user ("user"). That is why i seldom see it at all.
Still i think creating a new user, and getting the default configs would be nice (just in case). Well: i for one will probably never use it (never do #adduser newboy).
So i herd u liek mudkip?
User avatar
nadir
 
Posts: 1159
Joined: Wed Mar 09, 2011 4:18 am
Location: here

Re: added a user

Postby jheaton5 » Sat Oct 22, 2011 2:01 pm

Wouldn't it work to just copy the .* files from the old user's home dir to the new user's home dir?
jheaton5
 
Posts: 45
Joined: Wed Mar 09, 2011 9:26 pm

Re: added a user

Postby nadir » Sat Oct 22, 2011 2:10 pm

jheaton5 wrote:Wouldn't it work to just copy the .* files from the old user's home dir to the new user's home dir?

As far i remember the problem is that in a very few files the username gets used, and that is what gets done by the script.

To make a short story long:
I think bugsbunny posted a weird command at forums.debian.net, that command is the main part of the script, to change the username in the few files from old-name to new-name.
It does more than that, but that is what i am interested in.
Give me a sec to copy and paste the command i mean.... one... two... three:

Code: Select all
for i in $(grep -r "/home/$oldname" /home/$newname/.config | awk -F":" ' { print $1 }')
do
sed -i "s/\/home\/$oldname/\/home\/$newname/g" "$i"
    check_exit
done
So i herd u liek mudkip?
User avatar
nadir
 
Posts: 1159
Joined: Wed Mar 09, 2011 4:18 am
Location: here

Re: added a user

Postby meandean » Sat Oct 22, 2011 5:16 pm

jheaton5 wrote:Wouldn't it work to just copy the .* files from the old user's home dir to the new user's home dir?

Yep you can copy things manually but I just thought a new user should automatically get the same setup as the default user. I just was wondering it it was intended/unintended or known/unknown at the very least.
User avatar
meandean
 
Posts: 392
Joined: Wed Mar 09, 2011 5:16 am

Re: added a user

Postby meandean » Sat Oct 22, 2011 5:36 pm

this is beta2 that I am talking about btw
User avatar
meandean
 
Posts: 392
Joined: Wed Mar 09, 2011 5:16 am

Re: added a user

Postby fsmithred » Sat Oct 22, 2011 6:14 pm

It's a known deficiency, and I didn't tell anyone about it. The real fix is to copy some config files to /etc/skel. As it is, you just get default xfce settings when you create a new user.
User avatar
fsmithred
 
Posts: 1987
Joined: Wed Mar 09, 2011 9:13 pm

Re: added a user

Postby meandean » Sat Oct 22, 2011 6:36 pm

fsmithred wrote:It's a known deficiency....

coolbeans, just wanted to be sure it was known or make it so ;)
User avatar
meandean
 
Posts: 392
Joined: Wed Mar 09, 2011 5:16 am

Re: added a user

Postby dzz » Sun Oct 23, 2011 11:48 am

Code: Select all
su
cp -r /home/mainuser/.config /home/seconduser/
chown -R seconduser:/seconduser /home/seconduser/.config


(while not logged in as seconduser) seems to do the job.

EDIT need to run the code in nadir's last post as well

The real annoyance is no browser. Iceweasel maybe not so bad after all?
dzz
 
Posts: 629
Joined: Wed Apr 27, 2011 11:53 am
Location: Devon, England


Return to Discuss

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred