Plasma Autostart of scripts no longer works

This forum is dedicated to testing early releases and cauldron : Howtos, tips, tricks and user global feedback and thoughts...

Helpful tip :
For bugs tracking we use : https://bugs.mageia.org = The Mageia Bug Tracker
In this bug tracker you'll find already reported bugs and you'll be able to report those you have found....

Plasma Autostart of scripts no longer works

Postby banjo » Mar 6th, '21, 17:30

I am running Cauldron, which just did a huge update of 982 packages. After the update, none of my autostart login scripts run when I log in. I have six scripts that are supposed to run at login. They run QT programs that I wrote.

Screenshot_20210306_101538.png
Autostart Script List
Screenshot_20210306_101538.png (71.82 KiB) Viewed 3217 times


The Autostart program, gkrellm, runs normally at login, but none of the scripts run.

I can run my scripts successfully from a Konsole, and I can run them from my Desktop links as well. So the scripts and the programs are working fine. The scripts are super simple, for example, here is one of them.

Code: Select all
#! /bin/bash
/home/poobah/bin/mac &


My repositories are still set to Cauldron

Code: Select all
urpmq --list-media active --list-url
Core Release http://mirror.math.princeton.edu/pub/mageia/distrib/cauldron/x86_64/media/core/release
Core Updates http://mirror.math.princeton.edu/pub/mageia/distrib/cauldron/x86_64/media/core/updates
Nonfree Release http://mirror.math.princeton.edu/pub/mageia/distrib/cauldron/x86_64/media/nonfree/release
Nonfree Updates http://mirror.math.princeton.edu/pub/mageia/distrib/cauldron/x86_64/media/nonfree/updates
Tainted Release http://mirror.math.princeton.edu/pub/mageia/distrib/cauldron/x86_64/media/tainted/release
Tainted Updates http://mirror.math.princeton.edu/pub/mageia/distrib/cauldron/x86_64/media/tainted/updates
google-chrome http://dl.google.com/linux/chrome/rpm/stable/x86_64


My inxi data
Code: Select all
$ inxi -b
System:    Host: localhost Kernel: 5.10.20-desktop-2.mga9 x86_64 bits: 64 Desktop: KDE Plasma 5.21.2 Distro: Mageia 9 mga9
Machine:   Type: Desktop Mobo: ASUSTeK model: P5G41T-M LX PLUS v: Rev X.0x serial: <superuser required>
           BIOS: American Megatrends v: 0502 date: 10/21/2011
CPU:       Info: Dual Core Intel Core2 Duo E7300 [MCP] speed: 2258 MHz
Graphics:  Device-1: NVIDIA G94 [GeForce 9600 GT] driver: nouveau v: kernel
           Display: x11 server: Mageia X.org 1.20.10 driver: loaded: nouveau,v4l resolution: 1920x1080~60Hz
           OpenGL: renderer: NV94 v: 3.3 Mesa 21.0.0-rc5
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169
           Device-2: Realtek RTL-8100/8101L/8139 PCI Fast Ethernet Adapter driver: 8139too
           Device-3: Qualcomm Atheros AR9271 802.11n type: USB driver: ath9k_htc
Drives:    Local Storage: total: 465.76 GiB used: 33.52 GiB (7.2%)
Info:      Processes: 201 Uptime: 30m Memory: 3.84 GiB used: 1.56 GiB (40.7%) Shell: Bash inxi: 3.3.01


Any hints about where to look for this problem would be welcome.

Thanks
Banjo
(_)=='=~
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 445
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Plasma Autostart of scripts no longer works

Postby morgano » Mar 6th, '21, 18:44

Is there a specific reason you use Cauldron this extremely early in Mageia 9 development phase?
Seem to be looking for trouble.
Maybe back up, switch to Mageia 8 repos and downgrade?
Mandriva since 2006, Mageia 2011 at home & work. Thinkpad T40, T43, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1301
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: Plasma Autostart of scripts no longer works

Postby banjo » Mar 6th, '21, 19:11

Well, yeah, that sort of describes it. This is my experimental (sacrificial?) computer that I run on the bleeding edge to test the new stuff and see what is going on.

I am somewhat surprised to see so much activity on Mag9 so shortly after the release of Mag8. I thought that the the devs usually took a few weeks off between.
Last edited by isadora on Mar 6th, '21, 22:07, edited 1 time in total.
Reason: Quoting the former message is not appropriate
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 445
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Plasma Autostart of scripts no longer works

Postby banjo » Mar 6th, '21, 21:05

Just for grins, and to see what would happen, I added my programs to the Applications section to run at login instead of running them using the scripts. They all come up properly as they used to. So it is the scripts that are not running properly.

I will have to go investigate how this magic happens to see why the scripts aren't running. Any hints where I might start looking?
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 445
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Plasma Autostart of scripts no longer works

Postby banjo » Mar 6th, '21, 21:33

I have figured out this much so far.

The Applications are launched using .desktop files that are created and written to ~/.config/autostart

On my system, those files are all there:

Code: Select all
$ ll autostart
total 32
-rw------- 1 poobah poobah 178 Sep 25 16:24 conky.desktop
-rw------- 1 poobah poobah 101 Mar  6 13:53 DGEyes.desktop
-rw------- 1 poobah poobah  95 Mar  6 13:56 mac.desktop
-rw------- 1 poobah poobah 181 Jul 22  2020 mageia-gkrellm.desktop
-rw------- 1 poobah poobah  97 Mar  6 13:56 MOBO.desktop
-rw------- 1 poobah poobah 111 Mar  6 13:57 NixieClock2.desktop
-rw------- 1 poobah poobah 111 Mar  6 13:57 NixieClock3.desktop
-rw------- 1 poobah poobah  93 Mar  6 13:58 Wx.desktop


The scripts are run using links placed in the folder ~/.config/autostart-scripts

Code: Select all
$ ll autostart-scripts/
total 0
lrwxrwxrwx 1 poobah poobah 23 Mar  6 09:54 runmac -> /home/poobah/bin/runmac*
lrwxrwxrwx 1 poobah poobah 24 Mar  6 09:55 runmobo -> /home/poobah/bin/runmobo*
lrwxrwxrwx 1 poobah poobah 31 Aug 28  2020 runnixieclock2 -> /home/poobah/bin/runnixieclock2*
lrwxrwxrwx 1 poobah poobah 31 Aug 29  2020 runnixieclock3 -> /home/poobah/bin/runnixieclock3*
lrwxrwxrwx 1 poobah poobah 22 Sep 25 16:24 runwx -> /home/poobah/bin/runwx*
lrwxrwxrwx 1 poobah poobah 25 Jul 22  2020 runxeyes -> /home/poobah/bin/runxeyes*


The links are there, and point to the correct programs.

So I assume that Plasma is not going through the autosart-scripts directory and launching the programs. Or perhaps it is not following the links properly.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 445
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Plasma Autostart of scripts no longer works

Postby doktor5000 » Mar 6th, '21, 22:47

Anything in the logs about autostart?

You could also try to make the .desktop files executable, usually if they are missing the executable bit then they are considered untrusted.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17603
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Plasma Autostart of scripts no longer works

Postby banjo » Mar 6th, '21, 23:44

Actually, the .desktop files work fine, it is the scripts that don't run.

According to this page:

https://docs.kde.org/trunk5/en/kde-workspace/kcontrol/autostart/

The scripts are run from $HOME/.config/plasma-workspace/env instead of, ~/.config/autostart-scripts. But I put a link to my app in that folder and it did not work.

I will back out my workaround (by removing the startups from the Application section), reboot and log in to get a clean log. Then I will go look for autostart errors.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 445
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Plasma Autostart of scripts no longer works

Postby banjo » Mar 7th, '21, 00:02

I rebooted and logged in, and all the scripts failed to run. There are some errors reported in the log about autostart starting around line 1618 of the log. Here is a brief example.

Code: Select all
Mar 06 16:48:51 localhost.localdomain systemd[5169]: Starting KDE Session Management Server...
Mar 06 16:48:51 localhost.localdomain systemd[5169]: app-polkit\x2dmate\x2dauthentication\x2dagent\x2d1-autostart.service: Control process exited, code=exited, status=1/FAILURE
Mar 06 16:48:51 localhost.localdomain systemd[5169]: app-polkit\x2dmate\x2dauthentication\x2dagent\x2d1-autostart.service: Skipped due to 'exec-condition'.
Mar 06 16:48:51 localhost.localdomain systemd[5169]: Condition check resulted in PolicyKit Authentication Agent being skipped.
Mar 06 16:48:51 localhost.localdomain systemd[5169]: app-xfce4\x2dnotifyd-autostart.service: Control process exited, code=exited, status=1/FAILURE
Mar 06 16:48:51 localhost.localdomain systemd[5169]: app-xfce4\x2dnotifyd-autostart.service: Skipped due to 'exec-condition'.


The scripts are definitely executable.

Code: Select all
[poobah@localhost .config]$ ll autostart-scripts/
total 0
lrwxrwxrwx 1 poobah poobah 23 Mar  6 09:54 runmac -> /home/poobah/bin/runmac*
lrwxrwxrwx 1 poobah poobah 24 Mar  6 09:55 runmobo -> /home/poobah/bin/runmobo*
lrwxrwxrwx 1 poobah poobah 31 Aug 28  2020 runnixieclock2 -> /home/poobah/bin/runnixieclock2*
lrwxrwxrwx 1 poobah poobah 31 Aug 29  2020 runnixieclock3 -> /home/poobah/bin/runnixieclock3*
lrwxrwxrwx 1 poobah poobah 22 Sep 25 16:24 runwx -> /home/poobah/bin/runwx*
lrwxrwxrwx 1 poobah poobah 25 Jul 22  2020 runxeyes -> /home/poobah/bin/runxeyes*
Attachments
AutostartFailureBootLog.txt
(203.61 KiB) Downloaded 132 times
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 445
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Plasma Autostart of scripts no longer works

Postby doktor5000 » Mar 7th, '21, 02:37

banjo wrote:The scripts are definitely executable.

You only posted the output for the symlinks, and symlinks are always executable. Question was if you could test making the .desktop files executable.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17603
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Plasma Autostart of scripts no longer works

Postby banjo » Mar 7th, '21, 04:55

I removed all of the .desktop files so that I could trouble shoot the scripts. The .desktop files were working fine, executable or not. The scripts were not working.

There is only one .desktop file left,

Code: Select all
[poobah@localhost .config]$ ls -l autostart
total 4
-rwx--x--x 1 poobah poobah 181 Jul 22  2020 mageia-gkrellm.desktop*
[poobah@localhost .config]$


I made it executable, but then, it was working fine before, as they all were.

I am trying to figure out why the scripts in ~/.config/autostart-scripts do not run when I log in.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 445
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Plasma Autostart of scripts no longer works

Postby banjo » Mar 7th, '21, 14:13

Well, I figured out what is going on here. The key is in the document at:

https://docs.kde.org/trunk5/en/kde-work ... autostart/

There are a couple of things at play.

Thing one:

According to a note in the document:

Only scripts with the .sh extension can be read by Plasma™ for Before session startup and Shutdown modes.


So I had to rename my scripts to add the .sh suffix.

Thing two:

According to the document:

The program scans $HOME/.config/autostart/, $HOME/.config/plasma-workspace/env and $HOME/.config/plasma-workspace/shutdown folders to check what programs and scripts are already there and displays them.


The System Settings tool still adds the links for the scripts into ~/.config/autostart-scripts, but then Plasma looks for the links in $HOME/.config/plasma-workspace/env. That is probably a bug or an oversight in the updates to System Settings.

So to fix this I renamed my scripts to add the ".sh" suffix and manually created links to them in ~/.config/plasma-workspace/env. All the scripts run at login.

I will not mark this solved yet, because I think there is a bug wherein System Settings is creating the links to the scripts in the wrong directory.

I created a bug report, https://bugs.mageia.org/show_bug.cgi?id=28547
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 445
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts

Re: Plasma Autostart of scripts no longer works

Postby banjo » Mar 8th, '21, 17:12

A quick update to answer a question previously asked about the executable status of the .desktop files in the autostart folder.

I removed all of my scripts that I was using to start my applications from the autostart folders and replaced them with .desktop files created by the Application section of System Settings instead. When System Settings creates the .desktop files, they are not marked executable, e.g.

Code: Select all
[poobah@localhost .config]$ ls -l autostart
total 28
-rw------- 1 poobah poobah 101 Mar  8 09:53 DGEyes.desktop
-rw------- 1 poobah poobah  95 Mar  8 09:54 mac.desktop
-rwx--x--x 1 poobah poobah 181 Jul 22  2020 mageia-gkrellm.desktop*
-rw------- 1 poobah poobah  97 Mar  8 09:54 MOBO.desktop
-rw------- 1 poobah poobah 111 Mar  8 09:53 NixieClock2.desktop
-rw------- 1 poobah poobah 111 Mar  8 09:53 NixieClock3.desktop
-rw------- 1 poobah poobah  93 Mar  8 09:53 Wx.desktop


The appllications are launched on login regardless of the executable status of the files.

The .desktop files on ~/Desktop are, in fact, all executable, e.g.

Code: Select all
[poobah@localhost Desktop]$ ll *.desktop
lrwxrwxrwx 1 poobah poobah   40 Jul 27  2020  audacity.desktop -> /usr/share/applications/audacity.desktop
-rwx------ 1 poobah poobah  397 Aug 17  2020  Blender.desktop*
lrwxrwxrwx 1 poobah poobah   40 Jul 27  2020  bluefish.desktop -> /usr/share/applications/bluefish.desktop
lrwxrwxrwx 1 poobah poobah   44 Jul 27  2020  chromium-bsu.desktop -> /usr/share/applications/chromium-bsu.desktop
lrwxrwxrwx 1 poobah poobah   62 Jul 27  2020  com.rosegardenmusic.rosegarden.desktop -> /usr/share/applications/com.rosegardenmusic.rosegarden.desktop
lrwxrwxrwx 1 poobah poobah   42 Jul 27  2020  convertall.desktop -> /usr/share/applications/convertall.desktop
-rwx------ 1 poobah poobah  345 Jul 20  2020 'CPU Info.desktop'*
lrwxrwxrwx 1 poobah poobah   36 Jul 27  2020  cups.desktop -> /usr/share/applications/cups.desktop
-rwx------ 1 poobah poobah  343 Aug 29  2020  DACS.desktop*
-rwx------ 1 poobah poobah  353 Oct 17 10:48  DGEyes.desktop*
lrwxrwxrwx 1 poobah poobah   45 Jan  2 15:03  draknetcenter.desktop -> /usr/share/applications/draknetcenter.desktop
lrwxrwxrwx 1 poobah poobah   41 Jul 27  2020  filezilla.desktop -> /usr/share/applications/filezilla.desktop
lrwxrwxrwx 1 poobah poobah   46 Nov 18 09:24  foobillardplus.desktop -> /usr/share/applications/foobillardplus.desktop
lrwxrwxrwx 1 poobah poobah   45 Jul 20  2020  google-chrome.desktop -> /usr/share/applications/google-chrome.desktop
-rwx------ 1 poobah poobah  340 Jul 27  2020  IranView.desktop*
-rwx------ 1 poobah poobah  335 Feb  6 09:50  MAC.desktop*
-rwx------ 1 poobah poobah  343 Aug 14  2020  MOBO.desktop*
-rwxr-xr-x 1 poobah poobah  271 Jul 27  2020  netbeans-8.2.desktop*
-rwx------ 1 poobah poobah  366 Aug 28  2020 'Nixie Clock 2.desktop'*
-rwx------ 1 poobah poobah  365 Aug 29  2020 'Nixie Clock 3.desktop'*
-rwx------ 1 poobah poobah  356 Jul 20  2020 'Nixie Clock.desktop'*
lrwxrwxrwx 1 poobah poobah   55 Jul 27  2020  org.fontforge.FontForge.desktop -> /usr/share/applications/org.fontforge.FontForge.desktop
lrwxrwxrwx 1 poobah poobah   59 Jul 24  2020  org.frescobaldi.Frescobaldi.desktop -> /usr/share/applications/org.frescobaldi.Frescobaldi.desktop
lrwxrwxrwx 1 poobah poobah   53 Jul 27  2020  org.inkscape.Inkscape.desktop -> /usr/share/applications/org.inkscape.Inkscape.desktop
lrwxrwxrwx 1 poobah poobah   48 Jul 27  2020  org.kde.kdenlive.desktop -> /usr/share/applications/org.kde.kdenlive.desktop
lrwxrwxrwx 1 poobah poobah   46 Jul 27  2020  org.kde.kdiff3.desktop -> /usr/share/applications/org.kde.kdiff3.desktop
lrwxrwxrwx 1 poobah poobah   49 Jul 20  2020  org.kde.ksysguard.desktop -> /usr/share/applications/org.kde.ksysguard.desktop
lrwxrwxrwx 1 poobah poobah   49 Nov 18 09:24  org.kde.marble-qt.desktop -> /usr/share/applications/org.kde.marble-qt.desktop
lrwxrwxrwx 1 poobah poobah   49 Dec 16 09:01  org.kde.spectacle.desktop -> /usr/share/applications/org.kde.spectacle.desktop
-rw-r--r-- 1 poobah poobah 3101 Jul 18  2020  org.kde.trash.desktop
lrwxrwxrwx 1 poobah poobah   56 Jul 27  2020  org.qt-project.qtcreator.desktop -> /usr/share/applications/org.qt-project.qtcreator.desktop
lrwxrwxrwx 1 poobah poobah   38 Jul 27  2020  qsynth.desktop -> /usr/share/applications/qsynth.desktop
-rwxr-xr-x 1 poobah poobah 2403 Jul 18  2020  register.desktop*
lrwxrwxrwx 1 poobah poobah   39 Jul 27  2020  scribus.desktop -> /usr/share/applications/scribus.desktop
lrwxrwxrwx 1 poobah poobah   37 Jul 23  2020  sigil.desktop -> /usr/share/applications/sigil.desktop
lrwxrwxrwx 1 poobah poobah   35 Jul 27  2020  sol.desktop -> /usr/share/applications/sol.desktop
lrwxrwxrwx 1 poobah poobah   43 Jul 27  2020  thunderbird.desktop -> /usr/share/applications/thunderbird.desktop
lrwxrwxrwx 1 poobah poobah   35 Jul 27  2020  vlc.desktop -> /usr/share/applications/vlc.desktop
-rwx------ 1 poobah poobah  333 Sep 25 16:23  Wx.desktop*
lrwxrwxrwx 1 poobah poobah   37 Aug  6  2020  xsane.desktop -> /usr/share/applications/xsane.desktop


I'm not sure why there is a difference.

Another thing that I just learned is that the scripts run prior to the session start, and the .desktop files run after the start of the session. This makes perfect sense, but I just never realized it before.
If only the best bird sang, the forest would be a very quiet place.
User avatar
banjo
 
Posts: 445
Joined: May 4th, '11, 03:50
Location: Reading, Massachusetts


Return to Testing : Alpha, Beta, RC and Cauldron

Who is online

Users browsing this forum: No registered users and 1 guest

cron