rjarea51
Posts: 4
Joined: Thu Aug 09, 2018 9:31 am

VNC directly to an application not desktop

Sat Aug 18, 2018 9:38 am

HI
I am new to raspberry, so I am not sure if what I want to do is possible.
I don’t want a cable for my monitor, so the idea is to use VNC on an Android phone. I have a question about VNC starting directly to an application not desktop
I have setup the following:
1. tightvncserver
2. Additionally I installed the Xorg/Xserver package

Code: Select all

sudo apt-get install xserver-xorg-core xserver-xorg-input-all \
xserver-xorg-video-fbdev libx11-6 x11-common \
x11-utils x11-xkb-utils x11-xserver-utils xterm lightdm openbox
Android side:
1. JuiceSSH
2. VNC Viewer

On the VNC Viewer I receive the following error:
Xsession: unable to start X session --- no "/home/pi/.xsession" file, no
"/home/pi/.Xsession" file, no session managers, no window managers, and no
terminal emulators found; aborting.
I presume this error occurs because I don’t have a GUI core (lxde-core lxappearance) installed.

The application I want to get started is in "crontab –e" is
@reboot sudo python /home/pi/StratuxHud/stratux_hud.py &

Do I have to install the core GUI?
Is it possible to VNC the application "stratux_hud" automatically?

Any help would be appreciated

fruitoftheloom
Posts: 17277
Joined: Tue Mar 25, 2014 12:40 pm

Re: VNC directly to an application not desktop

Sat Aug 18, 2018 12:53 pm

rjarea51 wrote:
Sat Aug 18, 2018 9:38 am
HI
I am new to raspberry, so I am not sure if what I want to do is possible.
I don’t want a cable for my monitor, so the idea is to use VNC on an Android phone. I have a question about VNC starting directly to an application not desktop
I have setup the following:
1. tightvncserver
2. Additionally I installed the Xorg/Xserver package

Code: Select all

sudo apt-get install xserver-xorg-core xserver-xorg-input-all \
xserver-xorg-video-fbdev libx11-6 x11-common \
x11-utils x11-xkb-utils x11-xserver-utils xterm lightdm openbox
Android side:
1. JuiceSSH
2. VNC Viewer

On the VNC Viewer I receive the following error:
Xsession: unable to start X session --- no "/home/pi/.xsession" file, no
"/home/pi/.Xsession" file, no session managers, no window managers, and no
terminal emulators found; aborting.
I presume this error occurs because I don’t have a GUI core (lxde-core lxappearance) installed.

The application I want to get started is in "crontab –e" is
@reboot sudo python /home/pi/StratuxHud/stratux_hud.py &

Do I have to install the core GUI?
Is it possible to VNC the application "stratux_hud" automatically?

Any help would be appreciated

Why not use RealVNC included with Raspbian Stretch ?


As your RPi is headless, RealVNC has an option:

Creating and remoting a virtual desktop


https://www.realvnc.com/en/connect/docs ... ry-pi.html
Adieu

User avatar
thagrol
Posts: 811
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: VNC directly to an application not desktop

Sat Aug 18, 2018 6:59 pm

rjarea51 wrote:
Sat Aug 18, 2018 9:38 am
Do I have to install the core GUI?
if your python program depends on X11, yes, you do.
Is it possible to VNC the application "stratux_hud" automatically?
Probably. Instead of calling your program directly, start your X server so it calls your program rather than the default window manager.

Code: Select all

startx /path/to/program
used to work but I believe modern linux security prevents this now.

Alternatively, install the raspbian gui and reconfigure it to launch the desired program in place of its window manager then configure the Pi to boot directly into the desktop and skip cron.

Can't help you directly as I don't run the gui and have never had this particular requirement. Google and the relevant man pages should help.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

Return to “Troubleshooting”

Who is online

Users browsing this forum: klricks, Paeryn and 19 guests