Vous êtes sur la page 1sur 6

4/28/2016

H UD for xubuntu J.A.M cN aughton

J.A.McNaughton
Technology and Research

HUD for xubuntu


OCTOBER 19, 2015December 29, 2015 Linux Tools and Themes
(https://jamcnaughton.com/2015/10/19/hud-for-xubuntu/)
I find that xubuntu leaves me wanting for very little feature-wise. The only thing
Ive ever felt disappointed by is its lack of a readily available Heads-Up Display
(HUD) for searching through app menus with. It now looks like this one issue
has been resolved with the i3-hud-menu script.
You may now be asking, What is a HUD and why should I care? A Heads-Up
Display allows you to search through an applications appmenu. So if youre trying to find that single
filter in GIMP but cant remember which filter category it fits into or if you cant recall if preferences
sits under File, Editor Tools on your favourite browser, you can just search for it rather than hunting
through the menus.

(https://jamcnaughton.com/2015/10/19/hud-for-xubuntu/xubuntu_hud_screenshot_1/)
This
post
details
an
updated
version
of
Rafal
Bocquets
i3-hud-menu
(https://github.com/RafaelBocquet). When called, the script opens a dmenu instance at the top of the
screen which can be instantly searched and navigated through with the keyboard (you could also get
patches that makedmenu respond to the mouse allowing for a more Unity-HUD-like experience). The
scripts used are provided in the following zip file:

i3-hud-menu.zip (https://github.com/jamcnaughton/i3-hudhttps ://jamcnaughton.com/2015/10/19/hud-for-xubuntu/

1/6

4/28/2016

H UD for xubuntu J.A.M cN aughton

menu/archive/master.zip)
Before use youll need to sure that you have python3, python-dbus and dmenu installed. You also
should ensure that appmenu-qt, unity-gtk2-module and unity-gtk3-module are installed. All these
packages can be installed together through the following command:

sudo apt-get install python3 python-dbus dmenu appmenu-qtunity-gtk2-m

Once installed youll also need to add the following to your .profile file:
export APPMENU_DISPLAY_BOTH=1
if [ -n "$GTK_MODULES" ]
then
GTK_MODULES="$GTK_MODULES:unity-gtk-module"
else
GTK_MODULES="unity-gtk-module"
fi
if [ -z "$UBUNTU_MENUPROXY" ]
then
UBUNTU_MENUPROXY=1
fi
export GTK_MODULES
export UBUNTU_MENUPROXY
On some systems it may be better to place this code snippet at the top ofthe .bashrc file.
The download contains two scripts which should be unpacked from the zip and put somewhere you can
easily call them (like a folder in your home directory). The first script,i3-appmenu-service.py, should
be set to start up with the session (on xubuntu this can be easily done with the Session and Startup app
by adding an entry where the command is just path/to/i3-appmenu-service.py).
The second script,i3-hud-menu.py, should be bound to a shortcut. The most useful setup for the second
script is to bind it to a keyboard shortcut (which in xubuntu can be done with the Keyboard app by
adding an entry where the command is just path/to/i3-hud-menu.py),I use ctrl + the special/windows
key. You could also create a visible shortcut on a panel (such as through a launcher on an xfce panel, as
shown in the image bellow).

https ://jamcnaughton.com/2015/10/19/hud-for-xubuntu/

2/6

4/28/2016

H UD for xubuntu J.A.M cN aughton

(https://jamcnaughton.com/2015/10/19/hud-for-xubuntu/xubuntu_hud_screenshot_2/)
The ReadMe on the github repositoryfor the updated scripts (https://github.com/jamcnaughton/i3-hudmenu)explains the workings and usage of the scripts in more detail. Note that some apps just wont
play nice such as Firefox while others may need a bit of tweaking to work (for example, Java based
apps may need additional libraries (http://www.webupd8.org/2014/02/get-unity-global-menu-hudsupport-for.html) installed, though Eclipse actually does work without any additional tweaking).
Though tested on xubuntu 14.04 only, this should work for most recent versions of the OS and may
also work to an extent on other Linux distributions as long as they support the dmenu, dbus and python.
Note:On some distributions you may need to installunity-gtk-module-standalone-bzr to get the unitygtk-modules. If you need to do this run this code in a terminal:
gsettings set com.canonical.unity-gtk-module gtk2-shell-showsmenubar false
(or change this setting to false through the dconf editor) and reboot to ensure the menu-bars in GTK
applications are shown.
Warning:Installation of unity-gtk-modules may disable the global-menu on some distributions as its
constituent packages conflict with those the menus may depend on.

https ://jamcnaughton.com/2015/10/19/hud-for-xubuntu/

3/6

4/28/2016

H UD for xubuntu J.A.M cN aughton


About these ads (https://wordpress.com/about-these-ads/)

Tagged appmenu, dbus, dmenu, gtk, hug, linux, search, ubuntu, usability, xfce, xubuntu

JAMcNaughton
Read more posts by this author

11 thoughts on HUD for xubuntu


1. goTbleTU (@gotbletu) says:
October 22, 2015 at 11:34 am
1) running an archlinux system; i dont seem to have this folder /etc/X11/Xsession.d is there
another place to put the 80appmenu file? I did create both folder and file but it doesnt seem to do
anything.
2) assuming if i get the 80appmenu file to load properly, does that work on GTK apps as well as
QT? You seem to have GIMP menu visible on your screenshot
REPLY
JAMcNaughton says:
October 22, 2015 at 12:26 pm
Hi. When working the scripts will support GTK.
I think you might need to tweak things a bit to get them working outside ubuntu-based
distributions. I suspect you may need to install appmenu-gtk2 and appmenu-gtk3 instead of the
unity-gtk modules. Youll also need to change the references regarding unity-gtk-module in
.profile to appmenu-gtk.

https ://jamcnaughton.com/2015/10/19/hud-for-xubuntu/

4/6

4/28/2016

H UD for xubuntu J.A.M cN aughton

Instead of creating the 80appmenu file try adding export APPMENU_DISPLAY_BOTH=1 to


the end of the .profile file.
I dont have archlinux to hand so Ill be interested to hear if this can actually work.
REPLY
2. goTbleTU (@gotbletu) says:
October 22, 2015 at 6:14 pm
1) doesnt seem to work if you have anything else other than unity-gtk-module ; i tryed appmenugtk, appmenu-gtk2, appmenu-gtk3.
2) got this to load, export APPMENU_DISPLAY_BOTH=1
checked using echo $APPMENU_DISPLAY_BOTH
3) Steps used (Archlinux)
installed packages
Official: python dmenu python-dbus bzr appmenu-qt
AUR: unity-gtk-module-standalone-bzr
(Provides : appmenu-gtk2 appmenu-gtk3 unity-gtk-module)
sudo vim /etc/X11/xinit/xinitrc.d/80unity-gtk-module
added in; export APPMENU_DISPLAY_BOTH=1
Note: dont think you need the ~/.profile since this 80unity-gtk-module exist already.
Binded hotkeys to i3-hud-menu.py
Added startup to i3-appmenu-service.py
4) Long story short, the HUD works just the menu is invisible, which i like it to be visible and
working with the HUD.
Anyways if you figure it out let me know, and many Thanks for figuring this out for none Unity
users lols =)
REPLY
JAMcNaughton says:
October 22, 2015 at 9:24 pm
Hi,
Great to hear youve got it kinda working. Shame about the app menus.
REPLY
JAMcNaughton says:
October 26, 2015 at 5:58 pm
Hi again,
Im still scratching my head over this one. Do the menubars disappear from the qt apps (like
vlc) too?
If not, then it may just be a gtk problem. If thats the case then try adding gtk-shell-showsmenubar=0 to the following files:
~/.config/gtk-3.0/settings.ini
https ://jamcnaughton.com/2015/10/19/hud-for-xubuntu/

5/6

4/28/2016

H UD for xubuntu J.A.M cN aughton

~/.config/gtk-2.0/settings.ini
/etc/gtk-3.0/settings.ini
REPLY
1. goTbleTU (@gotbletu) says:
October 27, 2015 at 6:05 am
qt apps are fine, is just the gtk apps that has the missing menu. tryed all those settings.ini,
didnt seem to do anything
2. JAMcNaughton says:
October 27, 2015 at 8:16 am
Thanks, that narrows things down a bit. Could you try the following:
gsettings set com.canonical.unity-gtk-module gtk2-shellshows-menubar false
then reboot? (You can also set this through the dconf editor if you encounter any
permissions errors.)
3. goTbleTU (@gotbletu) says:
October 27, 2015 at 12:17 pm
Thanks that works, mission accomplish =)
gsettings set com.canonical.unity-gtk-module gtk2-shell-shows-menubar false
Note: i delete all the settings.ini as that was not needed
3. Lieven Hanssen says:
October 25, 2015 at 9:09 am
I have the same problem in elementary OS Freya (which is based on Ubuntu 14.04) where the
menu bar doesnt appear, but also the top panel (vingpanel) disappears. The work arounds you
suggested unfortunately dont work for me either.
REPLY
4. johnwind says:
February 17, 2016 at 9:58 am
could i get this up without unity ?
REPLY
JAMcNaughton says:
February 17, 2016 at 6:39 pm
Im afraid not without the unity packages. Theyre the only packages widely available at the
moment which collect the menu data from a wide range of frameworks.
REPLY

J.A.McNaughton
Create a free website or blog at WordPress.com. | The Ecto Theme.

https ://jamcnaughton.com/2015/10/19/hud-for-xubuntu/

6/6

Vous aimerez peut-être aussi