Looking for a super tiny linux distro that's sole purpose is running an AIR application? - linux

I'm looking for a really really small linux distribution or process of making my own that's sole purpose is to get an air application to launch full screen and stay there; Essentially I'm building a home kitchen computer that runs entirely as an AIR app.
I have looked into using windows xp; and windows xp embedded but they pose so many issues I figured I'd try modern linux.
I have also seen TinyCore Linux which looks interestingly small but not sure what issues that poses in regards to running AIR and "hardware" accelerated display. I've also thought about stripping down an Ubuntu installation but I'm sure somebody must have done this already; google is just failing me right now...
I'm also interested in running an "embedded" version of say android and running the air app on some arm-based hardware again; with just the AIR runtimes only - although this is less preferred as it's more complex.
I'm also hooking this up to a touch screen monitor (not yet arrived) so I'll need to hunt down or write some drivers for translating the touch events into something AIR can understand... (this was my main intention for using windows in that all the drivers will just work).
What I'm after
Minified Linux kernel with JUST the drivers for the box I need
X Display with accelerated graphics support (Doesn't have to be X if AIR can run on a frame buffer?)
Running a Full screen AIR application (simple enough)
Ability to write back to the filesystem (enough support for AIR)
SSH Access for remote control
Samba for updating the filesystem (easier to maintain the system)
Touch screen support (3M Ex III I think...)
Audio support
Don't need
Don't need any window manager or any other GUI tools unless required by AIR
Don't need any toolbars or file managers or anything; The AIR app is the "OS"
Don't need any package managers or repos
Don't need multi user or logging in; everything can just run as an unprivileged account
Don't need to
I don't mind hand crafting the filesystem and configs if that makes it easier; I'm mainly looking for a "filesystem" that is as tiny as possible that I can just plop my AIR app into and write some scripts to get it to start when the X server starts
Thanks,
Chris

Try an embedded Linux build system such as Buildroot. It can build an entire system from source, and be very lightweight. The basic system is less than 1 MB in size.

Ended up going with Tiny Core. Very tiny and quick to boot up. You can also write extensions for it and you don't have a persistent drive which allows you to just switch the thing off without worry that it's going to break something -- exactly what you need in a kitchen :-D.

My current plan is to:
Just set up a working version using Ubuntu as this is mostly supported by Adobe
Slowly strip it back and try and get as little things to start as possible on boot
Try building my own distro/package from source and selecting only the packages I need
Compile my own kernel with nearly everything turned off and just leave on the things I need

Related

How to create a Bootable GTK Application?

Hi i have an application written in GTK and i would like to make it into an bootable ISO file.
I have tried many options but have failed and being sent in many directions using cmake and make by following several tutorials which did not work.
Does anybody know how to create an bootable ISO file for / from an GTK based application on linux / ubuntu?
I am currently using ubuntu to develop the bootloading application yet i would prefer the GTK application to startup when the computer starts up, and have no operating system running if possible?
GTK requires an operating system kernel (a Linux kernel...) to be running, and some display server, e.g. Xorg.
So you need to actually make your custom Linux distribution.
I would prefer the GTK application to startup when the computer starts up, and have no operating system running
This is not possible
But you could study the source code of source based Linux distributions like Gentoo and work for several months to make your own Linux distribution.
You probably would need help and address many issues you did not even thought of (e.g. AZERTY keyboard layout, computers with only USB disks, laptops with only Wifi network connections, etc...)
Notice that Debian & Ubuntu can be configured to boot some (open source) GTK based installation procedure. I guess you could study in details their implementation (since it is open source)
It's not possible to boot a GTK application without operating system, as Basile Starynkevitch said.
However, you can use Linux to display only your GTK distribution, without any additional programs and I think it can be done easier, than Starynkevitch's method.
You can try to use the tool Systemback or similar to create a bootable live Linux distribution. Systemback is not maintained anymore but there is a github fork made by BluewhaleRobot that appears to be more up-to-date.
You can install a light Linux distribution, for example Xubuntu, and remove all unnecessary packages and programs. You can set the wallpaper, remove or leave the taskbar/menu start etc. Then, install your GTK application, add it to autorun and use Systemback's "Live system create" function.
The ISO image should be created and your program should be already installed in it with autorun.
It's not a perfect and stable solution, however, it seems to be the easiest way to achieve what you want.

How to fix tearing in Qt Quick app with Qt 5.9.1?

My app is having tearing problems when I scroll fast horizontally. Normally I'd just enable vsync, but I don't know how to do that in Qt. The tearing is occurring on my dev PC which runs Linux with a X-server, but it will also need to work well on the target system which is either Android or Linux+EGLFS.
One google result was from the Qt4 era and said that the tearing will be gone in Qt 5. But apparently it isn't.
Many google results are about env vars for embedded linux systems, such as QT_QPA_EGLFS_FORCEVSYNC, but I'd prefer the solution to work for my dev PC as well.
One google result said that vsync being enabled/disabled depends on the renderloop in use. I don't override the renderloop, so, since I'm on linux, I think I'm using the threaded renderloop.
Here's a bugreport about nvidia binary drivers causing this.
https://bugreports.qt.io/browse/QTBUG-45480
I too am using those drivers, so this may be it - just a driver bug. If so, at least it's unlikely to happen on my target hardware (I still haven't tested there), so that's good.

How to simulate ThreadX application on Windows OS

I have an application using ThreadX 5.1 as the kernel.
The Image is flashed on to a hardware running an ARM 9 processor.
I'm trying to build a Simulator for the application that can be run on Windows (say XP, 32-bit).
Is there any way I can make it run on Windows, without modifying the entire source code to start calling win32 system calls?
You can build a Simulator for the application that can be run on Windows with "ThreadX for Win32".
"ThreadX for Win32"'s specification is hear.
http://rtos.com/products/threadx/Win32
Yes you can if you are willing to put in the work.
First observe that each threadx system call has an equivalent posix call except for events.
So your threadx program can run as a single process using posix threads, mutexes, etc.
Events can be handled by an external library (there are a few out there).
If you find this difficult in windows then the simplest thing to do is set up a linux vm. I use an ubuntu vm running on Virtual Box. It is very easy to set up. All you will need is the cdt version of eclipse.
Next you need to stub out all of your low level system calls.
This is also easier than you might think. For example, if you have a SPI driver to read and write to flash, you can replace your flash with a big array which is quite easy to work with at this level.
Having said all this, you may get more mileage if your threadx application is modular. Then you can test each module on it's own and you don't need to mess with threads, etc.
As a first approximation this may give you what you need without going the distance to port the whole thing to run under posix.
I have done this successfully in the past and developed a full set of unit tests for a module that allowed me to develop and test it (on my mac) before going to the target. Development is much faster and reliable this way.
Another option you may want to consider is to find a qemu project that supports your microprocessor. With some work you can develop a complete simulator for your platform and then run the real firmware under the emulator.
Good luck.

How to simultaneously run multiple window managers (esp. xmonad) for VNC

I'll start with a little background. A small project of mine has been to try to use my Android tablet as an external monitor for my laptop using a VNC client (vnc4server). There are two main options for doing this that I have seen. The simplest is to use xrandr and widen the screen, creating a section just for the tablet. However, this can cause some graphics issues if I understand correctly, although it has the benefit of permitting windows to cross displays. The other option is to run a separate desktop session for the VNC server.
I have chosen to go the route of a second desktop as the session can live and die without significantly affecting my main session and can in theory be tailored specifically to the tablet. A little tool called x2vnc allows me to connect to the VNC server in a similar manner to the more popular Synergy and use it like a n external monitor. I also have the nice little benefit of being able to easily and cleanly switch from landscape to portrait using xrandr.
This brings me to my current issue. So far, I have only been able to reliably use plain x-windows. Although this is entirely functional, I would prefer something more complete. Although xstartup examples have been posted for a variety of window managers, none of these seem to run properly. I suspect all of these are for headless systems. Gnome/Unity are each unforgivably slow and seem to conflict with my existing session. I also feel that these are a little too cluttered for my ten inch tablet. On the other hand, Xmonad simply crashes as soon as I try to open a second window in addition to not updating the graphics properly.
I would like to know anything that will lead me in the direction of a better stable desktop environment. This includes configuration tips and alternate window managers.
I am currently running Ubuntu 12.04 with gnome-xmonad (recently Unity). My xstartup is plain x-window-manager. I have tried any readily available examples for gnome and xmonad that I have been able to find.

Best/Easy way to set up a quick booting Linux

Hopefully this still falls within StackOverflow's umbrella!
I'm looking to create a quick boot linux laptop for my wife. All it really needs is to be able to do is browse the internet (with flash and video etc.).
Are there any distros that are made for this, or any guides out there that show good ways to speed stuff up? I've read that I should "remove stuff from the kernel that I don't use" but that's a little out of my skill set.
Thanks!
If you're using Ubuntu (or a variant, like xubuntu or kubuntu), there is a package called BootUp-Manager. There's an article about it over at Lifehacker. It lets you check and uncheck things in the startup and shutdown scripts to optimize things (such as turning off checking for new hardware, or whatever)
You may also be able to gain a simple speed-up by going into System->Administration->Services and disabling any services you don't need.
If you'd like to see how much time is being spent on each part, install the package Bootchart, and that should give you a detailed profile of everything that goes on during startup, and let you focus on the most time-consuming parts, and measure your progress as you tune the system.
I believe Xubuntu is designed for low memory footprint/fast booting and whatnot while still having a decent amount of features. Not a Linux user but it just seems to stick out in my head.
Some guys got an EEE PC netbook booting in 5 seconds running a modified version of Fedora. Might be a good starting point: http://lwn.net/Articles/299483/
Try: Damn Small Linux is a very versatile 50MB mini desktop oriented Linux distribution.
Alternatively, get an Asus motherboard with expressgate - it has an onboard Linux (spashtop) that boots in 3 seconds. Its designed for quick web surfing, IM, music etc whilst still letting you boot into your main OS.
If you really want it to boot fast, I would suggest creating an initrd containing exactly the software you need to do what you want it to do. The initrd will get read from the disk once as one large file, and then everything will run out of ram.
This is not an easy solution, the easiest solution will be jishi's solution of using a Live CD, but, that won't be the fastest solution.
I have been using Kubuntu 14.04.4/5 on a Dell laptop with dual boot. Am not real happy at the moment with it. You are all correct about the slowness of a liveCD.
There are LiveCD-versions of working linux-distros with browser and installed flash, java.
Check out LiveCD
http://en.wikipedia.org/wiki/Live_CD
you will find links to different flavours with download.
There are also USB-drive-versions.

Resources