<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.xfce.org/extern.php?action=feed&amp;tid=4168&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Xfce Forums / how to clone user settings and configuration?]]></title>
		<link>http://forum.xfce.org/viewtopic.php?id=4168</link>
		<description><![CDATA[The most recent posts in how to clone user settings and configuration?.]]></description>
		<lastBuildDate>Wed, 30 May 2012 12:29:40 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: how to clone user settings and configuration?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=26465#p26465</link>
			<description><![CDATA[<p>I wrote the following shell script to solve this issue. It worked fine for me on several occasions.</p><p>Copy the code into a text editor and save it as copy-config2user<br />Make the file executable with chmod +x copy-config2user<br />Execute it by typing ./copy-config2user USERNAME at the command line.</p><p>The script is very safe to use as it has some built-in checks.<br />One can add more copyitem lines to copy the configuration of other programs as well.</p><div class="codebox"><pre class="vscroll"><code>#!/bin/bash

&lt;&lt;DESCRIPTION
    copy-config2user is a shell command that copies one&#039;s desktop configuration files 
    to another specified user.

    Usage: copy-config2user USERNAME
DESCRIPTION

&lt;&lt;COPYRIGHT
    Copyright (C) 2012  Serge YMR Stroobandt

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
COPYRIGHT

&lt;&lt;CONTACT
    See user on4aa on https://forum.xfce.org/viewtopic.php?id=4168
CONTACT

TOUSER=$1

function copyitem() {
	ITEM=$1

	echo; echo &quot;Deleting $ITEM of user $TOUSER...&quot;
	sudo rm -Rv /home/$TOUSER/$ITEM

	echo; echo &quot;Copying $ITEM of user $USER to user $TOUSER...&quot;
	sudo cp -av /home/$USER/$ITEM /home/$TOUSER/$ITEM
	sudo chown -R $TOUSER:$TOUSER /home/$TOUSER/$ITEM
}

if [ -z $1 ] || ! [ -d /home/$TOUSER ] || [ $USER = $TOUSER ]; then
	echo &quot;Please, specify the user who will receive your desktop configuration.&quot;
else
	copyitem &quot;.config/autostart/&quot;
	copyitem &quot;.config/Terminal/&quot;
	copyitem &quot;.config/Thunar/&quot;
	copyitem &quot;.config/xfce4/&quot;
fi</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (on4aa)]]></author>
			<pubDate>Wed, 30 May 2012 12:29:40 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=26465#p26465</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to clone user settings and configuration?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=16193#p16193</link>
			<description><![CDATA[<p>I&#039;m pretty sure settings aren&#039;t copied from /etc/skel/, rather /etc/xdg/xfce4, /usr/share/xfce4/ and a few other places</p>]]></description>
			<author><![CDATA[dummy@example.com (s0ulslack)]]></author>
			<pubDate>Thu, 13 Nov 2008 21:58:17 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=16193#p16193</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to clone user settings and configuration?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=16191#p16191</link>
			<description><![CDATA[<p>What should have happen when you created a new user was all the basic configurations are copied from /etc/skel and then you would start from there.</p>]]></description>
			<author><![CDATA[dummy@example.com (eriefisher)]]></author>
			<pubDate>Thu, 13 Nov 2008 17:18:43 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=16191#p16191</guid>
		</item>
		<item>
			<title><![CDATA[Re: how to clone user settings and configuration?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=16190#p16190</link>
			<description><![CDATA[<p>Kinda obvious, some of the files must have /root as the home dir, grep/poke through ~/.config/ stuff and change as you find&#039;em</p>]]></description>
			<author><![CDATA[dummy@example.com (s0ulslack)]]></author>
			<pubDate>Thu, 13 Nov 2008 15:10:23 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=16190#p16190</guid>
		</item>
		<item>
			<title><![CDATA[how to clone user settings and configuration?]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=16185#p16185</link>
			<description><![CDATA[<p>I need to clone all of the settings in the root account to a less priveledged account (or always run as root, I suppose). Apparently, it isn&#039;t a simple matter of copying all the files in the /root/ directory to the new user&#039;s home directory and giving ownership of them to the new user. So how do I achieve this transfer?</p><p>Xfce version is 4.4.3, distro is Arch Linux.</p><p>Long explanation of what I tried:</p><p>I know one is not supposed to run as root. Out of laziness I recently set up a box, including X with XFCE4 as my desktop environment, from the root account. After I installed sudo I created a less privileged user, copied all of the files, including hidden files, from /root/ to /home/newuser/ and gave ownership of all files in /home/newuser (including the hidden ones) to newuser. Nonetheless, Xfce starts in a very basic configuration, incomplete, in fact. The cursor, for example, is the default xwm ugly X. When I kill X there are a number of errors on the screen that don&#039;t show up in the Xorg log file. Here are a couple examples:</p><p>(xfdesktop:5425): libxfce4util-CRITICAL **: Unable to create base directory /root/.cache/xfce4/desktop. Saving to file /root/.cache/xfce4/desktop/menu-cache--etc-xdg-xfce4-desktop-menu.xml.rc is likely to fail.</p><p>and</p><p>(xfdesktop:5425): libxfce4util-CRITICAL **: Unable to open file /root/.cache/xfce4/desktop/menu-cache--etc-xdg-xfce4-desktop-menu.xml.rc.5425.tmp for writing: Permission denied</p><p>What do I need to do?</p>]]></description>
			<author><![CDATA[dummy@example.com (fredfredfred)]]></author>
			<pubDate>Thu, 13 Nov 2008 01:30:36 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=16185#p16185</guid>
		</item>
	</channel>
</rss>
