Editing the new whisker menu

Forum rules
Before you post please read how to get help

Editing the new whisker menu

Postby Bauwle on Sun Aug 11, 2013 2:33 am

I just tried mint xfce today and it came with a great menu launcher, the new whisker menu and i really like it, the only problem that I want to edit the lock screen button here
Image
to execute the command "i3lock --color 2e2e2e" to use i3lock because the xscreensaver looks really ugly. So how do i do it?. Thanks in advance.
I searched the forums so i think it is safe to make a new thread, but if by some chance this was answered before, please feel free to remove this thread.
Bauwle
Level 1
Level 1
 
Posts: 2
Joined: Sun Aug 11, 2013 2:15 am

Linux Mint is funded by ads and donations.
 

Re: Editing the new whisker menu

Postby xenopeek on Sun Aug 11, 2013 3:20 am

A short search in the source code shows the lock_screen function in the file menu.cpp uses the command "xflock4" to lock the screen, see here: https://github.com/gottcode/xfce4-whisk ... u.cpp#L755. As it is C++ source code, you'll have to compile it from source to change this.

Compiling from source is easy-peasy (I peaked at the PKGBUILD from AUR to get the steps). First, get the development tools and libraries:
Code: Select all
apt install build-essential checkinstall cmake libexo-1-dev libgarcon-1-0-dev libxfce4ui-1-dev libxfce4util-dev xfce4-panel-dev

Download the source code and unpack it (replace 1.1.1 with 1.0.3 if you don't want the latest version, but the exact same version as you currently have on Linux Mint):
Code: Select all
wget http://gottcode.org/xfce4-whiskermenu-plugin/xfce4-whiskermenu-plugin-1.1.1-src.tar.bz2
tar xvf xfce4-whiskermenu-plugin-1.1.1-src.tar.bz2

Make the changes you need to the file xfce4-whiskermenu-plugin-1.1.1/src/menu.cpp and then get back to your terminal to compile the program:
Code: Select all
cd xfce4-whiskermenu-plugin-1.1.1
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
make
sudo checkinstall

The last step will ask you a series of yes/no questions, and ask you for a description of the program (just enter "whisker menu"). You can accept the default answer for all questions, except the question "Should I exclude them from the package? (Saying yes is a good idea) [n]". Answer "y" instead on this question.

Finally, restart the xfce4-panel to load the new menu:
Code: Select all
xfce4-panel --restart


An alternative hack that will work is to override the default xflock4 program. This will affect all programs that use xflock4 without its full path, but you won't change xflock4 and you won't need to compile from source the Whisker menu. To do so create a file /usr/local/bin/xflock4 (as root) and put this in it:
Code: Select all
#/bin/sh
i3lock --color 2e2e2e

Then make the file executable and next time you lock the screen this command will be run instead.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15447
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Editing the new whisker menu

Postby Bauwle on Sun Aug 11, 2013 3:52 am

Thanks! I successfully compiled it and it worked fine after installation. again thanks because you made it so easy to do.
Bauwle
Level 1
Level 1
 
Posts: 2
Joined: Sun Aug 11, 2013 2:15 am

Re: Editing the new whisker menu

Postby bobafetthotmail on Mon Sep 09, 2013 5:01 pm

If you just want to get rid of the ugly xscreensaver, you should just remove the xscreensaver package with apt-get. It would then "fall back" to the gnome-like looks it had in 14, with a simple black screen and a thunar-like popup window for the password when moving the mouse.

All credit goes to the guy in this thread. Where you find a better explanation and everything. :mrgreen:
bobafetthotmail
Level 4
Level 4
 
Posts: 355
Joined: Sat Aug 10, 2013 8:20 am


Return to XFCE

Who is online

Users browsing this forum: No registered users and 2 guests