Automount of USB sticks and autorun of a graphical app at startup

Hi everybody,

I have two topics to which haven’t find a solution.
The first one is the automount of usb sticks, i saw there is many solution to solve this topic (usbmount, udisks2, autofs, fstab ecc…) but what is the best solution on BBB and such as I can implement it.
The second one is start a graphical application immediately after boot.
Now I use a IoT image on my BBB and I start the server X at the boot time with a service.
The problem is when try to run my application in another service, after the server X start, I recieve the error “cannot open display”.

Thank to all for the support.

Hi,

Why not separate the two questions in two dedicated mail threads?

As for question two, I guess you are starting the service from a command line outside of the X environment.
In that case you want to set the DISPLAY environment variable.
You could also have the service start as part of the graphical session.
The exact details depend on your graphical environment (I think you need to know the session manager)

Best wishes,
Hugo

I have two topics to which haven't find a solution.
The first one is the automount of usb sticks, i saw there is many solution
to solve this topic (usbmount, udisks2, autofs, fstab ecc..) but what is
the best solution on BBB and such as I can implement it.

  No help here for this...

The second one is start a graphical application immediately after boot.
Now I use a IoT image on my BBB and I start the server X at the boot time
with a service.
The problem is when try to run my application in another service, after the
server X start, I recieve the error "cannot open display".

  Wouldn't it be easier to start with the LXQT image -- which already
sets up X and a display manager. Granted, the solution may just involve
setting the proper environment variable to define where the "display"
server is located.