I'm using <fileShortcut> to create desktop shortcuts. When the user runs installbuilder with sudo, the shortcuts are locked because the ownership is set to "root". So, I use ${installer_is_root_install} to detect the installer is run with root privileges. Then, I use <changeOwnerAndGroup> to change the ownership/group to ${env(SUDO_USER)}.

If I run <changeOwnerAndGroup> from inside the project's <postInstallationActionList>, the shortcuts' ownership are not changed. Putting <changeOwnerAndGroup> inside <finalPageActionList> changes the ownership, but requires the user to respond to a check-box prompt.

Can I disable the checkbox prompt in <finalPageActionList> or use another method to automate the change of ownership to the user running the installer?

asked 11 Jun '12, 02:21

tahoar's gravatar image

accept rate: 42%

Sorry, I retested the code from inside <postinstallationactionlist> and it now works.

(11 Jun '12, 02:24) tahoar

Running this action in <postInstallationActionList> works as you have mentioned in your comment.

Also, if you want to run an action after installation finishes (i.e. do some initialization, but after user exits the installer), you can simply set <show> to 0 for the specified action. It will be run, but not shown in the final page.


answered 11 Jun '12, 03:52

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

Thanks. One more observation. The project's <postinstallationactionlist> is important. If I put the <changeownerandgroup> in the component's <postinstallationactionlist>, it doesn't work.

(12 Jun '12, 12:28) tahoar

Is there a variable for the path to the shortcut? I am using the GUI and the <fileshortcut> parameter doesn't change permissions. I suspect it needs to have the ${...} syntax.


answered 11 Jun '12, 18:33

conzar's gravatar image

accept rate: 0%

Answer: /home/${env(SUDO_USER)}/Desktop/<shortcut name="">

(11 Jun '12, 19:40) conzar
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 11 Jun '12, 02:21

Seen: 1,266 times

Last updated: 12 Jun '12, 12:28