Multiple programs on Raspberry Pi Zero W - menu

I was wondering if you can have multiple programs on a Raspberry Pi Zero W installed and have an overview menu on the Raspberry where you can then choose one of your applications you want to run?
For example you have a program to stream videos from Youtube and Netflix and you have a program you can use for let's say your lighting. And you can go back to your overview menu any time.
I have started programming the streaming app and would like to have multiple apps/programs on one Raspberry I can then use as some sort of Alexa/Homepod.
Oh just to let you know, I would just like to know if it's possible, I am not asking for any kind of code or what so ever, I'm not here for letting someone else do the work.

You could build up a docker sistem, in order to run multiple containers on a single machine.
See the following link to start: https://markmcgookin.com/2019/08/04/how-to-install-docker-on-a-raspberry-pi-zero-w-running-raspbian-buster/

Related

How to add splash screen on custom linux(specially raspberry pi)

I currently have a project so basically what i want is to create an embedded linux in raspberry pi. What i want to achieve is to boot my custom made linux in my raspberry pi. I'm currently using Buildroot for that.
Here are the things what i want to happen:
Create a splash screen(How to implement this? What are the files on linux needed to edit. )
Override login prompt after booting(I want to use my own prompt which is i already created using python. What i want here is after booting my python app will be the first one to display)
Display my python application after booting.
WHAT files/configurations i need to know.
HOW to implement this. Process or a work flow.
Just like osmc or kido but i want to build my own also from scratch. Any help will be appreciated.
There are multiple components involved in splash screen. One is what you can display when u-boot starts and then the kernel takes over. You can get some information here and here. Both require re compilation of u-boot and Linux kernel. May be even some more additional steps depending on system. Also note this transition is not going to be smooth, between the logo displayed by u-boot and then the kernel.
On desktops, this is generally taken care of by software like Plymouth.
From what I understand, you want your python application to auto start after booting. Have a look at writing a systemd service for that as described here.

How to edit and run python scripts after installing an API in Raspbian?

I have been trying to follow the instructions on Click here in order to get my Raspberry Pi and Google Assistant to play music. I am a complete newby to all this so when each mouse click instruction isn't explicitly stated, I am lost.
So far in the instructions I am up to the Quickstart section. This is where I am lost. I have no idea where the scripts are they are talking about. Once I know where they are, do I just add my details into the functions and all of a sudden the Raspberry Pi will be able to play songs from my Google Music account?
Can someone please give me some advise on what I need to do so I am looking at the same information they are talking about in the Quickstart section?
I have no idea where the scripts are they are talking about.
These scripts don't exist yet. The API is an application program interface. It allows developers to interact with other programs. This API documentation assumes you know Python, and is introducing you to their API.
That being said, if you're not interested in learning python, I don't suggest you pursue this. Because on its' own, this library only gives you the power / option to control Google Play Music. It won't, like you said, suddenly allow the RPi to play songs. You'll need to write a script that awaits a command from the RPi, then plays the song.

Hardware+OS setup for an Application

I want to make a system which would get input from USB barcode scanner, validate it on remote server and display an answer (text and images).
I would use JavaFX or in-browser JS web application to grab scanner input somehow.
I'm planning to run this application on Raspberry Pi or plain PC.
Is there a way (or a special linux distribution) to ensure that system always loads the same way and starts JavaFX app or opens particular web page in browser?
e.g. no login page, NO update or other popups are shown.
Any other ideas? Thanks
...
Found an interesting solution here, where JavaFX GUI app is started from command line, without X-Server(linux graphical interface) at all.
I have recently done something similar, and it's not too hard. Obviously working on the Pi, you will want to use something like Linux and having limited hardware will mean that you should be minimising what you are running. Due to this, I would recomend that you run a light weight distro. Something like arch (which is what I used) allows you to build only what you want from the ground up without the need to find and compile everything like you do for LFS or Gentoo.
As for booting, the following two wikis will give you the details of starting the Gui without manual login:
https://wiki.archlinux.org/index.php/Automatic_login_to_virtual_console
https://wiki.archlinux.org/index.php/Start_X_at_Login
After that, it is simply a matter of putting the command to launch your program in .xinitrc.

Automate-it app using c for operating systems project

I am doing a project on OS. I am trying similar to AUTOMATE-IT app in android.
It's an app which automatically dims brightness, turn off WiFi when battery is low etc.
So I am trying something similar in Linux environment. I thought of using C language and thought of implementing the ideas as that app. Like reducing the brightness, turning off WiFi. But i just want to know whether it is possible to carry out in Linux operating system.
Like, are there any system calls or any other way to change the brightness or turn off WiFi using C program . Does Linux allows it?
I tried surfing over the web, but i couldn't get a proper idea, so I thought of asking here.
If it can be carried out, to what extent I can do in Linux ?

DIY: Project remove VGA cable by sharing screen over wifi to TV

This is one of my coding projects. I'm fairly new to linux, so I need some pointers and thoughts from you guys, before I get started. I know there exists screen sharing software already, but I want to make my own! (=
Specifically, I want to clone my laptop screen to my TV over WLAN, via a linux box that is connected to a TV through a VGA cable:
Laptop streams it's screen
Linux box reads the stream
Linux box outputs the stream into the TV (through a VGA cable)
First of all, how do I record the screen and send the stream in real time in linux?
Secondly I must write a program that reads the stream being sent. The program must listen to some port, and collect the data being streamed from the laptop. Any thoughts?
Then I must output that data in real time to the TV. Do you how any ideas on how to solve this?
Thanks!
Edit: Regarding programming languages, I'm most comfortable with python.
Sharing your screen can be done via the various flavors of VNC (ie. RealVNC, TightVNC, UltraVNC, etc.). Most of them are Open Source, you might want to:
Stick with the VNC protocol for later compatibility
Take example of how the established solutions does for screen-hooking.
In Linux, the graphics are all processed by Xorg (new version of X Server), which was developed with networking embedded. This explains why you can ssh -X into a machine, execute a graphical interface on it and see it on your remote computer. I recommend you to read about hooks on Xorg to achieve your needs.
You need a client-server topology to achieve your needs. You are not talking about any programming language you forecast to use, though. Some languages may be harder than some to start with. Furthermore, this kind of code is already really well understood under every major programming language. You should try to at least use a framework that simplifies your networking portion of the project.
Sharing a screen on the TV can be done by your video card driver in Linux. Just check on your Desktop Environment (KDE and Gnome offers video configuration panels, for example) or in your video card configuration (nVidia and ATI Linux drivers offers multiple screen support)
It seems to me like you're trying to reinvent the wheel and are not too sure about how to begin. I recommend you to begin simple with one of the already proven VNC software and see how it goes from there. If a feature is missing, you've got the source code of the server and the client, so you can continue development of these projects. Once you've got your setup working, start thinking about replacing a single piece of the puzzle by your own code, and see how it goes.
Do not expect good (full HD, for instance) video quality on your TV without some very capable CPU/GPU and a 802.11n wireless network empty of users and be ready to accept some lag for the codecs to kick in.
You should try to take as small steps as possible. If I were taking up such a project, my first step would be to try to implement a solution using standard unix tools (e.g. netcat or socat for the network part, mplayer or vlc for the playback and maybe ffmpeg for the capture)? Then, replace each component with custom-written ones if needed.

Resources