Navigatrix.net - A Voyager's Companion
http://navigatrix.net/

automatically start program or script at logon?
http://navigatrix.net/viewtopic.php?f=4&t=792
Page 1 of 1

Author:  pgo [ 24 Apr 2015, 05:00 ]
Post subject:  automatically start program or script at logon?

Wanted to have AIS Dispatcher autostarting. I have a script with all command line options, how to make it autostarting?

Regards
Piotr

Author:  Moe [ 24 Apr 2015, 08:58 ]
Post subject:  Re: automatically start program or script at logon?

There are a number of ways to do this
  • execute the command by inserting before the last line in the file /etc/rc.local and than flipping the executable bit
    Code:
    sudo medit /etc/rc.local
    and then
    Code:
    sudo chmod +x /etc/rc.local
  • or placing the script (file) in your home directory ~/.config/autostart.sh
    Code:
    cp <whatever> ~/.config/autostart.sh
    and then ensure it is executable with
    Code:
    chmod +x ~/.config/autostart.sh
The latter method is less drama.

Author:  Moe [ 25 Apr 2015, 08:56 ]
Post subject:  Re: automatically start program or script at logon?

I'm curious. What do you do with this AIS Dispatcher?

What would I be doing if I wanted this to even be on the system?

Author:  pgo [ 25 Apr 2015, 10:17 ]
Post subject:  Re: automatically start program or script at logon?

Contributing to MarineTraffic / online AIS target tracking system. Use my Comar 200 transponder linked to vYacht NMEA>TCP bridge to listen to AIS messages and them I'm forwarding 'em to
http://www.marinetraffic.com/en/ais/det ... tions/2580

Author:  Moe [ 25 Apr 2015, 22:57 ]
Post subject:  Re: automatically start program or script at logon?

When I said that ~/.config/autostart was less drama I wasn't aware that to call an application required a .desktop file. Such as
Code:
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=AIS_Dispather
Comment=Something notable about AIS Dispatcher
Exec= aisdispatcher -t -h data.aishub.net -p 1234 -H 127.0.0.1:5000,192.168.1.5:5001 -x10 -y60
Icon=preferences-desktop-theme.png
Terminal=false
Type=Application
Categories=Network;
If you
Code:
medit~/.config.autostart/ais_dispatcher.desktop
and paste in something like the text about the command after Exec= is executed. In this case aisdispatcher -t -h data.aishub.net -p 1234 -H 127.0.0.1:5000,192.168.1.5:5001 -x10 -y60

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/