[Xastir] One last problem to solve

James Cameron vk2lqz at wia.org.au
Sun Mar 14 06:02:25 EDT 2010


Ray wrote:
> How about a shell script with sleep <seconds> before the command to
> start xastir

This is a simple solution which will generally work, but every now and
then it might not work, such as when wireless access point association
is delayed by noise.  Better would be a script that waited for the WiFi
network interface to be available before starting Xastir.  Best would be
changing Xastir so that it retries a failed or timed out connection.

On Sat, Mar 13, 2010 at 05:41:55PM -0500, Jacob Tennant wrote:
> Great idea except I am a Linux novice and have no idea how to do what
> you just mentioned to do.

Here's how.

1.  Applications -> Accessories -> Text Editor,

2.  add these three lines to the empty text editor buffer:

#!/bin/sh
(sleep 60 && xastir) &
exec gnome-session

3.  save the file with a name .xsession , taking care that each letter
of the file name is in lowercase,

4.  log out and log in again.

As a result, Xastir should be started one minute after the GNOME session
has been started.  The way this works is to run a subshell consisting of
a one minute delay followed by starting Xastir.  That subshell is run in
the background, which is what the ampersand (&) character does.  The
session shell then runs gnome-session, which is the normal way that the
system starts everything graphical.

You MUST be very careful in creating that .xsession file, because if you
get it wrong (for example leaving off the ampersand character) you might
prevent normal use of the computer.  If this happens, log in at a text
console (Ctrl/Alt/F2) and remove the file:

	rm .xsession

This will restore things back the way they were.

Oh, there's also a possibility you might have an .xsession file already;
if so, just add the second line above the last line.

-- 
James Cameron
http://quozl.linux.org.au/



More information about the Xastir mailing list