I need suggestions. Currently fogger creates .desktop files for fogapps and puts them in ~/.local/share/applications so that they can be launched from dash or legacy app menus. Everything works as expected but these application shortcuts remain lying around after fogger is removed by the user thus cluttering the applications lens with useless entries. I've a couple of solutions in mind.

  • Ship fogger with a postremoval script which finds all fogapp .desktop files for every user and removes or disables them (Hidded attribute) and a preinstall script which again finds already present apps and enables thems. This should be straight forward but I'm not sure if it is considered a sane practice for deb files to mess with users' home directories.

  • Second solution is to keep all the .desktop files hidden by default and ship fogger with a special lens for launching fogapps. The draw back here is that fogapps will not be shown in legacy menus or launchers other than dash like synapse. Also, only 2 days are left to implement this and fix/improve/add other features.

| improve this question | | | | |

I don't know what fogger or a fogapp is, but there are some things you possibly should or shouldn't do:

  • The scripts in a debian package should not do anything to user-specific files. If the user decides to simply uninstall, and re-install, to try and solve some problem, this "solution" would result in all of those fogapps they had, no longer being accessible.

  • You can add TryExec to the desktop files, which the system will check for and hide the launcher from view, if the app is not installed.

How are these "fogapps" started exactly? If you tell me, I can update the answer to provide an example.

| improve this answer | | | | |
  • Fogger is a program he is working on which creates desktop apps (.desktop) from a website.Its like having a desktop shortcut for Twitter and so on.Much like Fluidapp. – dlin Jul 6 '12 at 19:54
  • Awesome! TryExec is exactly what is needed for this situation. Hide the .desktop files when the executable is not installed. Perfect! – Owais Lone Jul 6 '12 at 20:41

It's a very bad idea to have a postremoval modify user homes:

  • A user's home directory may be used with more than one system
  • On system with a very large user base it can take quite some time to delete all the files.
  • You may not be able to access the users's homes if they are encrypted or you need to authenticate before mounting them from a server.

I'd install a small clean up script in the user's home the first time he creates a fogapp .desktop file. You may even offer an option to only remove those files created on the current system.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.