Skip to content

Commit

Permalink
disable xfce question about default or empty panel for a new user
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Jan 18, 2018
1 parent dde452f commit 24cfedd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/simple/scripts/DEMO/10-misc
Expand Up @@ -19,6 +19,19 @@ if [ -n "$username" ]; then
if ! $ROOTCMD getent passwd $username ; then
$ROOTCMD adduser --disabled-login --gecos "$username user" $username
$ROOTCMD usermod -p "$USERPW" $username
userdir=$($ROOTCMD getent passwd "$username" | cut -d: -f6 )

# disable xfce question about default or empty panel
if [ -f $target/etc/xdg/xfce4/panel/default.xml ]; then
xfdir=$userdir/.config/xfce4/xfconf/xfce-perchannel-xml
if [ ! -d $target/xfdir ]; then
$ROOTCMD mkdir -p $xfdir
$ROOTCMD cp /etc/xdg/xfce4/panel/default.xml $xfdir/xfce4-panel.xml
# group name is the same as user name
$ROOTCMD chown -R $username.$username $userdir/.config
fi
fi

for g in $groups; do
$ROOTCMD adduser $username $g
done
Expand Down

0 comments on commit 24cfedd

Please sign in to comment.