[Xcsoar-user] XCSoar and autostart on Raspberry

242 views
Skip to first unread message

Dirk Jung

unread,
Jul 22, 2014, 6:24:04 AM7/22/14
to xcsoa...@lists.sourceforge.net
Hi guys,

hopefully someone can helps me. I got two problems with running XCSoar on my Raspberry Pi:

• If I use a script to start XCSoar (6.7.5) when I starting the Raspberry, XCSoar crashes. I use the following script at /home/pi/.config/autostart:
[Desktop Entry]
Name=XCSoar
Exec=xcsoar
Type=Application

• If I use xcsoar -fly in /etc/rc.local XCSoar starts perfekt, but I can't control using the keyboard. I have to quit and restart XCSoar at a terminal using xcsoar -fly, then the keyboard works perfekt

Thanks for helping!
Dirk
signature.asc

Max Kellermann

unread,
Jul 22, 2014, 1:37:08 PM7/22/14
to Dirk Jung, xcsoa...@lists.sourceforge.net
On 2014/07/22 12:23, Dirk Jung <Blau...@gmx.de> wrote:
> Hi guys,
>
> hopefully someone can helps me. I got two problems with running XCSoar on my Raspberry Pi:
>
> ? If I use a script to start XCSoar (6.7.5) when I starting the Raspberry, XCSoar crashes. I use the following script at /home/pi/.config/autostart:
> [Desktop Entry]
> Name=XCSoar
> Exec=xcsoar
> Type=Application

A crash is a bug and should be reported to the bug tracker. However,
I'm not sure if that is really a crash. You should provide more
information when you write the ticket.

> ? If I use xcsoar -fly in /etc/rc.local XCSoar starts perfekt, but I can't control using the keyboard. I have to quit and restart XCSoar at a terminal using xcsoar -fly, then the keyboard works perfekt

XCSoar 6.7 reads keyboard input from the current TTY, therefore it
must be run on a TTY.

XCSoar 6.8 reads all user input directly from /dev/input/* devices,
and that does not require a TTY; that is much more robust. However,
it needs permission to access these devices, and it must have
exclusive access.

Max

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Xcsoar-user mailing list
Xcsoa...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcsoar-user

Martin Gregorie

unread,
Jul 22, 2014, 3:33:27 PM7/22/14
to xcsoa...@lists.sourceforge.net
On Tue, 2014-07-22 at 12:23 +0200, Dirk Jung wrote:
> • If I use xcsoar -fly in /etc/rc.local XCSoar starts perfekt, but I can't control using the keyboard. I have to quit and restart XCSoar at a terminal using xcsoar -fly, then the keyboard works perfekt
>
Thats's not surprising. rc.local is run as a root process at boot time,
so any programs started by it will also run as root, which you almost
certainly did not intend or want. Its usual purpose is to modify global
settings, e.g. changing access permissions for /dev/ttyS* and/or to
start site-specific servers or utilities that, for some reason, can't be
run as normal system services. It is *NOT* intended to start user
programs because these should never be run as root and anyway, as you
found out, a normal user will not be able to use their i/o channels.

If you want to start a program when you login to a particular user you
should either use services provided by the desktop manager (Gnome, XFCE,
Cinnamon, etc) or, if you don't need to start a desktop manager, you can
start it from the .bash_profile in the user's home directory.

The fact that XCSoar crashes when you try to make the desktop manager
start it suggests that that environment is not providing something it
needs. For instance, is XCSoar really crashing or is it just the manager
not being able to find XCSoar? Things to check and do:

- Is the directory containing XCSoar in $PATH? If not, you need
to change .bash_profile so it adds that directory to $PATH

- Does it work if you use an absolute pathname for XCSoar? That type of
program launcher often ignores $PATH and so an absolute path name is
required.

- write a bash script to start XCSoar and also load add diagnostic
statements into it such as:

pwd
which XCSoar
echo $USER
echo $PATH

and run it from the command line. When its working properly, tell the
desktop manager to run the script at login time. If the diagnostic
displays differ, add statements to the script to fix the differences
until XCSoar does run.


Martin

Folken

unread,
Jul 22, 2014, 6:35:08 PM7/22/14
to xcsoa...@lists.sourceforge.net
On Tue, Jul 22, 2014 at 08:17:50PM +0100, Martin Gregorie wrote:
> On Tue, 2014-07-22 at 12:23 +0200, Dirk Jung wrote:
> > • If I use xcsoar -fly in /etc/rc.local XCSoar starts perfekt, but I can't control using the keyboard. I have to quit and restart XCSoar at a terminal using xcsoar -fly, then the keyboard works perfekt
> and run it from the command line. When its working properly, tell the
> desktop manager to run the script at login time. If the diagnostic
> displays differ, add statements to the script to fix the differences
> until XCSoar does run.

To this i'd like to add that most distributions log to a file called
.xsession-errors in your home directory. Usually errors on failing
programs should be displayed in there.

I run xcsoar with i3-wm. In this wm i only have to specify
exec /opt/xcsoar/bin/xcsoar
in .i3/config in my homedirectory

Cheers,
- Folken
signature.asc

Martin Gregorie

unread,
Jul 22, 2014, 7:27:50 PM7/22/14
to xcsoa...@lists.sourceforge.net
In case you wondered, I was being deliberately non-distro-specific whe I
wrote that because, although I have a RaspberryPi I haven't done much
with it and I run it headless over SSH from one of my Fedora-based Linux
machines using XFCE.

Consequently I know nothing about the RPi's desktop manager, or what
that might be capable of in the way of debugging. If it uses the system
logger to output diagnostics that may well be lost on an out-of-the box
install because detail that gets logged is minimal, probably to avoid
hammering the SD card the machine uses as its main fs.


Thermals,

Reply all
Reply to author
Forward
0 new messages