drips
Posts: 6
Joined: Sat Jan 30, 2016 10:35 am

Can't autostart Midori

Thu Feb 04, 2016 2:51 pm

Hello!
I've bought the Pi 2, running Jessie and I am trying to autostart midori, but the Pi just boots to the default screen. I read on this forum (viewtopic.php?f=91&t=131760&p=0&e=0&sid ... 59d35ef44e) that I should use the autostart in LXDE-pi, instead of the one in LXDE. But I can't get it to work.

So I am using the autostart located in:
" nano ~/.config/lxsession/LXDE-pi/autostart "

And this is what my autostart looks like:

Code: Select all

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash


@xset s off
@xset -dpms
@xset s noblank
@midori -e Fullscreen -a http://google.com
I appreciate all the help I can get!

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Can't autostart Midori

Thu Feb 04, 2016 4:03 pm

That should work, maybe it's some of the parameters you're feeding it that is causing it to fail. The "Fullscreen" parameter with no leading dashes would be my first suspect, but I haven't used midori so that may not be the problem.

Start simple and work up from there. I'd use a simple "@midori" first, and if the browser starts up OK then start adding parameters one at a time, the fullscreen, URL, etc.

I don't have midori installed, so I added "@epiphany" to the autostart, just to test, and it started up with the desktop.

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Can't autostart Midori

Thu Feb 04, 2016 5:28 pm

The real puzzle is why do you want Midori. There's kweb3 and (on a RPi2) Chromium which are both orders of magnitude better than Midori. Even Iceweasel & epiphany are better than Midori (which is truly awful).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

drips
Posts: 6
Joined: Sat Jan 30, 2016 10:35 am

Re: Can't autostart Midori

Thu Feb 04, 2016 5:39 pm

Thanks JimmyN! I'll try when I get home.

DougieLawson: I heard that Midori was alright, I already installed chromium but thought the problem was with Chromium, so I installed Midori to try.
So I understand that you recommend Chromium over Midori? Why is Midori awful?

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Can't autostart Midori

Thu Feb 04, 2016 6:19 pm

drips wrote:Why is Midori awful?
Because it's slow and ugly and missing features like HTML5. The RPF folks have dropped that in favour of Epiphany.

On a RPi2 there's a lot to recommend running Chromium 45.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Walby
Posts: 5
Joined: Tue Feb 02, 2016 8:43 pm

Re: Can't autostart Midori

Fri Feb 05, 2016 12:48 pm

I just tried adding @midori -e Fullscreen and it works fine.

My question is, what's up with Chromium? I have tried installing it 3-4 times and each time it bricks my install. Each time it ends up not booting. I have learned how to clone my SD card when I get to a good spot, like quick save in a game!

drips
Posts: 6
Joined: Sat Jan 30, 2016 10:35 am

Re: Can't autostart Midori

Fri Feb 05, 2016 5:32 pm

Ok, so I've tried removing all the parameters, and restarting with just @midori (and separately; @chromium) but with the same result. The pi boots to desktop, and nothing else.

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Can't autostart Midori

Fri Feb 05, 2016 5:38 pm

Walby wrote:My question is, what's up with Chromium?
Nothing.
I have tried installing it 3-4 times and each time it bricks my install. Each time it ends up not booting. I have learned how to clone my SD card when I get to a good spot, like quick save in a game!
If you're running an up-to-date Raspbian and following kusti8's instructions on this forum for installing Chromium 45 and it's breaking your install, you're either not following the instructions correctly or have a serious problem elsewhere.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Can't autostart Midori

Fri Feb 05, 2016 7:15 pm

Something is definitely wrong. Lets check a couple of things.

First: Can you open LXTerminal and start it from there, using "midori"?

Second: Add this line to the autostart file, just below your "@midori" line

Code: Select all

@touch /home/pi/Desktop/autostartworks
After you reboot you should have an empty file on your Desktop named "autostartworks".

If you can start it from the commandline using "midori", and the autostart created a new file on your desktop then I don't have a clue at this point as to why "@midori" isn't working. I'll give it some thought, and I'm sure somebody will have some additional things you can check.

drips
Posts: 6
Joined: Sat Jan 30, 2016 10:35 am

Re: Can't autostart Midori

Sat Feb 06, 2016 10:41 am

JimmyN wrote: First: Can you open LXTerminal and start it from there, using "midori"?
Maybe a dumb question, but is the command for starting an application simply the applications name?
So if I simply type "midori" in the terminal midori should start?
When I do that, I get the response
"-bash: midori: command not found"

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Can't autostart Midori

Sat Feb 06, 2016 11:55 am

Generally yes, if the executable is in a location that is included in your path environment. If it's something like a Python script then you may need to preface it with "python" so it knows what to run it with. But if it's a binary then just the name will suffice.

Let's see where it is located and try a full path to start it. Try this command

Code: Select all

which midori
That will return the full path to midori. Then try starting it from the terminal using the full path.

I don't have midori installed, so here is an example I just copied from my screen to find epiphany instead.

Code: Select all

 jimmy@ rpi3: ~/Desktop
>$ which epiphany
/usr/bin/epiphany

 jimmy@ rpi3: ~/Desktop
>$ /usr/bin/epiphany
The browser should open over top of the terminal window, which will stay open until you close it.

If the "which" command can't find it try

Code: Select all

apt --installed list
The list will be in alphabetical order, scroll down and see if midori is there.

drips
Posts: 6
Joined: Sat Jan 30, 2016 10:35 am

Re: Can't autostart Midori

Sat Feb 06, 2016 12:56 pm

Success!
With "apt --installed list" I found out that midori wasn't installed correctly, but chromium was (although it was called "chromium-browser" and not just "chromium") so I used @chromium-browser instead and @touch, and voila! Now I just need to figure out how to hide the cursor and the "chromium did not shut down properly" message.

This is what my autostart looks like now:

Code: Select all

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash


@xset s off
@xset -dpms
@xset s noblank



@chromium-browser -e -a --kiosk http://localhost
@touch
/home/pi/Desktop/autostartworks


Thanks a lot JimmyN!

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Can't autostart Midori

Sat Feb 06, 2016 5:46 pm

Good job, excellent work!

You don't need to keep the "touch" command. That was just to make sure your autostart was working, by having it create an empty file on the Desktop when it ran. At the time we didn't know what the problem was, so we needed to check everything. You can remove that line and delete the "autostartworks" file.

But keep it in mind, using "touch" in that manner can be a handy diagnostic tool if you want to confirm that something is executing.

obliviousmnd
Posts: 1
Joined: Mon Feb 08, 2016 11:06 pm

Re: Can't autostart Midori

Mon Feb 08, 2016 11:09 pm

I stumbled across this post having a similar issue, chromium is installed correctly however cannot get anything to execute from autostart, keeps loading to desktop. Tried @touch command with no luck. Any change you can direct me on where to go from here?

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Can't autostart Midori

Tue Feb 09, 2016 1:30 pm

obliviousmnd wrote:I stumbled across this post having a similar issue, chromium is installed correctly however cannot get anything to execute from autostart, keeps loading to desktop. Tried @touch command with no luck. Any change you can direct me on where to go from here?
Can you open LXTerminal and start Chromium from a command line?
Are you using the autostart file at "/home/pi/.config/lxsession/LXDE-pi/autostart" ?
Show us what your autostart file contains.

Older Raspbian releases used a different autostart location, so that may be your problem. If you don't have a user autostart at "/home/pi/.config/lxsession/LXDE-pi/autostart" (the file came up empty when you tried to edit it with nano) then use the global autostart at "/etc/xdg/lxsession/LXDE-pi/autostart". Or if you're really outdated the directory will be /LXDE/ rather than /LXDE-pi/ so it would be found at "/etc/xdg/lxsession/LXDE/autostart".

Return to “Beginners”