What creates Ubiquity shortcuts on desktop?

Asked by Sergey "Shnatsel" Davidoff

I'm working on Ubuntu derivative that does not use the desktop-as-a-folder metaphor. I've disabled the desktop in all possible ways including patching xgd-user-dirs, yet Ubiquity still creates the desktop folder and its launcher in it on LiveCDs. It's a .desktop file and it's not tracked by dpkg, at least "dpkg -S Desktop/ubiquity-gtkui.desktop" does not return any results. I've grepped all over ubiquity and casper source code and I can't find what creates the file and how to get rid of it.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubiquity Edit question
Assignee:
No assignee Edit question
Solved by:
Colin Watson
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Did you use persistence on a USB stick? You cannot modify the contents of a CD as it is read-only so the changes you make will only stick in RAM until you reboot

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) said :
#2

I'm trying to make a distribution that does not create that file on a LiveCD/USB/whatever bootup. So I can't see how this is relevant. But for the record, persistence was not enabled :)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Then where do you expect changes to be stored?

Revision history for this message
Best Colin Watson (cjwatson) said :
#4

@actionparsnip: It has nothing to do with persistent storage. Sergey's question relates to the live CD boot process, which involves making a number of customisations in a writable overlay on top of the read-only squashfs on the fly.

@shnatsel: scripts/casper-bottom/25adduser in casper handles this. Here's the code in question:

for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde4/ubiquity-kdeui.desktop; do
    if [ -f "/root/$file" ]; then
        sed -i "s/RELEASE/$RELEASE/" "/root$file"
        chroot /root install -d -o $USERNAME -g $USERNAME /home/$USERNAME/Desktop
        chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file")
        break
    fi
done

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) said :
#5

Thanks Colin Watson, that solved my question.