I want to execute a shell script on startup but only for LiveCD session not for harddisk installation.

Which directory should I put my shell script?

For example Ubuntu somehow detecting LiveCD session and putting these icons to desktop:

enter image description here

closed as unclear what you're asking by Panther, Eric Carvalho, bcbc, Wilf, mikewhatever Mar 1 '15 at 22:56

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What is the point of the screen shot? What do you want to change ? post your script (pastebin) – Panther Feb 28 '15 at 12:50
  • @bohdi.zazen Screenshot tells us there is a difference between LiveCD session and harddisk installation. For example: I want to execute Mozilla Firefox automatically on only LiveCD session. Command just ´firefox´ but where should I put it? – mertyildiran Feb 28 '15 at 18:23

Booting from a live CD is booting nothing else but what is on the CD. We won't be able to control this from our existing installation on our hard drive because our computer will not access it during boot.

We may however create a customized live session to include all we need there:

How to customize the Ubuntu Live CD?

On a live session desktop icons will be .desktop files in /home/ubuntu/Desktop/.

  • You also have to tell us what you want to do exactly. generally you are going to want to either write a boot (Upstart) script, modify the boot scripts, or if you really need a one time stand alone script, have the script delete itself as the last command in the script. – Panther Feb 28 '15 at 12:45
  • @Takkat I'm using Relinux for creating my custom liveCD. I think you are telling me, LiveCD session generating by Relinux. OK then how can I modify LiveCD session and put a script on startup in Relinux? – mertyildiran Feb 28 '15 at 18:28
  • 1
    @mertyildiran: as Bodhi said... you should edit your question giving us as much details as possible to eventually find somebody having experience with Relinx guiding you (I have never used it, so I will be of little help there). – Takkat Feb 28 '15 at 18:45

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