Saturday, July 16, 2016

16.04 - Configuring startup apps during ISO customization in UCK


I would like to customize ubuntu image that would have pre-configured autostartup. In general, user goes to "Startup Applications" GUI and adds a specific command to be run on the start up. The answer in this question points out the the /home/user/.config/autostart directory. I assume I can simply add files there with the content like below that would execute on startup.


[Desktop Entry]
Type=Application
Exec=gnome-terminal -e "sudo /home/user/bin/myScript.sh"
Hidden=false
NoDisplay=false
X-GNOME-autostart-enabled=true
Name[en_US]=MY APP
Name=MY APP
Comment[en EN]=
Comment=

Using this approach, I would like to add the startup files to the ISO image "opened" by UCK into the remaster-root/home/user/.config/autostart directory, but it does not exist for obvious reasons - the user has not been created yet (this only happens on the installation boot?).


Is there an alternative way to pre-configure the ISO image, so after installation the script runs on system startup?



Scripts that you wanted started in a custom ISO, you put in the following folder:


remaster-root/etc/skel/.config/autostart/

as when the ISO boots the /etc/skel/ folder becomes the default user. There is where you can also put desktop icons and shortcuts or other scripts that you want.


Hope this helps!


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...