Refracta Development, Scripts, etc.
Post a reply
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## added a user

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.
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: added a user

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).
jheaton5

- jheaton5
- Posts: 45
- Joined: Wed Mar 09, 2011 9:26 pm

## Re: added a user

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?
nadir

- nadir
- Posts: 1160
- Joined: Wed Mar 09, 2011 4:18 am
- Location: here

## Re: added a user

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:
  `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`

meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: added a user

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.
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: added a user

Sat Oct 22, 2011 5:36 pm

this is beta2 that I am talking about btw
fsmithred

- fsmithred
- Posts: 2101
- Joined: Wed Mar 09, 2011 9:13 pm

## Re: added a user

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.
meandean

- meandean
- Posts: 392
- Joined: Wed Mar 09, 2011 5:16 am

## Re: added a user

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
dzz

- dzz
- Posts: 647
- Joined: Wed Apr 27, 2011 11:53 am
- Location: Devon, England

## Re: added a user

Sun Oct 23, 2011 11:48 am

Code:
  `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?
Post a reply
Jump to:

Powered by phpBB © phpBB Group.

phpBB Mobile / SEO by Artodia.