1

I'm working on some tuning of my raspberry pi b+. So I decided that midori should start automaticly after autologin. With startx it works without problems, but X is still to ressource hungry. So I'll start midori with xinit and matchbox.

As test, I use as user "pi" this command "xinit ./home/pi/startmidori.sh" and it works. So I'll put this into my rc.local file.

There is the command "su -l pi -c xinit ./home/pi/startmidori.sh", this doesn't work. I don't know why, but xinit exit immediately after starting. There's no errors or warning in Xorg logfile, but the known one (module g3d_23 not found).

How can I solve this? In guides I found some kind of solution, but all of them don't work. I tryed to run it as root but it doesn't work, too. I've no idea why.

4
  • 1
    If X is resource hungry, I am not sure how changing startx xinit would help at all? After all, startx is practically the same as xinit ~/.xinitrc ... Aug 21, 2014 at 11:20
  • 1
    So, instead of call su -l pi -c xinit blabla, I call su -l pi -c startx, and put in /home/pi/.xinitrc the content of startmidori.sh (which is: xset -dpms xset s off xset s noblank matchbox-window-manager & midori -e Fullscreen) or can I add a path to a .sh file in .xinitrc? Aug 21, 2014 at 11:27
  • update: okay adding the .sh file to xinitrc and changing the su command from xinit to startx works pretty well. but i don't understand why the xinit ./home/pi/startmidori.sh with su -l pi -c not works, but as pi user it's fine. Is it a behavior from xinit? Aug 21, 2014 at 11:34
  • @user3048888 to exit the browser i use CTRL + ALT + F1, but how can i close/exit the startx in the console? Any idea? CTRL + C is not working.
    – BenRoe
    May 11, 2015 at 0:17

2 Answers 2

1

Instead of xinit use startx.

Open rc.local

sudo nano /etc/rc.local

and use

su -l pi -c startx /home/pi/startmidori.sh

This solution works for me if i us the PiTFT, but if i connect a display via HDMI it start's only the GUI/Desktop but not Midori.

0

With last version of Raspbian (RaspiOS), you need the next steps

sudo apt-get install --no-install-recommends xserver-xorg xserver-xorg-legacy xinit xterm 

Add permissions to Anybody

sudo dpkg-reconfigure xserver-xorg-legacy

Verify that the user is in the next groups:

adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c gpio

If you launch from rc.local xinit or startx, start it with the user:

 sudo su -l newuser -c "xinit"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .