Autostart delaying menu


(Gary) #1

I have a .desktop file in my autostart, where I have to set a delay so the app correctly displays it’s icon in the notification area.

The line for the delay in the .desktop file is as follows…

Exec=bash -c “sleep 15 && megasync &”

So a 15 second delay.

The problem with this, my menu is unavailable during the delay. Any workaraounds?


(Pedram Pourang) #2

I didn’t understand what you meant by “my menu is unavailable during the delay” but the most flexible way of sorting your startup is doing it in a bash script – preferably, inside ~/bin, while it’s added to your paths (PATH="$HOME/bin:$PATH") – and adding that script to LXQt Session Settings → Autostart:

#!/bin/bash
# Do this
sleep 15
megasync &
# Do that
exit

(Gary) #3

The menu on the taskbar, unresponsive.

I can’t click on anythinh, the menu, desktop switcher, etc…

It’s a long delay, might have to live with it.


(Alf Gaida) #4

Should be co-incedent. If you have to much spare time search our bugtracker in github for non-blocking behaviour of the panel - or the whole DE. I can reproduce the blocking partly - all i have to do is to attach my Logitech Cam C270.

All other devices i know don’t trigger that behaviour - so: Not nice, if you find other triggers, please let us know, a bunch of users will hail you :slight_smile:


(Pedram Pourang) #5

I never put sleep into a desktop file but if the panel freezes, it could be helpful for finding the cause. @palinek, any idea?

Anyhow, do as I explained and get rid of the problem.


(Alf Gaida) #6

@tsujan - it will likely not help - a sleep in a process that spawns an new shell will likely not block the panel - we have done some things that will help with no-blocking behaviour of the panel. It might be not enough yet - my strong guess is a hanging/waiting dbus session - the cam thing i described goes back to dbus i suspect-


(Pedram Pourang) #7

I supposed that the freeze @rural_cdn sees is because of sleep inside the desktop file. If that’s not the case – i.e. if megasync blocks the panel without sleep – you’re right.


(Alf Gaida) #8

@tsujan - just make a test - modify the featherpad desktop file, put in in ~/.config/autostart or so and don’t forget the sleep 90 :sunglasses: - damn, if it would slow down the panel start about 90s we has just fund a grave bug that we should solve asap


(Pedram Pourang) #9

OK, you’re right; no freeze, no grave bug.

For a long time, my startup apps have been these and I’ve never encountered a delay:

Geoclue (what? I didn’t know about it before)

lxqt-config-touchpad

MSM notifier (systray, belongs to Manjaro)

Octopi notifier (systray)

PluseAudio

Start Extras, which is a bash script with several sleep lines that starts:

remind

FeatherNotes (systray)

A login sound

conky

cmst (systray)

clipit (systray)

easystroke

solaar (systray)

lxqt-notificationd

And, of course, everything LXQt starts.


(Alf Gaida) #10

@tsujan - no fucking grave bug in our code. I don’t know whats wrong with me but i’m finally landed on Lemmy’s funeral service - and the thing is: all the badass motherfuckers said he is a nice guy - one of the things i’ve known before. So if possible we should find the reason for this behaviour.

I’m great in listening to music and complain about not working software - but the real but is: Damn there is a thing we don’t know - it makes me not happy . We should take care of and it might be that we are not haapy about the outcome, but it will be worth it. And i have absolutely no cluee where to search, i suspect some misunderstanding of dbus.


(Pedram Pourang) #11

Damn there is a thing we don’t know

One of reasons why I like coding.

In this case, the number of unknown factors is too big. I can’t reproduce the issue here — I could only on VirtualBox but it wasn’t good for investigating anything, being too slow and uncomfortable.

If only there was a way to narrow it down…

NOTE: I’ll never install megasync for that.


(Alf Gaida) #12

and this was exacly why i mentioned Lemmy - he made some impossible tasks possible, the very most was to be polite, the second one was: God damn, motherfu**ers, do what you could do best and be good at it. We are, but we can do better in some corner cases. My meme would be this old man and: We rock!! (and nothing else matters, no regrets, no apologies)


(Pedram Pourang) #13

The idea of LXQt was an “impossible” task. I think most coders are familiar with “impossible bugs”; I’ve encountered them many times and every time they were fixed. The case of freezing panel shouldn’t be an exception. But only if it froze here :wink:


(palinek) #14

@agaida you’re the only one of us, who can trigger the bug. Can you, please, reproduce the bug and (while the panel is hanging):

  • kill the panel with SIGABRT
  • or attach to the panel process with gdb

and then share the backtrace. Maybe we can find there something.


(Alf Gaida) #15

meh - get a C270 :smile: - joke aside, first i noticed that in a pure debian environment and wrote a debian bug about - will be damn hard to track down, because the hang is only at system start, doesn’t happend later. Will try my very best. Btw - the behaviour is reproducible on all of my machines - and only if the Cam is attached.