I am using Ubuntu 14.04. I wrote a small script named trial. The contents of the script are as follows: #!/bin/shSHELL=/bin/shPATH=/bin:/sbin:/usr/bin:/usr/sbin     sh -c firefoxI copied the script to /etc/init.d, modified permission using chmod +x trial and used update-rc.d trial defaults. The file made link but when I rebooted the machine. It did not run firefox. I tried cron @reboot but with no success. I tried rc.local too again failure. I think something is wrong in my script. I am new to linux so can some one point out my mistake?
Run a GUI program at startup
scripting;x11;cron;startup;init.d
The directory, /etc/init.d/ contains system scripts that essentially start, stop, restart daemons (system services). It's the System V Initialization method (SysVinit), containing the init program (the first process that is run when the kernel has finished loading). (EDIT 2 July 2015: Many Linux systems have recently switched to the systemd init system.)But, Firefox is a graphical Web browser. As such, it needs the window server (X-Windows) and window manager to be started; and, you would need to be logged into the window manager to start Firefox. So, the task for you is to learn how to automatically start a program after you have logged into your window manager.Find the name of your window manager. Then search for help about automatically starting a program.