Creating a .desktop-file for the livecd user ...
Creating a .desktop-file for the livecd user ... | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | I tried to create a .desktop-file for my installer this way:
paldo-live-installer.xml
Code | [In neuem Fenster öffnen] | | cd $CHROOTDIR
<!-- 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 |
paldo-installer.xml
Code | [In neuem Fenster öffnen] | |
cp /usr/share/applications/pinstaller.desktop /home/paldo/Desktop/pinstaller.desktop
chown 1000:1000 /home/paldo/Desktop/pinstaller.desktop |
... but it won't work this way. The Desktop-folder is always emtpy. Did I miss something? Do I have to copy it somewhere else? |
|
|
|
|
|
Re: Creating a .desktop-file for the livecd user . | |
|
|
Administrator Posts: 426 Registered: 2004-09-09 | You have to be careful in the postbuild section, as you're outside chroot in that phase. Something like the following should work:
Code | [In neuem Fenster öffnen] | | install -Dv -o 1000 -g 1000 $CHROOTDIR/usr/share/applications/pinstaller.desktop $CHROOTDIR/home/paldo/Desktop/pinstaller.desktop |
|
|
|
|
|
|
Re: Creating a .desktop-file for the livecd user . | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | |
|
|
|
|
|
Re: Creating a .desktop-file for the livecd user . | |
|
|
Administrator Posts: 426 Registered: 2004-09-09 | I haven't realized that it's not in postbuild in paldo-installer, don't see a reason why it shouldn't work right now. It should be easy to find the problem when looking at the log of a --verbose bootstrap, though. |
|
|
|
|
|
Re: Creating a .desktop-file for the livecd user . | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | I rechecked my created squashfs.image:
Code | [In neuem Fenster öffnen] | | [amnon@amnonspc:/mnt/sdb8/paldo-32/mounted]$ dir -R ./home
./home:
paldo
./home/paldo:
Desktop skel
./home/paldo/Desktop:
pinstaller.desktop
./home/paldo/skel:
|
When I login with the livecd-user paldo the Desktop-folder is empty. Why? |
|
|
|
|
|
Re: Creating a .desktop-file for the livecd user . | |
|
|
Administrator Posts: 426 Registered: 2004-09-09 | Oh, I see that /home gets its own tmpfs when starting from the live cd (to make it more robust than handling everything via unionfs). As a workaround you could copy the desktop file into /etc/skel/Desktop. We might replace unionfs by aufs if that works better, then this workaround won't be necessary anymore. |
|
|
|
|
|
Re: Creating a .desktop-file for the livecd user . | |
|
|
Moderator Linux-Dude Posts: 1187 Registered: 2006-11-23 | |
|
|
|
|
|