maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Automatically launch brower on startup - Help - n800 os2008 (https://talk.maemo.org/showthread.php?t=17168)

directore 2008-04-02 10:09

Re: Automatically launch brower on startup - Help - n800 os2008
 
DO NOT attempt it at home but this works, sort of. The idea here is that somebody competent will clean it up and post a more kosher version.

-----------------------------

In file /etc/osso-af-init/real-af-startup insert this:

Code:

/usr/bin/browser &
in this section:

Code:

....
  else
    if [ -x $AF_INIT_DIR/startup-wizard.sh ]; then
      source $AF_INIT_DIR/startup-wizard.sh start
    fi
   
    /usr/bin/browser &

    # Give Backup a chance to finish restoring task
    if [ -f $HOME/.osso-backup/last-restore.xml ]; then
  ....

I say sort of because a) I have not tested it extensively b) some browser startup parameters are missing and I don't know where they are c) the task is put in the background and I'm not sure this is the proper thing to do. But this works nevertheless, n800 boots and starts the browser automatically.

terrencegf 2008-04-04 14:42

Re: Automatically launch brower on startup - Help - n800 os2008
 
I think you are definitely on the right track. However, I think the "/usr/bin/browser&" line is in the wrong place. I think a better place is near the bottom just above the "stop)" line. For example, to start the browser with Google, you'd have something like this:
Code:

... 
  rm -f /tmp/im_disable_tools_menu

  /usr/bin/browser --url=http://google.com &

  ;;
stop)
...

I also tried using the "--full-screen" command line option for the browser, but the hildon toolbar icons at the top appear on top of the browser window, so obviously parts of the user interface get executed AFTER real-af-startup. Perhaps some other clever board member knows a better place to launch the browser.

mcdaniel_bill 2008-04-04 15:18

Re: Automatically launch brower on startup - Help - n800 os2008
 
Wow guys - now we're talkin! I'm going to carve out some time to try this and will post my results - thanks so much for your thoughts!

directore 2008-04-04 18:15

Re: Automatically launch brower on startup - Help - n800 os2008
 
It's relatively easy to trace the bootup process but my ssh is acting up again so you are on your own. ----full-screen is a valid option and it works as expected if invoked in xterm.


BTW here is the full list of options for the browser in os2800.
Code:

show-titleShow title for each tab windowenable-hiddenEnable hidden menu optionsfull-screenOpen browser in full screen modeforce-openOpen even without urlforce-showOpen even without initialized enginetime_loadClose browser after loading finishedtime_initClose browser on loading startedbind_onlyBrowser will only load engine library and exitviewSet view type tab/box/winVIEWSet engine name 'myengine' (libmyengine-eal.so.0 should be on filesystem)myengineSet first urlURL

mcdaniel_bill 2008-04-08 00:04

Re: Automatically launch brower on startup - Help - n800 os2008
 
I think this is a noob question, but when I try to edit the file and save it I get a permission denied write error - I'm accessing the file through the xterm on the device and using vi to edit it - perhaps it remains locked by the OS? should I access it and edit it another way?

Benson 2008-04-08 00:10

Re: Automatically launch brower on startup - Help - n800 os2008
 
Must needs be root; sudo gainroot. You will need to install becomeroot for this to work.

architect 2008-04-08 00:57

Re: Automatically launch brower on startup - Help - n800 os2008
 
like he said^

type "sudo gainroot" on the first line when you open xterm... then you are admin...




im going to mess around with this and see what happens... thanks guys...


has anyone else tried it? I am assuming OS 2008 right?

architect 2008-04-08 01:23

Re: Automatically launch brower on startup - Help - n800 os2008
 
can I do this through xterminal or do I have to get ssh???

mcdaniel_bill 2008-04-08 02:24

Re: Automatically launch brower on startup - Help - n800 os2008
 
Quote:

Originally Posted by architect (Post 166610)
like he said^

type "sudo gainroot" on the first line when you open xterm... then you are admin...




im going to mess around with this and see what happens... thanks guys...


has anyone else tried it? I am assuming OS 2008 right?

Yes - this whole discussion thread has been on os2008. After sudo gainroot I see a message "enable RD mode if you want to break your device" - cute... ;)

Benson 2008-04-08 14:12

Re: Automatically launch brower on startup - Help - n800 os2008
 
Install becomeroot. (Or use the flasher to enable RD, but that's the hard way.)


All times are GMT. The time now is 05:38.

vBulletin® Version 3.8.8