Turn autostarts into LXQt modules

I’ve been reminded that I wanted to turn our autostarts into LXQt modules:

I have had a bug for this for almost a year now, so it would be a good time to finally attack it. It’s a one line change per Desktop Entry, so pretty easy stuff. I’ve got some other things to contend with before I attack this myself, if anyone wants to get a jump on it.

4 Likes

Getting around to this at long last.

I added some more to that bug report. The important details:

  1. I’ve added an experimental Picom module in lubuntu-default-settings 25.04.09. Please test!
  2. I made a list of all of our autostarts along with some suggestion of what to do in relation to LXQt modules. I’d appreciate some feedback.

For those that just want the short story, I’m suggesting these modules:

*.desktop from package LXQt Module name
blueman blueman Bluetooth Manager
lubuntu-update-autostart lubuntu-update-notifier Lubuntu Update
lxqt-qlipper-autostart qlipper via lxqt-session Clipboard Manager
lxqt-xscreensaver-autostart lxqt-session Screensaver
nm-tray-autostart nm-tray Network Manager
print-applet system-config-printer via lxqt-config Print Manager
3 Likes

The only other autostarts I can think of that I find necessary and useful would be the snap ones (snap-userd-autostart and snap-installation-monitor.) But I’m a bit confused: aren’t these already modules?

If you looked at the article I linked to in the bug description, I think it will explain this.

To elaborate a bit: LXQt Modules are kind of a special version of autostart. Or maybe an embellishment thereof. The autostart list is a little bit uninformative:

image

Those checks simply tell whether or not something is enabled. In the case of “Network” (nm-applet), we turn this off via a superceding Desktop Entry a la lubuntu-default-settings.

But what this doesn’t tell you is whether or not any of them are actually running. For example, “Snap Installation Monitor” isn’t. It’s a one and done kind of thing.

If I make this a module, it becomes much more obvious:

image

It’s also easy to start and stop.

In the end, it’s more of a “services” interface than a mere list.

I think because those Snap utils are indeed one and done, I’m disinclined to add them. For example, let’s say you’re new to Lubuntu and Snaps altogether. You come to learn what Snaps are, but that’s about all you know. You look here and see “Snap Installation Monitor” isn’t running and you think you should start it. So you do. It flashes “Running” really quickly and then stops again. That doesn’t seem right, does it? But it is.

2 Likes

Riiight… I see where my confusion was between autostarts and modules, and, yes, it’s all clearer now.

(I suppose more savvy users would be able to tell what’s working, what to (re)start, etc. via systemd, but the target demographic here can’t be expected to know its way around that.)

Well if we were all so savvy I’m sure few of us with even bother much with the UI!

1 Like

I’ve not heard from anyone about this so I’m inclined believe everything is fine with Picom and to just move forward with additions I’ve suggested.

The one I think I would add is Geoclue. It is on by default and I think that those folks concerned about privacy would appreciate the more obvious transparency of having it as an LXQt Module. Maybe calling it “Location Service.” One major reason to do this would be to make it more clear in general. In the autostart, it’s dispalyed as “Geoclue Demo Agent” which sounds really silly, like why would you have a demo running? But this is the essential Geoclue service (if you want proof of that, kill the service, then run redshift-qt: it will run initially, but then complain about geoclue-2.0, even though it started an additional service /usr/libexec/geoclue)

Somewhat related (we have Geoclue because of it), I think it would also be good to create an LXQt Module for Redshift as “Color Temperature Manager.” Currently, it’s not autostarted. If we create an LXQt Module for it and set Hidden=true, it will appear in the list but not be started automatically and not even be enabled:

image

Also note up there the tooltip. I had thought that there were no such things in this section, but was led to believe that by the fact that the upstream modules don’t have Comment keys. So my thinking is to use the application name for this. That way, it’s user friendly, but has more detail for the more advanced user.

So I’m just going to do the above unless someone suggests otherwise.

The one other thing to deal with is translations of the Name values. For the initial run, I can copy what we have in the current Desktop Entries, but as far as maintaining them is concerned, I don’t know what the ideal thing is. How can we continue to deliver changes from upstream? Or should we just take on translation of these strings ourselves? @roberalz perhaps you can offer some advice here?

I guess the only comment I can offer about modules vs autostarts is performance? Are modules (significantly) heavier than autostarts in terms of memory, startup, etc?

More info is better as long as it’s not clutter. e.g. the tooltip usage suggestion (app name) is good since it would help point to man pages, etc.

From what I can tell, there is no noticable difference and if there’s any difference, it’s actually better (?!) with the module. I did ps -C lxqt-session -o drs,pss,rss,sz,trs,vszq before and after removing the LXQt Module for Picom and found the following differences:

state PSS RSS
LXQt Module 3651 32896
standard autostart 10109 42160

I originally wrote the opposite was true despite doing the same test because I just logically assumed that would be the case. So I guess it’s better for us to make this change!

Really it’s just moving the autostarts from the autostart section to the LXQt module section. The additional value value here is three fold:

  1. We can more easily control what it’s displayed. Technically, we can do this with superceding standard autostarts, but I think this offers us a little extra flexibility.
  2. The different interface correctly gives the user an indication as to whether or not the service is actually running or not.
  3. Should the user want to start or stop the service, they can do so easily within the interface.

It also retains one function that the traditional autostarts have: being able to disable/enable the service from the interface.

Should be fixed in lubuntu-default-settings 25.04.10.

Good news: we finally have images again¹ and the new default settings are in there.

The bad news: some of the things don’t work right, primarily because the Desktop Entry filename needs to be exactly the same:

  1. There are two network icons in the because both /etc/xdg/autostart/nm-tray-applet.desktop and /etc/xdg/xdg-Lubuntu/autostart/nm-tray.desktop.
  2. Several things may be shown in both LXQt Modules and in Autostart. This is a problem because if someone unchecks it in Autostart, it will override our override in LXQt Modules (by using a local Desktop Entry).
  3. Ultimately with applications that do not allow for multiple instances, there is a race condition:
    • If the LXQt Module wins, it will not be displayed in Autostart.
    • If the Autostart wins, it will be displayed in both Autostart and LXQt Modules, but will not be running in LXQt Modules

There’s already a bug on this (thanks for testing @leok!) where it seems that the race condition caused one of the entries to get disabled.

Fix uploaded in 25.04.11.


¹ For those curious, we haven’t had images across the entire Ubuntu landscape since about the 17th due to issues with Mesa. Right now there’s a hotfix in place to get images building, but a larger fix is forthcoming. See the bug report.
1 Like