mrdebug
Posts: 72
Joined: Sun Apr 07, 2013 6:08 pm

Raspberry and 320 x 240 lcd monitor

Mon Jun 09, 2014 7:32 am

Hi. I'm trying my raspberry pi with a 320 x 240 lcd monitor. All works well bnut I want do start the gui with startx and an application without using lxde.
How can I do this? I have spend on a lot of time without the solution.

Can you help me?
www. ???
www. ???
GMT+1
Skype: mrdebug

bust
Posts: 76
Joined: Mon Mar 17, 2014 12:31 am

Re: Raspberry and 320 x 240 lcd monitor

Mon Jun 09, 2014 11:04 am

Hi
Try this command line xinit -e (your graphic X11 program)
but same you don't have (WM) to move or resize the window
better you use
xinit -e openbox and after you would load your program from an x terminal
You have have also xfwm4 for replace openbox if you want,
(required you install xterm i think)
xfwm4 will manage only the windows.
Regards

bust
Posts: 76
Joined: Mon Mar 17, 2014 12:31 am

Re: Raspberry and 320 x 240 lcd monitor

Mon Jun 09, 2014 11:26 am

I have forget that you have also another choice it's to use (wayland with weston)

User avatar
Douglas6
Posts: 4860
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry and 320 x 240 lcd monitor

Mon Jun 09, 2014 12:49 pm

I have a similar problem, I think. Your question is confusing, because 'startx' starts lxde, so you can't have one without the other. What you may want (what I want) is to start a full-screen lxde app at boot without ever seeing the desktop.

What I have so far is autologin and an .xsession file with the commandline to start my (Java Swing) application. This way when I type 'startx' my app opens full-screen, and when I exit the app, I'm back at the command line. All the usual suspects to automate that 'startx' don't seem to work (raspi-config, .profile, /etc/local.d, a few others)

Any help?

[EDIT: Hmmmmm, xinit looks interesting, I'll have to play with that, thanks bust]

User avatar
Douglas6
Posts: 4860
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry and 320 x 240 lcd monitor

Wed Jun 11, 2014 2:00 am

Naturally, after googling long and hard, I was led right back to this forum for the correct answer: http://www.raspberrypi.org/forums/viewt ... p?p=344408

One small change for use with a different framebuffer:
Step 1. edit /etc/rc.local

Code: Select all

sudo nano /etc/rc.local
And add the following two lines at the bottom, just before 'exit 0'

Code: Select all

export FRAMEBUFFER=/dev/fb1
su -s /bin/bash -c startx pi &
Step 2. Just to be sure, make sure everyone can start x sessions:

Code: Select all

sudo dpkg-reconfigure x11-common
and make sure 'anybody' is selected.
Step 3. Specify the program to start in X. Edit /home/pi/.xinitrc

Code: Select all

nano ~/.xinitrc
and enter the command to start your program. In my case it was

Code: Select all

java -jar /home/pi/pipoint.jar -f
Change 'pi' everywhere to your user name. More detail in DaveDriesen's post, linked above. Works like a champ, thanks Dave!

Return to “Raspberry Pi OS”