Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2741  / 3 Years ago, fri, september 17, 2021, 3:49:16

Is there any way to automatically add icons for an application when a package is installed?



The ideal use case would be that a user decides to install an application and, as part of the postinstall script, the application icons are added to the desktop. After that, when the application is uninstalled, they icons are automatically removed from the desktop.


More From » 11.04

 Answers
4

As already mentioned, this isn't something that should be done for an official package. Though I could see how this might be useful in a local deployment.



Use something like this in debian/postinst:



#!/bin/sh
for user in /home/*
do
cp /usr/share/applications/foo.desktop ${user}/Desktop/
chmod 755 ${user}//Desktop/foo.desktop
done

[#44254] Saturday, September 18, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
imberst

Total Points: 370
Total Questions: 107
Total Answers: 123

Location: French Polynesia
Member since Tue, Jul 7, 2020
4 Years ago
imberst questions
;