The Navigatrix has been updated. The new website can be found at navigatrix.net.




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: automatically start program or script at logon?

Joined: 02 Mar 2015, 11:32
Posts: 5
Wanted to have AIS Dispatcher autostarting. I have a script with all command line options, how to make it autostarting?

Regards
Piotr


Top
   
 
 Post subject: Re: automatically start program or script at logon?

Joined: 04 Nov 2010, 20:51
Posts: 1062
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.


Top
   
 
 Post subject: Re: automatically start program or script at logon?

Joined: 04 Nov 2010, 20:51
Posts: 1062
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?


Top
   
 
 Post subject: Re: automatically start program or script at logon?

Joined: 02 Mar 2015, 11:32
Posts: 5
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


Top
   
 
 Post subject: Re: automatically start program or script at logon?

Joined: 04 Nov 2010, 20:51
Posts: 1062
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


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Search for:
cron

Credits © 2010 - 2024