bedesda
Posts: 7
Joined: Sun Jun 07, 2015 4:30 am

Minimalistic system

Sun Jun 07, 2015 9:19 pm

Hello everyone, in a first time, I want you to pardon me for my poor english, it isn't my native language.

I started a new project with as you can guess a raspberry pi, but I meet 2 problems which may have a common issue, at the end, the raspberry will only have one interface that will be able to launch the same program, so I don't need a Desktop or even an accessible terminal to the user (there won't be any keyboard or internet connection, only buttons plugged to the GPIO pins).
So my 2 problems are that I need to find an easy way to produce a TUI (Text-based user interface) with a menu that the user could use with the buttons I talked to you earlier, the TUI will give access to programs installed on the PI. I have some knowledge in programming but I doubt on my capabilities to make something clean. Here is an idea of the kind of interface I'm looking for:
l.jpg
l.jpg (27.28 KiB) Viewed 1325 times
And my second problem is the boot time that is way too long, I guess than because I won't use the full capabilities of the PI, I wouldn't need to load the Ethernet or the USB. Just to boot up on the interface I talked to you about, I was wondering if buildroot would be the answer to this problem.
Thank you a lot for reading and I hope you could show me the path to solve those problems.

The Pi Of Life
Posts: 9
Joined: Mon Jun 01, 2015 1:25 pm
Location: Belgium
Contact: Website

Re: Minimalistic system

Sun Jun 07, 2015 10:23 pm

Hello,

You can check dpkg for repositories you will not use for your setup:

Code: Select all

dpkg -l | less
for example if you will not use audio you can remove all audio-related packages (omxplayer, jackd, jackd2)
There is a thread here somewhere where the safe-to-remove-packages are listed.

Code: Select all

sudo apt-get remove --purge package-name-goes-here
After that you need to search for orphaned files

Code: Select all

sudo apt-get install deborphan
sudo apt-get remove --purge $(deborphan)
Last step is removing all repositories that are no longer in use:

Code: Select all

sudo apt-get autoremove
sudo apt-get autoclean
and reboot.

For the second part of your question I would take a look at python and gtk. This module provides an easy way to create a simple gui.
http://www.pygtk.org/

bedesda
Posts: 7
Joined: Sun Jun 07, 2015 4:30 am

Re: Minimalistic system

Sun Jun 07, 2015 10:36 pm

Thank you really much for your answer, I will try them as soon as I can.
Do you think it is the method used by those guys?
www.youtube.com/watch?v=4Fjfqz6FxC8
www.youtube.com/watch?v=gAbfAMCLL5w
But thank you again and PyGTK seems perfect for me.

The Pi Of Life
Posts: 9
Joined: Mon Jun 01, 2015 1:25 pm
Location: Belgium
Contact: Website

Re: Minimalistic system

Sun Jun 07, 2015 10:52 pm

The pi's in the video have been made with Buildroot. This takes things a step further. It is a tool that creates fully customized systems.

http://cellux.github.io/articles/diy-li ... ot-part-1/

This is for the more advanced user. it is not just removing some unneeded packages!

bedesda
Posts: 7
Joined: Sun Jun 07, 2015 4:30 am

Re: Minimalistic system

Sun Jun 07, 2015 11:03 pm

Yes this is what I was thinking about, to make things well I think I'll combine buildroot with a python script using PyGTK

Edit: I started to look at it and PyGTK isn't really what I'm looking for, where this program is using GUI, I'm more looking into terminal apps
Like this http://upload.wikimedia.org/wikipedia/e ... Fdrake.png

Edit 2#: I may have found a solution to my problem, using ncurses or npyscreen
http://www.gnu.org/software/ncurses/
https://code.google.com/p/npyscreen/

Thank you really much for your help, and good luck to everyone that would come here

Return to “General programming discussion”