4

I am working on a project that needs a special GUI that takes up the full screen.

I know I can make the X-Window system start up on boot (using raspi-config then changing the setting) but is it possible to just load the bare minimum to display the GUI (created in Glade) and then automatically start the python script? I don't want to display the desktop ever, as it is a type of Virtual Operating System.

RPiAwesomeness
  • 3,001
  • 4
  • 30
  • 51
  • You can autostart programs using sudo nano ~/.config/autostart/FullScreenApp.desktop and then use pygtk gtk.Window.fullscreen() (I didn't try) – Thomas Weller Jul 27 '16 at 22:16

3 Answers3

4

Drawing directly on the screen (frame buffer) is actually much faster than using X when you are using Broadcom's VideoCore (OpenVG) library. The major resources you need to look at, including examples and source code, are already pre-installed on Rapsberry Pi. For example, try this in console mode:

cd /opt/vc/src/hello_pi/hello_triangle
sudo make
./hello_triangle

You will see a full screen GUI is shown. You may also want to look at a very nice wrapper library that makes using OpenVG much easier, which includes additional very nice examples.

For starting up a program automatically, you can add it in your /etc/rc.local file, just before exit 0, like this:

#....
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

/your/path/your_fancy_gui &>/dev/null &

exit 0

Note you need to use & to put the program in the background, or the system boot sequence would be stopped there until you program quits.

Penghe Geng
  • 361
  • 1
  • 5
  • 10
  • Perfect! This is EXACTLY what I was looking for! Thank you so much! Will definitely include a reference to you in the final product somewhere somehow! – RPiAwesomeness Sep 13 '13 at 01:08
-1

You need some kind of window manager to have a GUI. You could make a text based UI instead! (ncurses may be helpful)

Enrico
  • 99
  • 2
  • That I know, but I was hoping to find a slightly more in-depth answer if it is possible. I know that I need some kind of window manager, but I don't want to display any icons, menus, menu-bars, window border (Name, Icon, Buttons)s, etc. I just want to be able to display a window (blank, white) so that I can make a simple UI for the Virtual OS. – RPiAwesomeness Sep 11 '13 at 19:39
-1

You don't need a window manager, or even X.

I'm starting up to the console and running a program via auto-login. The program simply draws the GUI on the framebuffer.

John La Rooy
  • 11,947
  • 9
  • 47
  • 75
  • That's possible? Do you have any links to sites I could look at for info on this, or some of the code/special setup that you used? That would be great, thanks – RPiAwesomeness Sep 12 '13 at 12:06