Bug 323151

Summary: Autostart apps only after auto-mounted disks are mounted (i.e. implement "XDG autostart of applications after mount" spec)
Product: [Plasma] plasmashell Reporter: Kip <kip>
Component: Startup processAssignee: Plasma Bugs List <plasma-bugs>
Status: CONFIRMED ---    
Severity: wishlist CC: adaptee, agurenko, aleixpol, demm, empyreal, fanzhuyifan, jinujohnjoseph, kde, kdelibs-bugs, lukas, mjw, nate, postix, saunders
Priority: HI    
Version: 5.26.1   
Target Milestone: 1.0   
Platform: Compiled Sources   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=425315
https://bugs.kde.org/show_bug.cgi?id=462735
https://bugs.kde.org/show_bug.cgi?id=473860
https://bugs.kde.org/show_bug.cgi?id=481278
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Kip 2013-08-04 00:00:45 UTC
As of KDE 4.10, it appears as though freedesktop.org's autostart of applications after mount[1] does not appear to be implemented. Most major desktop environments from Xfce, Gnome 3, Gnome 2, Unity, MATE, and possibly others, implement this. This is not to be confused with KDE's nomenclature of "autostart" in the context of automated user actions.

Under Xfce, this functionality is implemented in thunar-volman.[2] User level graphical configuration is available in thunar-volman-settings.[3]

PS If this doesn't belong under solid, feel free to change product / component.

[1] <http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html#mounting>
[2] <http://git.xfce.org/xfce/thunar-volman/tree/thunar-volman/tvm-block-device.c#n359>
[3]  <http://goodies.xfce.org/projects/thunar-plugins/thunar-volman#thunar_volume_manager_thunar-volman>

Reproducible: Always

Steps to Reproduce:
1. Insert removable media containing an executable .autorun, autorun, or autorun.sh in the mount root.
2. Mount removable media.
3. Wait to be prompted on whether to execute the aforementioned.
Actual Results:  
User is never prompted on whether to execute the autorun script.

Expected Results:  
User should e prompted on whether to execute the autorun script if XDG autostart is enabled.
Comment 1 Andrew Crouthamel 2018-09-04 15:41:58 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Please try again with the latest version and submit a new bug to frameworks-solid if your issue persists. Thank you!
Comment 2 Nate Graham 2022-10-20 14:11:01 UTC
Still valid, as the lack of this is still causing problems.
Comment 3 Nate Graham 2022-10-20 14:14:20 UTC
*** Bug 460503 has been marked as a duplicate of this bug. ***
Comment 4 Michael Walker 2022-11-14 04:09:51 UTC
Created attachment 153728 [details]
New crash information added by DrKonqi

DiscoverNotifier (5.23.5) using Qt 5.15.2

- What I was doing when the application crashed:
just started the desktop

saw similar errors just the first time i ran from ISO (before installing to disk)

-- Backtrace (Reduced):
#4  0x00007f72d69ffe3f in flatpak_installation_create_monitor () from /lib64/libflatpak.so.0
#5  0x00007f72d732e065 in FlatpakNotifier::Installation::ensureInitialized(std::function<_FlatpakInstallation* ()>, _GCancellable*, _GError**) () from /usr/lib64/qt5/plugins/discover-notifier/FlatpakNotifier.so
#6  0x00007f72d732e4f0 in FlatpakNotifier::recheckSystemUpdateNeeded() () from /usr/lib64/qt5/plugins/discover-notifier/FlatpakNotifier.so
#7  0x000055e28ae5c35d in DiscoverNotifier::recheckSystemUpdateNeeded() ()
#8  0x00007f72eb0ad256 in QSingleShotTimer::timerEvent(QTimerEvent*) () from /lib64/libQt5Core.so.5
Comment 5 Nate Graham 2023-01-04 19:50:51 UTC
*** Bug 441556 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2023-01-04 19:50:54 UTC
*** Bug 453518 has been marked as a duplicate of this bug. ***
Comment 7 David Edmundson 2023-02-03 15:34:55 UTC
>1. Insert removable media containing an executable .autorun, autorun, or autorun.sh in the mount root.

These are explicitly disabled and will not come back.
Comment 8 Nate Graham 2023-02-03 18:34:10 UTC
The underlying issue is broader than just that one use case. Some of the duplicated bugs provide examples:
- Bug 441556: Autostarted KTorrent fails to start seeding torrents located on an automounted disk because the disk automounts after KTorrent launches
- Bug 453518: Plasma wallpaper resets to default when user-chosen wallpaper lives on an automounted disk because the disk automounts after Plasma launches
- Bug 460503: Discover Notifier crashes on boot when checking for updates to Flatpak apps that were installed to an automounted disk because the disk automounts after Discover Notifier launches