Linux Lite Forums

Customization => Desktop Customization => Topic started by: Vera on June 02, 2018, 01:36:19 PM

Title: Replicating the desktop settings for one user based on another user
Post by: Vera on June 02, 2018, 01:36:19 PM
This helpful tip is ideal for when you are setting up more than one user and want a similar desktop look for all - without manually pointing and clicking the settings for each new user.

I used this method on LL 3.8 and LL 4.0, to re-create the same desktop settings for a new user based on the desktop settings of an existing user.

Disclaimers:

How to do it:
1. First, create the new user (I did this part via GUI under Menu -> Settings -> Lite User Manager). Then I shut down and re-started the machine (not sure if that was strictly necessary), and logged in as main/admin user again. For the purposes of this example, I'm naming the new user as newuser.

2a. Replace this new user's ~/.config/xfce4 folder with the existing user's ~/.config/xfce4 folder. I did this as follows using these two commands but I'm sure there's a more elegant way to do it:

Code: [Select]
sudo rm -r /home/newuser/.config/xfce4
sudo cp -r /home/mainuser/.config/xfce4 /home/newuser/.config/.

2b. Then do chown to ensure new user's files are owned by that user:

Code: [Select]
sudo chown -R newuser:newuser /home/newuser/.config/xfce4
3. Repeat steps 2a and 2b for /home/newuser/autostart (remove, copy, chown).

4. Restart machine and log in as the new user. Done! The desktop for the new user should now be set up just like the existing user's, in a fraction of the time spent pointing and clicking.

5. If desired, you can replicate browser settings for the new users, it's the same principle. See info below in the thread for that.

References:

1. https://unix.stackexchange.com/questions/353924/how-to-copy-all-my-xfce-settings-between-a-desktop-machine-and-a-laptop (https://unix.stackexchange.com/questions/353924/how-to-copy-all-my-xfce-settings-between-a-desktop-machine-and-a-laptop)
2. https://ubuntuforums.org/showthread.php?t=2245721 (https://ubuntuforums.org/showthread.php?t=2245721)

Title: Re: Replicating the desktop settings for one user based on another user
Post by: NN on June 02, 2018, 02:44:51 PM
2a. Replace this new user's ~/.config/xfce4 folder with the existing user's ~/.config/xfce4 folder. I did this as follows using these two commands but I'm sure there's a more elegant way to do it:

Code: [Select]
sudo rm -r /home/newuser/.config/xfce4
sudo cp -r /home/mainuser/.config/xfce4 /home/newuser/.config/.

I would do the operations just by copying and pasting the files in Thunar opened as a root - by right click and choosing the root option, or by opening Thunar by the commands in the terminal: sudo su ---> [ password ] ---> thunar

These will open Thunar with admin privileges for me to copy and paste necessary files.  8)
I don't know whether this way is really elegant, but for me it is easier and faster as I am a former Win-user and got accustomed to do such things like this - without too complicated terminal commands. :)

Title: Re: Replicating the desktop settings for one user based on another user
Post by: NN on June 02, 2018, 02:45:33 PM
Thank you, Vera, for your tips, nevertheless. :)
Title: Re: Replicating the desktop settings for one user based on another user
Post by: Vera on June 02, 2018, 10:17:34 PM
I would do the operations just by copying and pasting the files in Thunar opened as a root - by right click and choosing the root option, or by opening Thunar by the commands in the terminal: sudo su ---> [ password ] ---> thunar

These will open Thunar with admin privileges for me to copy and paste necessary files.  8)
I don't know whether this way is really elegant, but for me it is easier and faster as I am a former Win-user and got accustomed to do such things like this - without too complicated terminal commands. :)

Thanks @NN , I tried your method. It worked well, but I had to do cd ~/.config first. Then, I was able to see xfce4 and do the copy and paste. But I can't get there via Thunar directly from the home directory, because I can't see .config that way. Still, this worked well once I was in the .config folder.
Title: Re: Replicating the desktop settings for one user based on another user
Post by: NN on June 02, 2018, 10:37:56 PM
Thanks NN, I tried your method. It worked well

I'm glad you liked this simple method. :)

Quote
but I had to do cd ~/.config first. Then, I was able to see xfce4 and do the copy and paste. But I can't get there via Thunar directly from the home directory, because I can't see .config that way. Still, this worked well once I was in the .config folder.

Oh, it's easy! You should have ticked 'show hidden files' on the menu (option 'View'). Any dot before a file name hides it, so .config (with a dot) is a hidden file while config (without the dot) is not hidden.  :)
Title: Re: Replicating the desktop settings for one user based on another user
Post by: Vera on June 05, 2018, 01:58:36 PM
Thanks @NN ! I can't believe all this time I've been doing workarounds to deal with the hidden files. I tried "view" -> "show hidden files" like you said, and it worked fine. I don't know how I missed that for so long, but I did. I guess I just always used workarounds to deal with those issues before so I never got completely stuck, but being able to view hidden files is a lot better. Plus, that ability can be toggled off and on as I wish. Thanks.  8) :D

TO UPDATE FOR LL 4.0 - Yes, this method of replicating the user desktop settings works equally well in LL 4.0, I just tried it out and there are no problems. I will update my original post accordingly.

ANOTHER TIP if you're using this method: I also recommend replicating any browser settings you may want, since it can take just as long to set up browser settings by point-and-click as the desktop settings. For multiple users and/or multiple browsers, this can take a really long time. To replicate browser settings for Firefox I used the same process as for the desktop settings, but with the directory /home/newuser/.mozilla/firefox (remove, copy that of the main user's, and chown). For other browsers the principle is the same, just be sure to find the brower's directory under the user's directory.

I've been able to set up my additional users in a fraction of the time that it used to take me!