s699fx_bpr
Posts: 17
Joined: Sat Apr 16, 2016 4:10 am

customizing Rpi for sell

Thu Apr 21, 2016 1:27 am

Hi
I am new to raspberry pi and Linux
I am working on a Qt (commercial) project and i want to sell it . I designed a GUI program for a small controller system .
the problem is, it's awkward to sell Rpi like this ,user has to log in then see the desktop and then goes for a click on my program to open it , what if user goes for python or other features and messes everything up or deleting Qt lib or ... ? I want my raspberry to boot up , after showing raspberry icon goes directly for my app in full screen (no way to rescale ,minimize or close it ,I did designed a button on Qt for shut down my self )
now i have 4 questions :

1- how can i remove desktop but be able to run GUI (or maybe hide desktop ! doesn't matter ) ?
2- how can i put my program to start and disable all other features (including shell) to user(s)
3- how to do auto login
4- before i come to linux i was working with Windows CE and tiny210 , i had all these options in platform builder , when i came to Linux i couldn't have found a platform builder (or an equivalent) , Yocto comes with a desktop environment and has not enough tools to edit software (it might be good for people designing new hardware, port and config) ,buildroot takes a cruel and unfair time and effort to work for an unsatisfying exit (i'm not sure that even dose support GUI), is there any alternative to Platform builder for Linux?

thanks for your time

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: customizing Rpi for sell

Thu Apr 21, 2016 1:46 am

s699fx_bpr wrote: 1- how can i remove desktop but be able to run GUI (or maybe hide desktop ! doesn't matter ) ?
2- how can i put my program to start and disable all other features (including shell) to user(s)
3- how to do auto login
This response will be a starter, to get things rolling, and will necessarily be incomplete, but we´ll get there:

You will want to configure your PI to autoboot into the CLI. You can do this with raspi-config.

Next, you will want to run your GUI in the X server (but) without a window manager or desktop. Part of this will necessarily be awkward to setup but once going its pretty slick. The idea is to start X like this:

Code: Select all

#!/bin/sh
sudo /usr/bin/X -nolisten tcp :1 vt7 &
export DISPLAY=:1
sleep 2
exec ~/bin/yourscript.sh
This will start X server on virtual terminal (7) on display :1 and then it will run yourscript.sh which will start your
GUI and give the user control through your own interface.

The trick with the GUI is that you will need to start it with -geometry options that set its size and position since you will not have a window manager to handle that for you. You will need to experiment with this. While you are setting things up you can use the twm (tiny window manager) from the repository until you get things going (will let YOU move things around and resize them) and then on the final product just don´t start the twm.

sudo apt-get install twm

As for the rest of your questions (about RPi obfuscation, basically) when people find out that your product is an RPi under the covers they (some of them) are going to try to hack it... you cannot get around this simple truth.

But, you can deliberately remove the stuff from the RPi that you don´t need... one thing to do is start with a stripped down version of Raspbian--- Jessie lite; its on the downloads page.

If it were me, I´d have serveral development PIs and then I would have a couple of deliverable PI prototypes. Buildling yourself a toolset is up to you; you best know what you need.
marcus
:ugeek:

Dutch_Master
Posts: 362
Joined: Sat Jul 27, 2013 11:36 am

Re: customizing Rpi for sell

Thu Apr 21, 2016 2:52 am

Install the build-essential package for a tool chain. IDE's aplenty, if you know where to look. Hint: Synaptics.

Compiling stuff on the RPi is indeed frustratingly slow, investigate cross-compiling on the x86-64 platform (i.e. your desktop)

One more thing: because you're making money from your product (which is fine), do NOT make the mistake of treating the RPi community as your free tech-support. :roll: :evil: If your paying customer has a problem, and you can't fix it yourself, you pay someone to fix it for you, because you're a commercial vendor, not a hobbyist/enthusiast/charity :roll: (been there, done that, wore out the t-shirt long ago, not happening again :evil: Mind, I was on the receiving end, i.e. the "tech support team" on a forum elsewhere. Quit that when I found out we're being abused. No names, obviously)

s699fx_bpr
Posts: 17
Joined: Sat Apr 16, 2016 4:10 am

Re: customizing Rpi for sell

Thu Apr 21, 2016 8:31 am

MarkHaysHarris777 wrote:
s699fx_bpr wrote: 1- how can i remove desktop but be able to run GUI (or maybe hide desktop ! doesn't matter ) ?
2- how can i put my program to start and disable all other features (including shell) to user(s)
3- how to do auto login
This response will be a starter, to get things rolling, and will necessarily be incomplete, but we´ll get there:

You will want to configure your PI to autoboot into the CLI. You can do this with raspi-config.

.
thanks mark for your help, that was really helpfull
Dutch_Master wrote:Install the build-essential package for a tool chain. IDE's aplenty, if you know where to look. Hint: Synaptics.
One more thing: because you're making money from your product (which is fine), do NOT make the mistake of treating the RPi community as your free tech-support. :roll: :evil: If your paying customer has a problem, and you can't fix it yourself, you pay someone to fix it for you, because you're a commercial vendor, not a hobbyist/enthusiast/charity :roll: (been there, done that, wore out the t-shirt long ago, not happening again :evil: Mind, I was on the receiving end, i.e. the "tech support team" on a forum elsewhere. Quit that when I found out we're being abused. No names, obviously)
first of all thanks for helping me , i'm searching on your solutions ,tools chain Linaro is working fine ,but i'm searching for IDE using mentioned keyword .

second i,m so sorry if you feel threaten or used, i was not going to threat anyone or anything, i'm just an one man band working(no company / commercial trade mark) beside study and this project is for just one time sell of a 12V, 2A solar system not for an industrial scale, i was just asking for alternatives because i am not familiar to Linux i just came here from Microsoft world that for each click you should pay .
and i'm sorry again because you think someone who makes money is not an enthusiast or even charity ,for enthusiast if you are going to work on the field you love you at least need money for food to live and if you are going to take second job then there is no time to do both right so you have to make money from what you love and pay your time and focus on that and for charity there are many people making money but using their knowledge to help other people to reach them too (at least i can say i would and did do that in field that i'm good at), please don't think that way

in conclusion thanks for your help and so sorry that you feel that way

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: customizing Rpi for sell

Thu Apr 21, 2016 8:41 am

I don't think you will find point-and-click tools.
You will have to live with Yocto and buildroot - you
propably will need to understand those tools better , but
in theory GUI software can be included in buildroot builds.


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

s699fx_bpr
Posts: 17
Joined: Sat Apr 16, 2016 4:10 am

Re: customizing Rpi for sell

Thu Apr 21, 2016 3:41 pm

ghans wrote:I don't think you will find point-and-click tools.
You will have to live with Yocto and buildroot - you
propably will need to understand those tools better , but
in theory GUI software can be included in buildroot builds.
ghans
thanks for your comment my friend , the main problem with yocto is that it has its own GUI desktop ,a start like menu and some other futures and programs that's not what i am looking for .yocto image ,even in success will brig me back to the 1st to 3th question again :
s699fx_bpr wrote: 1- how can i remove desktop but be able to run GUI (or maybe hide desktop ! doesn't matter ) ?
2- how can i put my program to start and disable all other features (including shell) to user(s)
3- how to do auto login
maybe toaster has a option ,i just start reading about that .

about build root i'll now search again but last time i did the keywords (build root , GUI) didn't work ,if you know an "Ebook" link i would be more than happy .
unfortunately i am not available to access paper books in English (not available in our country).

up until now i could find many videos or PDFs about Qt and python and ... but from now on its very hard to find ,and even if ,posts are not exactly what i seek because of variety of variables .

this might be a very bad question and very general ,but for the first time when the foundation build the whezzy or other distributions what did they use to build their GUI env from scratch on the first place?

thanks again for your time

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: customizing Rpi for sell

Thu Apr 21, 2016 3:47 pm

s699fx_bpr wrote: this might be a very bad question and very general ,but for the first time when the foundation build the whezzy or other distributions what did they use to build their GUI env from scratch on the first place?
Actually, its a very good question. My attempt to answer it will be an over-simplification; be that as it may, the Raspbian images are based on the debian gnu+linux distribution upstream which has been cross-compiled for the Arm processor, 32 bit-- and then customized | optimized for the hardware specific to the RPi... um, it does not need to support ALL of the hardware that might be plugged into a PC, for an example.

But, for the most part, its debian!
marcus
:ugeek:

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: customizing Rpi for sell

Fri Apr 22, 2016 7:45 am

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “Beginners”