Bootable Qt-Linux Application - linux

How to boot a linux kernel + dependencies and auto run a Qt application so the linux environment doesn't show up (only the Qt GUI is visible)?
on x86 PCs
should be able to run from RAM (of course)

Perhaps you could look at how this guy did it:
http://www.embedded-bits.co.uk/2011/1-second-linux-boot-to-qt/

You could start with a minimal linux distribution such as Ubuntu Server and install only X-Windows (without any Window Manager) on top of it: https://help.ubuntu.com/community/ServerGUI
Then, start your Qt application by adding a call to it in the .xinitrc initialization script.

Might be helpfull Linux Journal KDE Kiosk Mode

Why not run x server without window manager and the running the application in full screen mode on that x server.
to start x server type startx
and then you must run your application in fullscreen mode
(your app must support this mode by argument switch like this)
./myapp --fullscreen

I have never tried this, but try google for 'framebuffer'. It should allow you to run a single application with no need for X server.

Related

How to open a VS Code IDE from Linux subsystem on Windows?

I'm running a Linux subsystem with an Ubuntu terminal inside Windows 10 - I wanted to make use of the functionalities of both operating systems without partitions or virtual machines.
In an Ubuntu terminal on Linux, I use the command 'code .' to open up the VS Code IDE but it doesn't seem to work when the terminal is part of a subsystem on Windows.
I can open up the IDE from Windows 10 and set my path into the Linux system but I remember reading some guidance that it's okay to save files from the Linux onto the Windows side but not vice versa.
Any solutions are much appreciated, thanks in advance!
If you wish to invoke windows binaries from WSL (Windows Subsystem for Linux) like for the example you want to run visual-studio-code, you can do so by setting your visual-code's installation directory into your %PATH% system variable and invoking it using this way
$ [application-name].exe notice the .exe is important.
And this interoperability is added in the Fall Creator Update of windows.
You can follow this documentation from Microsoft for more help.

Raspberry PI remote debug GTK error

I'm using NetBeans IDE 8.0.2 on my Win7 machine to develop Raspberry Pi opencv C++ application.
I'm building & debugging the application remotely on the Raspberry Pi from my Win7 machine.
At run time the application fails with "Gtk-WARNING **: cannot open display:" error when reaches the line:
imshow("source", src);
When I'm running the exact same application from the Raspberry Pi and not remotely via SSH everything works as expected.
Is there any way that I can configure NetBeans to open GTK windows at the Raspberry Pi?
The solution is to add DISPLAY=:0 Environment variable.
At File menu select Project Properties (yourprojectname) to open Project Properties window.
At Categories: click Run and then click Environment, add variable name DISPLAY with value :0
Good luck
I haven't actually tried this with the Rasberry Pi, but assuming it is like other linux systems perhaps this will get you started.
To have the Gtk program display on your windows system will need a version of X Windows ( the linux/unix graphics server) for Windows the operating system. You can get it as one of the packages in Cygwin. (http://x.cygwin.com/) Get cygwin https://cygwin.com/index.html during setup select the xinit package. You also either need to enable port-forwarding in ssh or set the DISPLAY variable on the Rasberry Pi to your windows host:0.
To have the Gtk program display on the Rasberry Pi when started from Windows you just need to allow remote hosts to open windows.
Try the command :
xhost +
in the Rasberry Pi shell before trying to have the program started from windows.
Another option would be to start the program on the Rasberry Pi with gdbserver and then attach to the already running program with Netbeans.
You will need to install the gdbserver plugin for Netbeans.
An alternative to getting the X window manager working on Windows would be to get a remote desktop running on both machines. VNC is a popular client and server for this. This would allow you to run the window for Netbeans and use the system as if it were your desktop from another location.
There is even a download specifically for Raspberry pi here:
https://www.realvnc.com/download/vnc/latest/

Black Console after automated Debian UEFI install

I try to build a reproducible automated build environment based on Debian 8.1 Jessie.
I created a boot iso image based on a netinstall image and put a preseed.cfg file in int for automatic installation.
I managed to get it bootable with BIOS and UEFI and can install a KDE Developer Debian in VMWare Workstation 11 fully automated.
I have also a server iso image to install a debian Server with Jenkins, both with BIOS and UEFI Boot.
But after the installation, the Version with UEFI Boot shows a black Screen when started.
I can blindly log in, start the gui with "startx" and see my installed xfce desktop. When i quit xfce the console is usable and visible.
I tried suggested bootparameters "nomodeset" and "vga=Linux" that i found with google to no avail.
I also tried to debug the boot prozess, to find out which command leads to a blank screen, but i did not find the right place to delay the processes at bootup so i can see when the messages dissapear (quiet bootparameter was removed :-)
I also tried to reset the console to no avail.
Can anybode point me to a tool that does the same "switching" like X so the console is useable?
Can anybody give me some hints how to debug the bootprocess to find out which command is causing this behaviour?
I dont want to install X because this should be a headless server system later.
I managed to get my system to boot using the kernel command line modprobe.blacklist=vmwgfx, or placing 'blacklist vmwgfx' in /etc/modprobe.d/*.conf
I assume it is some bug in the vmwgfx module, however as this workaround works for me I have no immediate need to investigate further.

Linux - Avoinding x server message when running .exe with wine

I'm trying to run a .exe file (that uses some other .dll files) with wine, in Ubuntu 11.04, command line, but i get an error regarding the x server not being started and that a window is being created (i attached a screenshot).
When I run it normally (normal ubuntu boot, x server running) everything is ok, but actually, no window is displayed, which is normal because no window is needed for the program to run. So I just want to know if there is a way to avoid that: somehow simulating that the x server is open or to set $DISPLAY in some way to "fool" the program.
Just use Xvfb.
Xvfb :1 &
DISPLAY=:1 wine ...

Attach/Detach to a remote instance of Eclipse

When using Eclipse over X-Windows on a remote shell (X port forwarding), is there a way to simply detach my X connection and come back to the process later. For a little more clarity, I'm on a Windows machine and have to reboot. I'd like to keep Eclipse running and come back where I left off. Eclipse is running on my Windows machine through an X-Server connected to a Linux box.
I'm thinking something like tmux could do the trick. However, I do a Ctrl-Z to stop Eclipse and it won't close the Eclipse Window. If I restart the X-Server in Windows, Eclipse fails when I try fg 1. Any other options?
Xpra did everything that I needed, but it was not clear exactly how it worked. I was able to get it working by opening two PuTTY sessions in windows, one server and one client. Also, the Google Code is out-dated. Instead, install from http://xpra.devloop.org.uk/dists/xpra-0.0.7.9.tar.bz2. I'm not sure how it's different, but it worked for me. The README tells how to build the package. It is necessary to apt-get a bunch of other stuff. But, here are the missing pieces on how to get it work as I describe above:
Setup server:
cd ~/download/xpra/xpra-0.0.7.9
export PYTHONPATH=$PWD/install/lib/python:$PYTHONPATH
./install/bin/xpra start :10
export DISPLAY=:10
xterm&
Setup client:
cd ~/download/xpra/xpra-0.0.7.9
export PYTHONPATH=$PWD/install/lib/python:$PYTHONPATH
./install/bin/xpra attach :10
Notes:
The Windows xpra installer is not needed for this configuration. I don't know what it's supposed to do.
Be sure to run Xming on Windows.
Be sure to enable X port forwarding on the client PuTTY window.
Launch whatever you want from the xterm window. (ie Eclipse)
You can close the server window once xterm is up.
Hit ctrl-c in the client window to detach from the session.
Do all the client commands again to re-attach..even after restarting PuTTY, the Xming, or Windows itself.
I have zero experience with it, but xpra sounds like exactly what you're looking for.

Resources