-   Linux - Embedded & Single-board computer (
-   -   Customize linux boot sequence (

Pavan Goyal 06-24-2008 11:26 AM

Customize linux boot sequence
Dear All,

I'm developing one thin client (disk less). Here linux kernel will be on flash drive. Machine will boot from flash drive. I need to change boot sequence to launch firefox web browser instead of xwindows's login screen.
Please advise.


unSpawn 06-24-2008 08:17 PM

"startx" starts "xinit" which starts the "X" server. Looking at the ~/.xinitrc example in 'man 1 xinit' you see applications get started and finally the Window Manager. Just replace all that with Firefox and you're done. BTW, you're saying "xwindows's login screen", if nothing requires an X Display Manager like gdm, kdm or xdm or a Desktop Environment like GNOME, KDE, XFCE or whatever else be sure to check if you can remove unnecessary packages. *There is another way that integrates OK if you allow people to choose and run a DE like GNOME, KDE, XFCE or whatever else. If that's what you're looking for just indicate that.

Pavan Goyal 06-25-2008 01:01 AM

Thanks for your reply. I've fedora core 6 running on my machine. I booted my machine in init level 3. After login into the system i just executed command xinit /usr/bin/firefox and firefox client got launched. But when I closed the browser, my whole screen became blank (black) and I had to reboot my machine...
Actually I want to run my machine in init 1 and run onle application that will communicate over network and get some url and firefox should be launched with this url and when I close firefox, my another application should (say "hello world") should be started, this application may also lauch browser...

So any idea .. how to achieve this.


unSpawn 06-25-2008 06:18 AM

I'm pretty sure that rebooting the machine wasn't necessary and that if there where any errors they can be ironed out. While you can easily change its meaning, runlevel 1 typically is the runlevel w/o multi-user or networking. The ~/.xinitrc example shows you how to start applications in sequence. If you don't background them (bg or "&"), once they are closed then next in line will start. You'll want to start that from a wrapper you can fall back on in case of failure. Ideally you could start that wrapper from /etc/inittab: every time it gets killed off init will respawn it so there's no way the user will see a blank screen (unless there's other errors).

To get the idea here's a simple Bash function that calls itself to keep it running:

runSelf() { # Just execute the function to see.
 zenity --title Question --question "Run Configuration utility?";  [ $? -eq 0 ] && echo runConf
 zenity --title Question --question "Run Browser?";  [ $? -eq 0 ] && echo runURI
runSelf; }

Pavan Goyal 06-30-2008 02:10 AM

Thanks for your replies. Now I'm successfully able to launch browser.
I just did following...

Booted my machine, in init level 3 and got login prompt, I logged in as root. I executed command mannully, xnit /usr/bin/firefox . I got browser with my home page, I did some thing there and closed the browser. After closing the broser, I need to do some processing from command prompt.
Is it possible to get the same command promot from where I launched browser initially.
When I closed the broser, I got blank screen

resetreset 07-15-2008 06:04 AM

ctrl-alt-bacspace to kill X or ctrl-alt-f1 to go to a text terminal

pinniped 07-15-2008 06:46 AM


Originally Posted by resetreset (Post 3214944)
ctrl-alt-bacspace to kill X or ctrl-alt-f1 to go to a text terminal

Well, I would assume launching FireFox with no other options is part of implementing an "information kiosk" or similar. I would actually recommend editing the control files to ignore [ctl][alt][backspace] and [ctl][alt][F*] - at least shortly before release - otherwise a user may accidentally (or in rare cases, maliciously) put the machine into an unusable state (well, remote admin should still work). For all other control purposes I would recommend setting up the serial port (at 115kbps) to provide a ppp connection; in that scenario you can use another computer to 'dial in' (even though there's no dialling), get a shell, or even forward an X connection. Personally, there is no admin work that I can't get done in a plain text console. On the other hand, if these machines are connected to a network anyway and are given static IPs, you can simply log in via ssh from any authorized machine and do the same - no need for a serial port setup. The machines are also easily shut down via the network.

All times are GMT -5. The time now is 08:24 AM.