Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-05-15 05:56:20

fulalas
Member
Registered: 2016-11-11
Posts: 16

How to restart Whisker menu via script?

If I manually kill Whisker menu via Task Manager, it closes and then restart automatically. I would like to do that via script without having to restart the whole panel. Is it possible?

Offline

#2 2020-05-15 10:37:41

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: How to restart Whisker menu via script?

Sending a sighup seems to work:

kill -SIGHUP $(ps -ef | grep whisker| grep -v grep | awk '{print $2}')

Out of curiosity, why do you need to restart whiskermenu of itself?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2020-05-16 07:08:36

fulalas
Member
Registered: 2016-11-11
Posts: 16

Re: How to restart Whisker menu via script?

Thanks, ToZ!

I want to do that because I'm one of Porteus developers and this distro has the concept of modules being loaded/unloaded dynamically. For some reason that I don't know Applications Menu can autodetect when a .desktop is copied/removed to/from /usr/share/applications, but Whiskermenu can't. So the only way I found to update its items is restarting the plugin (or the whole panel, but this is ugly). If you know a better way to just update the items in Whiskermenu, it'll be really useful.

The solution you provided works, but if I keep loading/unloading modules I face this annoying dialog:
a0wkqw4hcj2t5cizg.jpg

Offline

#4 2020-05-16 08:57:59

Misko_2083
Member
Registered: 2015-10-13
Posts: 211
Website

Re: How to restart Whisker menu via script?

Try with a different signal.

kill -SIGUSR1 $(ps -ef | grep whisker | grep -v grep | awk '{print $2}')

Do you want to exit the Circus?
https://www.youtube.com/watch?v=ZJwQicZHp_c

Offline

#5 2020-05-16 12:15:28

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,488

Re: How to restart Whisker menu via script?

fulalas wrote:

For some reason that I don't know Applications Menu can autodetect when a .desktop is copied/removed to/from /usr/share/applications, but Whiskermenu can't.

It should. What version of xfce4-panel, garcon and xfce4-whiskermenu-plugin are you using?
Are there any messages in an xsessions error file?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#6 2020-05-17 08:08:28

fulalas
Member
Registered: 2016-11-11
Posts: 16

Re: How to restart Whisker menu via script?

@Misko_2083, thanks! It works like a charm! smile

@ToZ, there's no message at all. The versions are the following:
xfce4-panel: 4.14.4
garcon: 0.6.4
xfce4-whiskermenu-plugin: 2.4.4

I know that if I manually copy/remove some .desktop to/from /usr/share/applications then Whiskermenu can autodetect it. However, what Porteus does is a bit more complicated than that. It uses mount like this:

mount -no loop,ro moduleName /mnt/live/memory/images/moduleName

Of course it would be great if Whiskermenu could autodetect changes anyway, but Misko's solution doesn't sound that bad -- we've been using panel restart, so... tongue

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 536.02 KiB (Peak: 536.87 KiB) ]