5

I am running a Python application in kiosk mode on ubuntu 18.04. I want to take it on remote which is outside of local environment. I tried the port forwarding which is unsuccessful due to router.

I used teleconsole to take on remote it is successful but when i run in kiosk mode it failed because session got closed. Seems Linux is killing processes automatically in kiosk mode. I need Teleconsole process to be alive to get the remote access of the desktop.

Any help about how to keep this session alive till the machine is running? Or About how to prevent ubuntu from killing the process automatically?

To run the ubuntu in kiosk mode i used two scripts placed at /usr/share/xsession/ location

kiosk.desktop

[Desktop Entry]
Encoding=UTF-8
Name= Kiosk Mode
Comment=Starting Kiosk Mode
Exec=/usr/share/xsessions/pulsekiosk.sh
Type=Application

switchtokiosk.sh

#!/bin/bash
xset s off
xset s noblank
nm-applet &
sleep 5s
while true; do
    sh /booth/run.sh;
    sleep 5s;
done
OshoParth
  • 1,492
  • 2
  • 20
  • 44
Sachin Singh
  • 607
  • 4
  • 22

2 Answers2

0

Basically you wanted to remote SSH into the remote ubuntu system. I tried Yaler several times for my IoT field gateway and it always works accurately. Sometimes, network error might close the connection but retrying always works if network is stable. Yaler used to provide trial but not sure they are providing now. Of course, it is not free service but the price for the kind of service is worth. Give it a try.

Regarding processes being killed during remote operation, write a shell script to check for process_id and rerun the program in case kiosk application get killed.

Prasan Dutt
  • 203
  • 2
  • 9
0

Ok, this is just my work-notes for installing VNC on a raspberry, may be really incomplete, but hopefully it guides you to set up a stable conncetion to your device!

VNC: apt-get install vnc-server (version??)

From pc to raspberry: vnc://:poort (5901)

/usr/bin/tightvncserver

cd /etc && grep -irn "chromium" *

On your Raspberry Pi, either download the VNC DEB package, or run the following commands sequentially:

curl -L -o VNC.tar.gz https://www.realvnc.com/download/binary/latest/debian/arm/



tar xvf VNC.tar.gz

Install VNC Server (installing VNC Viewer as well means you can remotely access computers from your Pi, if you wish):

sudo dpkg -i <VNC-Server-package-name>.deb [<VNC-Viewer-package-name>.deb]



sudo systemctl enable vncserver-x11-serviced.service



x11vnc -display :0 -usepw -listen IP_of_pi -allow allowed_ip_address (not really important)

raspi-config -> enable vnc in advanced options

apt-get install fail2ban

cd /etc/fail2ban
cp jail.conf jail.local



nano jail.local

look for SSH

maxretry = 3
bantime = 3600

save

UnpassableWizard
  • 1,237
  • 11
  • 20