I'm working on a livecd for my distro. I coded an installer for it.
How can I add a .desktop-file to the desktop of the livecd-user?

These are the steps till now:

<!-- create livecd user paldo and let it autologin -->
cp -a $CHROOTDIR/etc/skel $CHROOTDIR/home/paldo
chown -R 1000:1000 $CHROOTDIR/home/paldo
echo "paldo:x:1000:1000::/home/paldo:/bin/bash" >> CHROOTDIR/etc/passwd
echo "paldo:x:1000:" >> $CHROOTDIR/etc/group
sed -i -e 's/^wheel:.*/wheel:x:18:paldo/' $CHROOTDIR/etc/group
sed -i -e 's/^audio:.*/audio:x:6:paldo/' $CHROOTDIR/etc/group
sed -i -e 's/^video:.*/video:x:22:paldo/' $CHROOTDIR/etc/group
sed -i -e 's/^cdrom:.*/cdrom:x:25:paldo/' $CHROOTDIR/etc/group
sed -i -e 's/^disk:.*/disk:x:17:paldo/' $CHROOTDIR/etc/group
<!-- add to disk group to allow gparted to run -->
sed -i -e 's/^network:.*/network:x:23:paldo/' $CHROOTDIR/etc/group
echo "paldo:paldo" | chroot $CHROOTDIR chpasswd --md5
cp /usr/share/applications/pinstaller.desktop /home/paldo/Desktop/pinstaller.desktop
chown 1000:1000 /home/paldo/Desktop/pinstaller.desktop
After autologin into the useraccount the Desktop-folder is empty.

It only works with the root-account. Why?