LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 06-24-2008, 10:26 AM   #1
Pavan Goyal
LQ Newbie
 
Registered: Jun 2008
Posts: 14

Rep: Reputation: 0
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.

Regards
Pavan
 
Old 06-24-2008, 07:17 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,990
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
"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.
 
Old 06-25-2008, 12:01 AM   #3
Pavan Goyal
LQ Newbie
 
Registered: Jun 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Hello
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.

Regards
Pavan
 
Old 06-25-2008, 05:18 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,990
Blog Entries: 54

Rep: Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743Reputation: 2743
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:
Code:
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; }
 
Old 06-30-2008, 01:10 AM   #5
Pavan Goyal
LQ Newbie
 
Registered: Jun 2008
Posts: 14

Original Poster
Rep: Reputation: 0
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 myserver.com . 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
 
Old 07-15-2008, 05:04 AM   #6
resetreset
Senior Member
 
Registered: Mar 2008
Location: India
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,320

Rep: Reputation: 51
ctrl-alt-bacspace to kill X or ctrl-alt-f1 to go to a text terminal
 
Old 07-15-2008, 05:46 AM   #7
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Quote:
Originally Posted by resetreset View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
customize initrd to boot it from network pankajtakawale Linux - Kernel 2 01-05-2007 12:44 AM
How do you customize scripts' sequence number for different runlevels? Akhran Debian 2 03-25-2006 03:23 AM
prob. how to delete linux root,repartition and change boot sequence ratboyslim Linux - Software 5 05-08-2005 12:34 PM
Linux boot sequence sixth_sense Linux - General 2 04-14-2005 11:25 AM


All times are GMT -5. The time now is 05:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration