[Xastir] Start-up script?
Tom Russo
russo at bogodyn.org
Tue Aug 14 14:19:07 EDT 2012
On Tue, Aug 14, 2012 at 01:21:12PM -0400, we recorded a bogon-computron collision of the <qrv at kd4e.com> flavor, containing:
> I am new to ax25 and Xastir.
>
> What is the best script into which to insert:
>
> "kissattach /dev/ttyACM0 2 12.34.56.78"
>
> ... so that it executes first when Xastir is opened from the
> desktop (the icon opens /usr/bin/xastir), please?
>
> I am using Xastir in Puppy Linux Exprimo 5x15 (Debian
> Squeeze friendly).
>
> The hardware device is an ArgentData Tracker 3.
There is no script that Xastir executes that is appropriate for inserting
this kissattach command. Xastir only has "startup scripts" for dealing
with serial TNCs and such. It doesn't actually execute external commands,
just sends the contents of those startup scripts to the TNC (to set internal
TNC parameters). AX.25 isn't like that --- Xastir simply expects taht you've
set ax.25 up properly and uses the properly initialized port you provide.
Your best bet, if you want to start ax.25 right before starting Xastir and
close ax25 right after exiting Xastir, is to create your own script
(call it, say, "runxastir.sh") with the following contents:
#!/bin/sh
gksudo kissattach /dev/ttyACM0 2 12.34.56.78
xastir
gksudo killall -9 kissattach
Change this script to be executable, and make your icon run the script
instead of /usr/bin/xastir.
gksudo will prompt you for your password, because kissattach needs to run as
root. I use gksudo here instead of "sudo" because you are running from a
desktop icon, and gksudo will pop up a dialog box for the password, whereas
"sudo" does so on a terminal (which in your desktop icon mode, will not show
up).
But few people work in this mode when they're running ax.25, as far as I know.
A more common thing to do than starting/stopping ax.25 immediately before and
after running Xastir is just to start ax.25 (i.e. start kissattach) and leave
it running. As long as you don't have any other use for the serial port and
are not sending random traffic to ax.25 other than through Xastir, you can
leave it running for as long as the system's up, and Xastir can connect
and disconnect from the ax.25 port as needed.
On my systems that have ax.25, I have kissattach started at boot time and
so it's available until I explicitly shut it down. I think most folks who
use ax.25 do it that way.
But if you aren't using ax.25 for anything other than Xastir, and you are not
dedicating a serial port full-time to a TNC in kiss mode, you may be better
off using the Serial KISS TNC interface and let Xastir connect to directly
that without involving all of the ax.25 machinery.
--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
one trick, rational thinking, but when you're good and crazy, oooh, oooh,
oooh, the sky is the limit!" --- The Tick
More information about the Xastir
mailing list