Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-07-04 04:29:59

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 812

is there a way to add a menu entry to Whisker?

is there a way to add a menu entry to Whisker?  the first section is "Favorites" and that seems like a good place to add to.  i want to add an entry labeled "Admin" that executes "dm-tool switch-to-user admin" for a quick jump to admin.

Offline

#2 2019-07-04 09:53:14

Spass
Member
From: Poland
Registered: 2016-12-07
Posts: 133

Re: is there a way to add a menu entry to Whisker?

Sure. You can create your own Admin.desktop launcher (file) in the ~/.local/share/applications/ that looks something like this:

[Desktop Entry]
Name=Admin
GenericName=Change to admin
Comment=Change user to admin
Exec=dm-tool switch-to-user admin
Icon=users
Terminal=false
Type=Application
Categories=GNOME;System;
Keywords=Admin;
StartupNotify=false

But I didn't try that so I'm not 100% it will work. Or you can simply use a GUI application to create it, like MenuLibre or Alacarte. Your new menu entry should be shown in Whisker (maybe after restart). Find it there, right-click on it and add it to favorites.

Offline

#3 2019-07-04 15:26:24

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 812

Re: is there a way to add a menu entry to Whisker?

i looked in that directory and found 3 old .desktop files for launchers i had created during 2015 under Unity.  but they don't show up anywhere in Xfce so i wonder if adding anything there would do anything.

here's what one of them looks like.  this was created by some app in Unity, not by me, though i picked the name.  maybe something (OnlyShowIn) in it makes Xfce ignore it.

[Desktop Entry]
Name=termfine
Comment=Use the command line
Keywords=shell;prompt;command;commandline;cmd;
TryExec=gnome-terminal
Exec=gnome-terminal --window-with-profile=termfine
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=3.18.3
Categories=GNOME;GTK;System;TerminalEmulator;
StartupNotify=true
X-GNOME-SingleWindow=false
OnlyShowIn=GNOME;Unity;
Actions=New
X-Ubuntu-Gettext-Domain=gnome-terminal

Last edited by Skaperen (2019-07-04 15:28:18)

Offline

#4 2019-07-04 16:02:48

Spass
Member
From: Poland
Registered: 2016-12-07
Posts: 133

Re: is there a way to add a menu entry to Whisker?

Yeah, I can only assume that this line is the reason why it's not showing in Whisker:

OnlyShowIn=GNOME;Unity;

Anyway, I think the easiest way is to use MenuLibre for creating a new menu entry. I'm a GUI guy :)

Offline

#5 2019-07-04 17:43:08

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 812

Re: is there a way to add a menu entry to Whisker?

what setting names should i put in a desktop file there?  obviously not OnlyShowIn=.

maybe these?

Name=Admin
Comment=Switch to Admin
Exec=dm-tool switch-to-user admin

Offline

#6 2019-07-04 20:55:21

Spass
Member
From: Poland
Registered: 2016-12-07
Posts: 133

Re: is there a way to add a menu entry to Whisker?

Did you try using the example file content I've posted in #2? I think it actually might work.

Offline

#7 2019-07-04 23:05:50

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 812

Re: is there a way to add a menu entry to Whisker?

i put admin.desktop in  ~/.local/share/applications but nothing shows up.  do i need to restart Whisker?  if so, how?

Offline

#8 2019-07-05 16:49:44

Spass
Member
From: Poland
Registered: 2016-12-07
Posts: 133

Re: is there a way to add a menu entry to Whisker?

Hmm, maybe it's necessary to restart your whole session / machine, but I would try this first:

xfce4-panel -r

But like I said before, what I would do personally is create that entry from the MenuLibre application.

Offline

#9 2019-07-05 18:51:48

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 812

Re: is there a way to add a menu entry to Whisker?

the user ("skaperen")i tried this on i logged out then 2 minutes later, i logged back in.  i still don't see it.  am i looking in the right place?  where should i be looking?

Offline

Board footer

Powered by FluxBB