Re: [Xastir] Autostart Xastir

2018-02-21 Thread Joseph LaFerla
Hi

I have your exact same situation and I use VNC to configure and control the 
remote console remotely.  I used to use tigervnc which creates a virtual 
desktop and stopped using it for the same reason that Jason gives.

Joe
VA3JLF


Sent from Mail for Windows 10

From: Jason KG4WSV
Sent: Wednesday, February 21, 2018 10:17 AM
To: Max Harper; Xastir - APRS client software discussion
Subject: Re: [Xastir] Autostart Xastir

On Tue, Feb 20, 2018 at 9:28 PM, Max Harper  wrote:

> > Following the instructions at the provided link, I made the changes. It
> works, but with a twist. This machine runs AX.25, LDSPED, APRX and Xastir.
> It has a monitor connected but is normally used like a headless machine. I
> normally use SSH to make changes and VNC if I want to see Xastir. I can run
> most any aprs client on my PC or laptop and have it connect to LDSPED and
> see everything that the TNC sees. Since VNC doesn't actually show the
> console desktop, after a reboot I always had to VNC in and then start
> Xastir. At that point the console display would still show a login prompt.
> After making the change to the .config/lxsession/LXDE-pi/autostart file I
> rebooted. The console was showing a login prompt as expected. About 20
> minutes later when I used VNC to remote into the system I was looking at
> the desktop with Xastir running. But I could tell that it had been running
> for awhile because Xastir was displaying a full map full of stations and
> that takes awhile to populate. How did it know to run in the GUI session
> that only VNC uses? I'm not complaining because I always had to start
> Xastir manually before. I don't know what will happen if I login at the
> console and do a 'startx' to bring up a desktop. If it also starts Xastir
> then there would be two instances running. Can Xastir do that without
> coughing up a hairball?



[ i don't know what ldsped is, so factor that in as you read]

last question first, I'm pretty sure xastir assumes it's only running
once.  Multiple copies will definitely fight over server ports, serial
ports, etc. if you have those configured. IIRC I have ran multiple copies
using different config files, although I don't remember why I thought that
was a good idea at the time; it's been a while.


As far as VNC goes, there are multiple ways to use it.  One way is to
remotely connect to the graphical desktop that's on the physical console,
and view and/or control the physical console remotely.

The other way is to create a virtual console (without affecting the actual
desktop console) that is only visible to VNC.

If we're still talking about pis,
https://www.raspberrypi.org/documentation/remote-access/vnc/README.md has
some instructions for each method.

Since the instructions are for the user "pi"s desktop configuration, the
command will be executed for every desktop session, so yes your assumption
is correct - xastir will start a second copy on the physical console if you
run a desktop session there, and it probably won't work right.

If this is a system that you sometimes use when you're in front of it, and
sometimes remote in to, I'd probably use the VNC configuration that
connects me to the existing physical desktop instead of creating a virtual
desktop.  Of course that mean you'd need to restore the standard graphical
startup and autologin (which I assume isn't there, since you mention
startx).


-Jason
kg4wsv
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir

___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-21 Thread Jason KG4WSV
On Tue, Feb 20, 2018 at 9:28 PM, Max Harper  wrote:

> > Following the instructions at the provided link, I made the changes. It
> works, but with a twist. This machine runs AX.25, LDSPED, APRX and Xastir.
> It has a monitor connected but is normally used like a headless machine. I
> normally use SSH to make changes and VNC if I want to see Xastir. I can run
> most any aprs client on my PC or laptop and have it connect to LDSPED and
> see everything that the TNC sees. Since VNC doesn't actually show the
> console desktop, after a reboot I always had to VNC in and then start
> Xastir. At that point the console display would still show a login prompt.
> After making the change to the .config/lxsession/LXDE-pi/autostart file I
> rebooted. The console was showing a login prompt as expected. About 20
> minutes later when I used VNC to remote into the system I was looking at
> the desktop with Xastir running. But I could tell that it had been running
> for awhile because Xastir was displaying a full map full of stations and
> that takes awhile to populate. How did it know to run in the GUI session
> that only VNC uses? I'm not complaining because I always had to start
> Xastir manually before. I don't know what will happen if I login at the
> console and do a 'startx' to bring up a desktop. If it also starts Xastir
> then there would be two instances running. Can Xastir do that without
> coughing up a hairball?



[ i don't know what ldsped is, so factor that in as you read]

last question first, I'm pretty sure xastir assumes it's only running
once.  Multiple copies will definitely fight over server ports, serial
ports, etc. if you have those configured. IIRC I have ran multiple copies
using different config files, although I don't remember why I thought that
was a good idea at the time; it's been a while.


As far as VNC goes, there are multiple ways to use it.  One way is to
remotely connect to the graphical desktop that's on the physical console,
and view and/or control the physical console remotely.

The other way is to create a virtual console (without affecting the actual
desktop console) that is only visible to VNC.

If we're still talking about pis,
https://www.raspberrypi.org/documentation/remote-access/vnc/README.md has
some instructions for each method.

Since the instructions are for the user "pi"s desktop configuration, the
command will be executed for every desktop session, so yes your assumption
is correct - xastir will start a second copy on the physical console if you
run a desktop session there, and it probably won't work right.

If this is a system that you sometimes use when you're in front of it, and
sometimes remote in to, I'd probably use the VNC configuration that
connects me to the existing physical desktop instead of creating a virtual
desktop.  Of course that mean you'd need to restore the standard graphical
startup and autologin (which I assume isn't there, since you mention
startx).


-Jason
kg4wsv
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Max Harper
Following the instructions at the provided link, I made the changes. It works, 
but with a twist. This machine runs AX.25, LDSPED, APRX and Xastir. It has a 
monitor connected but is normally used like a headless machine. I normally use 
SSH to make changes and VNC if I want to see Xastir. I can run most any aprs 
client on my PC or laptop and have it connect to LDSPED and see everything that 
the TNC sees. Since VNC doesn't actually show the console desktop, after a 
reboot I always had to VNC in and then start Xastir. At that point the console 
display would still show a login prompt. After making the change to the 
.config/lxsession/LXDE-pi/autostart file I rebooted. The console was showing a 
login prompt as expected. About 20 minutes later when I used VNC to remote into 
the system I was looking at the desktop with Xastir running. But I could tell 
that it had been running for awhile because Xastir was displaying a full map 
full of stations and that takes awhile to populate. How did it know to run in 
the GUI session that only VNC uses? I'm not complaining because I always had to 
start Xastir manually before. I don't know what will happen if I login at the 
console and do a 'startx' to bring up a desktop. If it also starts Xastir then 
there would be two instances running. Can Xastir do that without coughing up a 
hairball?
Max KG4PID  From: Lee Bengston 
 To: Xastir - APRS client software discussion  
 Sent: Tuesday, February 20, 2018 4:14 PM
 Subject: Re: [Xastir] Autostart Xastir
   
On Feb 20, 2018 12:52 PM, "Jason KG4WSV"  wrote:

Pretty sure systemd would have the same problem as cron - the
application needs to be a child of the window manager so that the X
security is satisfied.


Agree


And Curt, if systemd scripts are easier than rc scripts then one of us
is looking at the wrong documentation.  :)


I had problems getting systemd scripts to work in Raspbian Jessie. Then I
tried Arch Linux on the Pi, and systemd worked great.  I did actually find
them easier than rc scripts, and it helped that Arch had its own systemd
documentation that was pretty good. I suspect Arch had an advantage of not
carrying the baggage of rc scripts prior to transitioning to systemd. Maybe
Stretch is better - haven't tried it on the Pi yet.


So back to the original question.  I read this:

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=139224

and sure enough I have a file  .config/lxsession/LXDE-pi/autostart

pi@raspberrypi:~ $ ls .config/lxsession/LXDE-pi/autostart
.config/lxsession/LXDE-pi/autostart

and it has some stuff in it:

pi@raspberrypi:~ $ cat .config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi


So i use my favorite editor to add this line to the end of that file:

@/usr/local/bin/xastir


and now xastir starts on boot.

-Jason
kg4wsv


Sounds definitive to me. Now I'm really curious if putting that same line
in this file will also work.

etc/xdg/lxsession/LXDE/startup

That file did work for me to start applications after LXDE started, but it
definitely wasn't in Raspbian Stretch at that time - was Wheezy if I
remember right.

Lee - K5DAT
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


   
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Jason KG4WSV


> On Feb 20, 2018, at 4:14 PM, Lee Bengston  wrote:
> 
> Sounds definitive to me. Now I'm really curious if putting that same line
> in this file will also work.
> 
> etc/xdg/lxsession/LXDE/startup

My pi isn’t available at the moment, but my wild guess is this may be a 
system-wide version that affects all users, and the one I edited is the 
individual users personalized version. 

-j

___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Joseph LaFerla
Hi

Using advice provide by you in the list I have managed to get xastir to boot 
successfully using the window manager.  The only thing that did not work is 
that I tried to run this script 


#!/bin/bash
# This shell starts xastir

echo "Starting  start_xastir script"

xastir &

exit
*
Xastir did start up but when I tried to close it File|Close, it did close but 
then opened up again.  So I removed the script and simply put 

@/usr/local/bin/xastir

And it works fine now.  Thanks again.

Joe
VA3JLF

Sent from Mail for Windows 10

From: Lee Bengston
Sent: Tuesday, February 20, 2018 5:14 PM
To: Xastir - APRS client software discussion
Subject: Re: [Xastir] Autostart Xastir

On Feb 20, 2018 12:52 PM, "Jason KG4WSV"  wrote:

Pretty sure systemd would have the same problem as cron - the
application needs to be a child of the window manager so that the X
security is satisfied.


Agree


And Curt, if systemd scripts are easier than rc scripts then one of us
is looking at the wrong documentation.  :)


I had problems getting systemd scripts to work in Raspbian Jessie. Then I
tried Arch Linux on the Pi, and systemd worked great.  I did actually find
them easier than rc scripts, and it helped that Arch had its own systemd
documentation that was pretty good. I suspect Arch had an advantage of not
carrying the baggage of rc scripts prior to transitioning to systemd. Maybe
Stretch is better - haven't tried it on the Pi yet.


So back to the original question.  I read this:

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=139224

and sure enough I have a file  .config/lxsession/LXDE-pi/autostart

pi@raspberrypi:~ $ ls .config/lxsession/LXDE-pi/autostart
.config/lxsession/LXDE-pi/autostart

and it has some stuff in it:

pi@raspberrypi:~ $ cat .config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi


So i use my favorite editor to add this line to the end of that file:

@/usr/local/bin/xastir


and now xastir starts on boot.

-Jason
kg4wsv


Sounds definitive to me. Now I'm really curious if putting that same line
in this file will also work.

etc/xdg/lxsession/LXDE/startup

That file did work for me to start applications after LXDE started, but it
definitely wasn't in Raspbian Stretch at that time - was Wheezy if I
remember right.

Lee - K5DAT
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir

___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Lee Bengston
On Feb 20, 2018 12:52 PM, "Jason KG4WSV"  wrote:

Pretty sure systemd would have the same problem as cron - the
application needs to be a child of the window manager so that the X
security is satisfied.


Agree


And Curt, if systemd scripts are easier than rc scripts then one of us
is looking at the wrong documentation.  :)


I had problems getting systemd scripts to work in Raspbian Jessie. Then I
tried Arch Linux on the Pi, and systemd worked great.  I did actually find
them easier than rc scripts, and it helped that Arch had its own systemd
documentation that was pretty good. I suspect Arch had an advantage of not
carrying the baggage of rc scripts prior to transitioning to systemd. Maybe
Stretch is better - haven't tried it on the Pi yet.


So back to the original question.  I read this:

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=139224

and sure enough I have a file  .config/lxsession/LXDE-pi/autostart

pi@raspberrypi:~ $ ls .config/lxsession/LXDE-pi/autostart
.config/lxsession/LXDE-pi/autostart

and it has some stuff in it:

pi@raspberrypi:~ $ cat .config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi


So i use my favorite editor to add this line to the end of that file:

@/usr/local/bin/xastir


and now xastir starts on boot.

-Jason
kg4wsv


Sounds definitive to me. Now I'm really curious if putting that same line
in this file will also work.

etc/xdg/lxsession/LXDE/startup

That file did work for me to start applications after LXDE started, but it
definitely wasn't in Raspbian Stretch at that time - was Wheezy if I
remember right.

Lee - K5DAT
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Jason KG4WSV
Pretty sure systemd would have the same problem as cron - the
application needs to be a child of the window manager so that the X
security is satisfied.

And Curt, if systemd scripts are easier than rc scripts then one of us
is looking at the wrong documentation.  :)


So back to the original question.  I read this:

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=139224

and sure enough I have a file  .config/lxsession/LXDE-pi/autostart

pi@raspberrypi:~ $ ls .config/lxsession/LXDE-pi/autostart
.config/lxsession/LXDE-pi/autostart

and it has some stuff in it:

pi@raspberrypi:~ $ cat .config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi


So i use my favorite editor to add this line to the end of that file:

@/usr/local/bin/xastir


and now xastir starts on boot.

-Jason
kg4wsv
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Curt, WE7U

On Tue, 20 Feb 2018, Jason Godfrey wrote:


If you are using Raspian (or another systemd based distro) using systemd
might be a good way to do it. See
https://www.raspberrypi.org/documentation/linux/usage/systemd.md


I've written one or two systemd startup scripts now. They are simpler to write 
by far than init.d scripts.

--
Curt, WE7U.http://we7u.wetnet.net
APRS Device Capabilities:  http://we7u.wetnet.net/aprs_device_capabilities.html
Coordinate Converter (Android): http://www.sarguydigital.com
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Jason Godfrey
If you are using Raspian (or another systemd based distro) using systemd
might be a good way to do it. See
https://www.raspberrypi.org/documentation/linux/usage/systemd.md

- Jason

On Tue, Feb 20, 2018 at 9:21 AM, Curt, WE7U  wrote:

> On Tue, 20 Feb 2018, Jason KG4WSV wrote:
>
> On Tue, Feb 20, 2018 at 5:38 AM, Tom Henderson  wrote:
>>
>>> Correction: based on time *or system startup.* Which is why it might be a
>>> good fit here. As Curt pointed out, the @reboot keyword can be used.
>>>
>>
>> That still fails to address the issue of X11 security and access to the
>> server.
>>
>> Plus it adds the additional problem that cron starts early in the boot
>> process, so it could easily be executing your commands _before_ the
>> window manager is started. (As a side note, I suspect this hack of
>> cron is a workaround for the travesty that is systemd.)
>>
>
> Agreed on the above. I sent my note about "@reboot" prior to reading the
> rest of the thread.
>
> When I was setting up an Rpi to auto-start things I relied on the window
> manager features for it rather than CRON.
>
> On multiple Ubuntu boxes at work I use the "@reboot" feature of crond to
> run scripts for setting up GPIB, stuff like that.
>
> --
> Curt, WE7U.http://we7u.wetnet.net
> Closed-minded about open (-source)...
> Coordinate Converter (Android): http://www.sarguydigital.com
> ___
> Xastir mailing list
> Xastir@lists.xastir.org
> http://xastir.org/mailman/listinfo/xastir
>



-- 
"The problem with quotes on the Internet is that it is often difficult to
verify their authenticity." - *Abraham Lincoln*
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Curt, WE7U

On Tue, 20 Feb 2018, Jason KG4WSV wrote:


On Tue, Feb 20, 2018 at 5:38 AM, Tom Henderson  wrote:

Correction: based on time *or system startup.* Which is why it might be a
good fit here. As Curt pointed out, the @reboot keyword can be used.


That still fails to address the issue of X11 security and access to the server.

Plus it adds the additional problem that cron starts early in the boot
process, so it could easily be executing your commands _before_ the
window manager is started. (As a side note, I suspect this hack of
cron is a workaround for the travesty that is systemd.)


Agreed on the above. I sent my note about "@reboot" prior to reading the rest 
of the thread.

When I was setting up an Rpi to auto-start things I relied on the window 
manager features for it rather than CRON.

On multiple Ubuntu boxes at work I use the "@reboot" feature of crond to run 
scripts for setting up GPIB, stuff like that.

--
Curt, WE7U.http://we7u.wetnet.net
Closed-minded about open (-source)...
Coordinate Converter (Android): http://www.sarguydigital.com
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Jason KG4WSV
On Tue, Feb 20, 2018 at 5:38 AM, Tom Henderson  wrote:
> Correction: based on time *or system startup.* Which is why it might be a
> good fit here. As Curt pointed out, the @reboot keyword can be used.

That still fails to address the issue of X11 security and access to the server.

Plus it adds the additional problem that cron starts early in the boot
process, so it could easily be executing your commands _before_ the
window manager is started. (As a side note, I suspect this hack of
cron is a workaround for the travesty that is systemd.)

Your window manager provides a facility to solve this exact problem.
Just use it.

-Jason
kg4wsv
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-20 Thread Tom Henderson
Correction: based on time *or system startup.* Which is why it might be 
a good fit here. As Curt pointed out, the @reboot keyword can be used.


Tom Henderson

On 02/19/2018 05:38 PM, Michael Barnes wrote:

crontab runs scripts based on time, not events.


___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-19 Thread Curt, WE7U

On Mon, 19 Feb 2018, Floyd Rodgers wrote:


Read about crontab. Make an entry in the crontab file.


There's a special keyword you can use in place of the 5 time/date pieces in 
your crontab.

Replace those five bits with "@reboot"

Check your cron man pages to assure it has this keyword. I found it in "man 5 
crontab"

--
Curt, WE7U.http://we7u.wetnet.net
"Debating an anti-gunner is like debating an arachnophobe about the importance of 
spiders in the ecosystem." -Stephen Wright
Coordinate Converter (Android): http://www.sarguydigital.com
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-19 Thread Max Harper
Only addressing the first sentence in your post. There is "@boot" which I've 
used for years. But with the latest version "Stretch" it seems to run programs 
a little to soon. I now have the "@boot" crontab entry run a script which has a 
5 second sleep command, and then that starts my program (not xastir). I just 
thought I would mention this if anyone else is trying to use the "@boot" and 
can't figure out why it doesn't work. It worked in "Wheezy" and "Jessie" just 
fine (for me). I do understand that you can't start xastir directly using this 
method. 
Max KG4PID  From: Michael Barnes 
 To: Floyd Rodgers ; Xastir - APRS client software 
discussion  
 Sent: Monday, February 19, 2018 5:38 PM
 Subject: Re: [Xastir] Autostart Xastir
   
On Mon, Feb 19, 2018 at 2:17 PM, Floyd Rodgers  wrote:

> So why is crontab wrong, especially for recovery after a power failure or
> system init?
>
>
crontab runs scripts based on time, not events. While, conceivably, you
could have a script that checks to see if a program is running and restart
it if it is not, then have crontab run that script every so often, that is
not really the best way to start things on boot. There are a number of ways
to start a script on boot. These options will vary by distribution and
version of desktop manager. Although nothing is coming to me right off the
top of my head, Google something to the effect of "start application on
boot raspberry pi" and you will find a plethora of options.

Michael
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


   
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-19 Thread Lee Bengston
On Feb 19, 2018 6:38 PM, "Steven Morrison" 
wrote:

On 2/19/2018 2:16 PM, Joseph LaFerla wrote:

> Hi
>
> Finally, I am actively trying to find a way to start Xastir after bootup
> of the Raspberry pi gui.  The other day we had a power  failure which
> caused the pi to reboot.  Since I have until now always started xastir
> manually from a terminal window with xastiur &, when the power came back
> xastir did not start up.  I have searched the archives and online for
> something that works.  Problem is that the xastir executable has to run
> after the gui comes up.  I don’t think this issue is specific to a rpi.  I
> would think the same consideration would apply to any Linux gui that runs
> after Linux has booted up.  Can anybody outline the steps I need to do to
> make this happen?
>
> Thanks as always.
>
> Joe
> VA3JLF
>
Joe,

This is a copy of  an email I sent to some friends last August, describing
how I got Xastir to start automatically  at reboot on my Raspberry PI.
Raspbian is going through some changes as the system adopts to the new
systemd startup process, but parts are still handled by the window manager:

Hi All,

I finally got my Raspberry Pi to automatically load Xastir on startup and
reboot. I've been wrestling with this for a long time off and on, and
Finally got it to work last night.


I had been trying to use the new systemd startup process and had a .desktop
unit file defined but it never worked, and I could never even find any
failure messages.  It turns out the default X-windows manager is LXDE, not
Gnome or KDE.  Apparently LXDE hasn't implemented all of the systemd
startup processing. Last night I finally found a reference to auto starting
LXDE jobs that worked .


Here are the basic steps I followed:

1. Define a simple shell program: /sudo nano /usr/local/bin/start_xastir.sh
/*/
/*

*#!/bin/bash
# This shell starts Festival text to speech program than starts the xastir
APRS$

echo "Starting  start_xastir script"

xterm -e festival &
echo "Festival Started"
Sleep 5

xterm -e xastir &

exit
*

2. add the script to the USER auto start entries for LXDE: /sudo nano
//|~/.config/lxsession/LXDE/autostart|/

|(this path may also show LXDE-pi instead of LXDE. Both point to the same
locations on my system)


*@lxpanel --profile LXDE**
**@pcmanfm --desktop --profile LXDE**
**@xscreensaver -no-splash**
**@sh /usr/local/bin/start_xastir.sh**
*


Interesting, a few years ago I was able to auto-start an application in
LXDE on a Raspberry Pi by editing this file: (or creating it new if it
didn't exist)

/etc/xdg/lxsession/LXDE/startup

I wasn't starting Xastir at that time, but if I had, there would have been
only one line in the file as follows:

@/usr/local/bin/start_xastir.sh

The above assumes there is a script that starts xastir in /usr//local/bin
as given by the example above.  This worked for me, but it was an older
version of Raspbian at that time.

<- snip -->

Lee - K5DAT
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-19 Thread Jason KG4WSV
On Mon, Feb 19, 2018 at 5:38 PM, Michael Barnes  wrote:
> On Mon, Feb 19, 2018 at 2:17 PM, Floyd Rodgers  wrote:
>
>> So why is crontab wrong, especially for recovery after a power failure or
>> system init?
>>
>>
> crontab runs scripts based on time, not events.

correct.  Additionally, xastir is a graphical application that needs
to interact with the X server and the window manager, but cron is a
background service that has no connection to those facilities.

While you may eventually hack something out that would work via cron,
it would not be straightforward and would likely result in hacks like
turning off all the X server authentication (if modern window managers
still allow such a thing).


-Jason
kg4wsv
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-19 Thread Steven Morrison

On 2/19/2018 2:16 PM, Joseph LaFerla wrote:

Hi

Finally, I am actively trying to find a way to start Xastir after bootup of the 
Raspberry pi gui.  The other day we had a power  failure which caused the pi to 
reboot.  Since I have until now always started xastir manually from a terminal 
window with xastiur &, when the power came back xastir did not start up.  I 
have searched the archives and online for something that works.  Problem is that 
the xastir executable has to run after the gui comes up.  I don’t think this issue 
is specific to a rpi.  I would think the same consideration would apply to any 
Linux gui that runs after Linux has booted up.  Can anybody outline the steps I 
need to do to make this happen?

Thanks as always.

Joe
VA3JLF

Joe,

This is a copy of  an email I sent to some friends last August, 
describing how I got Xastir to start automatically  at reboot on my 
Raspberry PI.  Raspbian is going through some changes as the system 
adopts to the new systemd startup process, but parts are still handled 
by the window manager:


Hi All,

I finally got my Raspberry Pi to automatically load Xastir on startup 
and reboot. I've been wrestling with this for a long time off and on, 
and Finally got it to work last night.



I had been trying to use the new systemd startup process and had a 
.desktop unit file defined but it never worked, and I could never even 
find any failure messages.  It turns out the default X-windows manager 
is LXDE, not Gnome or KDE.  Apparently LXDE hasn't implemented all of 
the systemd startup processing. Last night I finally found a reference 
to auto starting LXDE jobs that worked .



Here are the basic steps I followed:

1. Define a simple shell program: /sudo nano 
/usr/local/bin/start_xastir.sh /*/

/*

*#!/bin/bash
# This shell starts Festival text to speech program than starts the 
xastir APRS$


echo "Starting  start_xastir script"

xterm -e festival &
echo "Festival Started"
Sleep 5

xterm -e xastir &

exit
*

2. add the script to the USER auto start entries for LXDE: /sudo nano 
//|~/.config/lxsession/LXDE/autostart|/


|(this path may also show LXDE-pi instead of LXDE. Both point to the 
same locations on my system)

|


*@lxpanel --profile LXDE**
**@pcmanfm --desktop --profile LXDE**
**@xscreensaver -no-splash**
**@sh /usr/local/bin/start_xastir.sh**
*

3. Reboot system.

Festival and Xastir should start terminal windows and be started when 
user pi signs in to the system. On my system xastir and start_xastir.sh 
are on /usr/local/bin and festival is on /usr/bin.


Good luck,

Steve

KE5SXT



___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-19 Thread Michael Barnes
On Mon, Feb 19, 2018 at 2:17 PM, Floyd Rodgers  wrote:

> So why is crontab wrong, especially for recovery after a power failure or
> system init?
>
>
crontab runs scripts based on time, not events. While, conceivably, you
could have a script that checks to see if a program is running and restart
it if it is not, then have crontab run that script every so often, that is
not really the best way to start things on boot. There are a number of ways
to start a script on boot. These options will vary by distribution and
version of desktop manager. Although nothing is coming to me right off the
top of my head, Google something to the effect of "start application on
boot raspberry pi" and you will find a plethora of options.

Michael
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-19 Thread Floyd Rodgers
So why is crontab wrong, especially for recovery after a power failure or 
system init? 

On Monday, February 19, 2018 3:26 PM, Jason KG4WSV  wrote:
 

 On Mon, Feb 19, 2018 at 3:09 PM, Floyd Rodgers  wrote:
> Read about crontab. Make an entry in the crontab file.

Crontab is wrong for multiple reasons.


lightdm is the window manager for the pi.  You want an auto started
application in lightdm

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=139224

Your line for autostart is probably

@/usr/local/bin/xastir



There's another way as well, but I don't have the system available at
the moment so I can reverse engineer exactly how I did it.

-Jason
kg4wsv
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


   
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-19 Thread Jason KG4WSV
On Mon, Feb 19, 2018 at 3:09 PM, Floyd Rodgers  wrote:
> Read about crontab. Make an entry in the crontab file.

Crontab is wrong for multiple reasons.


lightdm is the window manager for the pi.  You want an auto started
application in lightdm

https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=139224

Your line for autostart is probably

@/usr/local/bin/xastir



There's another way as well, but I don't have the system available at
the moment so I can reverse engineer exactly how I did it.

-Jason
kg4wsv
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


Re: [Xastir] Autostart Xastir

2018-02-19 Thread Floyd Rodgers
Read about crontab. Make an entry in the crontab file. 

On Monday, February 19, 2018 2:16 PM, Joseph LaFerla  
wrote:
 

 Hi

Finally, I am actively trying to find a way to start Xastir after bootup of the 
Raspberry pi gui.  The other day we had a power  failure which caused the pi to 
reboot.  Since I have until now always started xastir manually from a terminal 
window with xastiur &, when the power came back xastir did not start up.  I 
have searched the archives and online for something that works.  Problem is 
that the xastir executable has to run after the gui comes up.  I don’t think 
this issue is specific to a rpi.  I would think the same consideration would 
apply to any Linux gui that runs after Linux has booted up.  Can anybody 
outline the steps I need to do to make this happen?

Thanks as always.

Joe
VA3JLF


Sent from Mail for Windows 10

___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir


   
___
Xastir mailing list
Xastir@lists.xastir.org
http://xastir.org/mailman/listinfo/xastir