0

I'm currently struggling to get chromium-browser start with a predefined url.

I have a script running this :

startx chromium-browser

That works fine to start Chromium with X, but why can't I specify any argument to chromium-browser ?? I was thinking of something like that :

startx chromium-browser --app=http://my.predefined.url

That just won't work (even if I specify only the url whithout the app mode). when I look to the code, it seems that --app=URL is recognized as a startx argument and not as a chromium-browser argument.

My linux knowledge is limited, and I did'nt find any solution. Can somebody help me ?

I'm running Retropie 2.6 (debian)

  • 1
    "when I look to the code, it seems that --app=URL is recognized as a startx argument and not as a chromium-browser argument." -> When you look at what code?!? By my reading of man startx, this should pass the option to the client app (chromium browser). – goldilocks Jun 8 '15 at 18:50
  • Does startx "chromium-browser --app=http://my.predefined.url" work? – Wilf Jun 8 '15 at 20:33
2

There are for sure more elegant ways to do this, but if your URL is fixed, you can make a short bash script (nano /home/pi/startbrowser.sh) with the following content:

#!/bin/bash
chromium-browser --app=http://my.predefined.url

Make sure the file is executable (chmod 744 /home/pi/startbrowser.sh) and then you can issue

startx /home/pi/startbrowser.sh

To start chromium with the url you specified.

| improve this answer | |
  • Thanks, that is an improvement but still not ok : I think emulationstation is causing X some issues. If i launch startx /home/pi/startbrowser.sh it work, but if put this into a script (with chmod 755), the script do load chromium at the right url but, but cause a "stuck in blank screen" isssue (it can't load any page nor settings page). I'm still trying to find out how to run it whithout this bug, using a script. – Nabla Jun 8 '15 at 17:38
0

Finally I used midori following the steps of this post

and everything is now okay.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.