Keep VRS running after closing telnet session

Are you having trouble getting Virtual Radar Server installed and running? If so then this is the place to ask about it.
Post Reply
peteclyde
Posts: 5
Joined: Fri Dec 23, 2016 2:47 am

Keep VRS running after closing telnet session

Post by peteclyde » Fri Dec 23, 2016 2:55 am

Hey all,

I've got VRS running on my Pi3 - to get it started I telnet / ssh into the Pi, and run

Code: Select all

mono VirtualRadar.exe -nogui
I've got no troubles access the web interface, as well as the admin section.

However, when I either hit the Q button in the ssh session, or close Putty, the program stops. I've tried ctrl-x and trying to make it a foreground job to no avail.

I'm sure there's an easy way to do it but a search of the forums hasn't helped me as yet.

I even tried setting it to load on boot but even then I'm not having any luck.

Any help appreciated.

Pete

peteclyde
Posts: 5
Joined: Fri Dec 23, 2016 2:47 am

Re: Keep VRS running after closing telnet session

Post by peteclyde » Mon Dec 26, 2016 10:36 pm

OK, got it sorted, not sure if it's the best way but it works.

Installed tmux on my Raspberry pi

Code: Select all

pi@raspberrypi:~ $ sudo apt-get install tmux
Started tmux

Code: Select all

pi@raspberrypi:~ $ tmux
Inside the tmux terminal I started VRS

Code: Select all

mono /home/pi/vrs/VirtualRadar.exe -nogui
Then to exit tmux, but leave VRS running, I did Ctrl+b then d

Seems to work fine and resolved my issue.

argz
Posts: 11
Joined: Sun Dec 04, 2016 6:12 pm
Location: UUBW
Contact:

Re: Keep VRS running after closing telnet session

Post by argz » Tue Dec 27, 2016 10:38 am

I'm sure there's an easy way to do it
You can just do

Code: Select all

mono /home/pi/vrs/VirtualRadar.exe -nogui &
Pleace notice & symbol in the end of the command.

This will force mono to run in the background.
I even tried setting it to load on boot
You should use Cron.
1. Create in the home directory file vrs.sh with the following text:

Code: Select all

#!/bin/sh
mono /home/pi/vrs/VirtualRadar.exe -nogui
2. Make sure the script is executable

Code: Select all

chmod +x  /home/pi/vrs.sh
3. Open crontab editor

Code: Select all

crontab -e
4. Add this code

Code: Select all

@reboot  /home/pi/vrs.sh
5. Close editor (do not forget to save)
6. Check jobs

Code: Select all

crontab -l
7. Reboot your RPi
8. Enjoy!

peteclyde
Posts: 5
Joined: Fri Dec 23, 2016 2:47 am

Re: Keep VRS running after closing telnet session

Post by peteclyde » Wed Dec 28, 2016 5:33 am

Hey Argz,

The first option

Code: Select all

mono /home/pi/vrs/VirtualRadar.exe -nogui &
didn't work, but the second one works fine.

Code: Select all

#!/bin/sh
mono /home/pi/vrs/VirtualRadar.exe -nogui
chmod +x  /home/pi/vrs.sh
crontab -e
@reboot  /home/pi/vrs.sh
Thanks heaps,

Pete

argz
Posts: 11
Joined: Sun Dec 04, 2016 6:12 pm
Location: UUBW
Contact:

Re: Keep VRS running after closing telnet session

Post by argz » Wed Dec 28, 2016 10:23 am

peteclyde wrote:The first option

Code: Select all

mono /home/pi/vrs/VirtualRadar.exe -nogui &
didn't work,
Could you post here a terminal output after this command?

peteclyde
Posts: 5
Joined: Fri Dec 23, 2016 2:47 am

Re: Keep VRS running after closing telnet session

Post by peteclyde » Thu Dec 29, 2016 4:52 am

Hi

It just started the program as if the & wasn't there.... like the & had no effect.

PM

argz
Posts: 11
Joined: Sun Dec 04, 2016 6:12 pm
Location: UUBW
Contact:

Re: Keep VRS running after closing telnet session

Post by argz » Thu Dec 29, 2016 8:22 am

peteclyde wrote: like the & had no effect
After you run

Code: Select all

mono /home/pi/vrs/VirtualRadar.exe -nogui &
press enter. After that you should be able to run new commands.

peteclyde
Posts: 5
Joined: Fri Dec 23, 2016 2:47 am

Re: Keep VRS running after closing telnet session

Post by peteclyde » Thu Dec 29, 2016 9:32 am

Program stops when I start it with &

Code: Select all

pi@raspberrypi:~ $ mono /home/pi/vrs/VirtualRadar.exe -nogui &
[1] 1238
pi@raspberrypi:~ $ Parsing command-line parameters
Initialising the log
Initialising user manager
Loading the configuration
Starting picture folder cache
Opening the BaseStation database
Loading standing data
Initialising air pressure manager
Connecting to data feed
Starting web server
Starting rebroadcast servers
Initialising UPnP manager
Connecting server to Internet via UPnP
Initialising online lookup manager
Starting plugins
Local address: http://127.0.0.1:8080/VirtualRadar
Network address: http://192.168.1.229:8080/VirtualRadar
Press Q to quit


[1]+  Stopped                 mono /home/pi/vrs/VirtualRadar.exe -nogui

argz
Posts: 11
Joined: Sun Dec 04, 2016 6:12 pm
Location: UUBW
Contact:

Re: Keep VRS running after closing telnet session

Post by argz » Thu Dec 29, 2016 9:50 pm

Try this maybe:

Code: Select all

mono /home/pi/vrs/VirtualRadar.exe -nogui &>/dev/null

scoobydobedooo
Posts: 45
Joined: Thu Oct 05, 2017 1:47 pm
Contact:

Re: Keep VRS running after closing telnet session

Post by scoobydobedooo » Thu Jan 18, 2018 7:30 pm

hey,
probs to late now but i had the same issue, i fixed it by installing screen to the linux system.

i then open the server throw putty and type screen then enter.

then i run the the vrs then once open i press ctrl a and d and theis puts vrs into screen mode which then allows you to access other stuff on the server or allows you to close out of the server complete allowing vrs to still run :)

ben
i have a home base station im willing to share data from. if intressed let me know :)

Post Reply