Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to make a desktop shortcut for live session user

I am trying to make my own linux distro based on Ubuntu, and have a different desktop enviroment installed. This desktop enviroment (KDE) does not show Ubiquity in the applications by default, so I want to put the shortcut on the desktop, but I only want this for the live session user, and not for the other users, so putting the shortcut in /etc/skel/Desktop won’t work (also for other users) How can I make sure it’s only for the live session user and not for anybody else?

I’m using the Ubuntu 20.04 Desktop ISO btw

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The approach is to actually create the launcher in the skel folder, but then automatically delete this launcher after the OS installation has completed successfully.

  1. Create the launcher

    Execute the following in Cubic’s Terminal page:

     mkdir /etc/skel/Desktop
     cp /usr/share/applications/ubiquity.desktop /etc/skel/Desktop/
     chmod +x /etc/skel/Desktop/ubiquity.desktop
     ls -la /etc/skel/Desktop/*
    
  2. Delete the launcher after installation

    On Cubic’s Options page, click the Preseed tab, and add the following at the end of the ubuntu.seed file:

     ubiquity ubiquity/success_command string \
         in-target bash -c 'rm -rf /etc/skel/Desktop/ubiquity.desktop'; \
         in-target bash -c 'rm -rf /home/*/Desktop/ubiquity.desktop';
    
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading