- Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]
- Install and set up Vala AppMenu in Ubuntu (MATE/Xubuntu) or Linux Mint (Xfce) via PPA
- Undo the changes
- Vala appmenu linux mint
- Как иметь глобальное меню в Ubuntu Mate благодаря Vala Panel AppMenu
- Vala Panel AppMenu поможет нам вывести меню за пределы окна приложения.
Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]
Author : Andrew | Posted: February 16, 2017
Here’s where Vala Panel AppMenu comes in.
Vala Panel AppMenu is a global menu panel applet for Xfce, MATE and Vala panels, which uses unity-gtk-module as its backend, and it works with all the applications supported by Unity’s AppMenu.
Here’s an Ubuntu MATE 16.10 screenshot as well:
- when no window is focused / the desktop is empty, a menu containing «Desktop» and «Files» is displayed by the Vala AppMenu applet. These menu items don’t work, at least in Ubuntu, and using them can cause the Xfce / MATE panel to crash;
- Qt5 supports the AppMenu feature by default, without using any additional packages (I’m not sure which version introduced this feature), however, there’s a bug with this and Vala AppMenu which causes the global menu for Qt5 applications to be displayed for a few seconds after the app is closed. This doesn’t occur if the appmenu-qt5 package is installed though;
- MATE only: GTK2 applications have the menu displayed on both the panel and in the application window. If someone can find a way to solve this, please let us know in the comments!;
- MATE only: there’s no easy way of moving the applet to the desired position, but it can be done using Dconf Editor;
- there’s no way of changing the global menu font color, and that can be problematic with some themes. For example, the menu font is dark on a dark panel background using the default Xubuntu 16.04 theme (Greybird). This doesn’t occur with Numix GTK theme (which is installed by default in Xubuntu) or Greybird in Xubuntu 16.10.
Install and set up Vala AppMenu in Ubuntu (MATE/Xubuntu) or Linux Mint (Xfce) via PPA
If you don’t use Ubuntu or Linux Mint, you can grab the Vala Panel AppMenu source from GitHub.
Arch Linux users can install Vala Panel AppMenu via AUR.
For Ubuntu or Linux Mint, see the instructions below.
Then, install the Vala AppMenu plugin / applet:
— for Xfce (Xubuntu 16.10, 16.04 / Linux Mint Xfce 18.x):
— for MATE (Ubuntu MATE 16.10):
2.A. for Xfce, simply run the command below:
2.B. for MATE, you’ll need to edit the
/.config/gtk-3.0/settings.ini file (if this file doesn’t exist, create it) and in this file, add the following under «[Settings]»:
Here are step by step instructions for doing this. Firstly, create the
/.config/gtk-3.0/ folder in case it doesn’t exist, by using the following command:
Then open
/.config/gtk-3.0/settings.ini with Pluma text editor:
If this file has a «[Settings]» section, paste under it the following:
If the file is empty, paste the following in this file:
. and save the file.
Unfortunately, for MATE, this will not disable the menu from being displayed in app windows for GTK2 (I mentioned this in the issues section above).
3. Restart the session (logout, then log back in).
4. Add the Vala AppMenu applet to the panel (and how to change its position on the MATE panel).
Next, launch Dconf Editor, navigate to org > mate > panel > objects and in the «objects» tree, you should see some items called «object-1», «object-2» and so on. Start from the last object and see which has the «applet-iid» value set to «AppMenuAppletFactory:AppMenuApplet».
Note: you may have multiple applets («object-1», «object-2», etc.) with the «applet-iid» value of «AppMenuApplet. » — in that case you’ll need to change the settings for the last one (the higher number).
5. Optional: enable Vala Appmenu (global menu) for Firefox and Thunderbird.
By default, Vala AppMenu will only display the Thunderbird and Firefox Unity actions (quicklists) on the panel. To enable the full Firefox and Thunderbird menu on the panel, you must launch Firefox and Thunderbird with «UBUNTU_MENUPROXY=0».
You can do this automatically (by copying the Firefox and Thunderbird .desktop files from /usr/share/applications to
/.local/share/applications/ so they are not overwritten when they receive updates, and modify the .desktop files there) for both Firefox and Thunderbird, by using the commands below:
Undo the changes
Below you’ll find the exact steps required to undo the changes made by following the instructions mentioned above.
1. Remove Vala AppMenu:
If you are sure (Important! don’t remove these packages if you also use Unity) that the Unity GTK module and AppMenu packages are not used by any other packages on your system, also purge them by using the following command:
2. Undo the MATE/Xfce menu disable settings
2.A. For Xfce, use the following commands:
2.B. For MATE, open
/.config/gtk-3.0/settings.ini with a text editor — the command below uses Pluma to open this file:
And from this file, remove the following two lines:
If this file was created by following the instructions in this article (was empty or it didn’t exist before), you can simply remove it by using the following command:
3. Restart the session (logout, then log back in)
4. If you applied the optional Thunderbird and Firefox tweaks mentioned above, you can undo this step by simply removing their .desktop files from
/.local/share/applications/. To do this from a terminal, use the following commands:
Источник
Vala appmenu linux mint
Copy raw contents
Vala Panel Application Menu
Vala Panel Application Menu is a Global Menu applet for use with Vala Panel, xfce4-panel and mate-panel (Budgie 10.x is also planned). unity-gtk-module is used as a backend, and thus must also be installed (see instructions, below).
REQUIRED DEPENDENCES
Compilation Instructions (Non-Distribution-Specific)
- Install all the required dependencies listed above. These packages may have different names depending on your distribution. Please see below for the package names on some specific distributions (i.e. Ubuntu).
- Clone this repository to your home directory by typing: git clone https://gitlab.com/vala-panel-project/vala-panel-appmenu.git then cd into the directory.
- You’re almost ready to run meson . First, review the following flags:
- Meson flags:
- -Dxfce=[on/off] Use on to compile applet for XFCE Panel
- -Dbudgie=[on/off] Use on to compile for budgie (experimental)
- -Dvalapanel=[on/off] Use on to compile for Vala Panel
- -Dmate=[on/off] Use on to compile for MATE Panel
- -Djayatana=[on/off] Use on to include Jayatana library (enable global menu for java swing applications), requires CMake
- -Dappmenu-gtk-module=on Use this flag if you are compiling for a distro other than Arch (see instructions below for including unity-gtk-module with Arch) or Ubuntu (Ubuntu users can install unity-gtk-module from the ubuntu repositories—see ‘Post-build Instructions’, below).
- —prefix=[path] By default, Vala-Panel-Appmenu will install in the /usr/local directory. You can use this flag to change that. For some DEs (XFCE, for example), it is required to match install prefix with panel prefix ( /usr in most distros), so, do not forget it.
- Meson flags:
- once you’ve decided on any flags you want to include, type (from your build directory) meson [flags] [dir]
- once the build is successful, you can compile and install Vala-Panel-Appmenu by typing cd [dir] && ninja && sudo ninja install
- Install bamfdaemon (if it is not bundled with libbamf)
- It is strongly recommend to add bamfdaemon to autostart
- Install GTK module using instructions below
- To get QT menus to work, install your distribution’s qt4 and qt5 appmenu packages. In Ubuntu 17.04, for example, this involves typing sudo apt-get install appmenu-qt
To install and enable unity-gtk-module for your distro:
UBUNTU-BASED DISTROS
- Install unity-gtk-module by typing sudo apt-get install unity-gtk-module-common unity-gtk2-module unity-gtk3-module
- Follow instructions in (appmenu-gtk-module) README, but replace any occurence of appmenu-gtk-module to unity-gtk-module
ARCH-BASED DISTROS
- Install from AUR appmenu-gtk-module-git for GTK applications to work
- Install Appmenu to get appmenu for Qt4 Applications to work. Qt 5.7 must work out of the box.
- Install these libdbusmenu-gliblibdbusmenu-gtk3libdbusmenu-gtk2 to get Chromium/Google Chrome to work
- Follow instructions in the (appmenu-gtk-module) README, if it is not enabled automatically.
DISTROS OTHER THAN ARCH OR UBUNTU
- When building vala-panel-appmenu with CMAKE, use the flag, -DENABLE_APPMENU_GTK_MODULE=ON
- Follow instructions in the (appmenu-gtk-module) README
NOTE: Vala-Panel-Appmenu conflicts with qt5ct before 21.04.2017, so, if you are using an older version of qt5ct, use another PlatformTheme.
Desktop Environment-Specific Settings
When using the Vala-panel-appmenu as an XFCE or MATE menu applet, you have to configure the appmenu to show in the panel applet, rather than on each individual window. This configuration should remove any ‘double’ menus you may experience:
XFCE
- If you are using Vala-Panel-Appmenu for XFCE-Panel, type the following lines into your console:
MATE
- Enable the appmenu and menubar in gtk with these steps:
- If you are using MATE>=1.19 (or 1.18 in Ubuntu), use this commands:
BUDGIE
If you using gnome-settings-daemon, you should go to dconf-editor and set key org.gnome.settings-daemon.plugins.xsettings.overrides to <'Gtk/ShellShowsAppMenu': , 'Gtk/ShellShowsMenubar': >
If commands above does not work, create or edit .config/gtk-3.0/settings.ini file in your home(
) directory and add the following lines to it under [Settings] :
JAyatana
JAyatana allows for displaying global menus in Java Swing applications. Because Vala-Panel-Appmenu uses the unity-gtk-module backend, this should theoretically work with JAyatana, although applications such as Netbeans and the JetBrains suite of IDEs require some configuration, which you can figure out with a cursory internet search.
There are some problems with the implementation, notably that you need to include env XDG_CURRENT_DESKTOP=Unity to the beginning of your launch command.
Basic Instructions for Enabling JAyatana:
- Install OpenJDK >= 7 or JDK >= 1.7
- Build vala-panel-appmenu with -DENABLE_JAYATANA=ON
- Add following lines to your
/.bashrc, in any order:
Ubuntu 18.04
All variants require: git build-essential cmake bamfdaemon libdbusmenu-glib-dev libgtk2.0-dev gobject-introspection libbamf3-dev libdbus-glib-1-dev libffi-dev libgirepository1.0-dev libpeas-dev libstartup-notification0-dev libwnck-3-dev libwnck-common libwnck22 libxml2-utils libxres-dev libvala-0.40-0 valac valac-0.40-vapi
Ubuntu Budgie also needs: budgie-core-dev gir1.2-budgie-1.0 libbudgie-plugin0 libbudgietheme0 libraven0
Ubuntu MATE also needs: libmate-panel-applet-dev
Xubuntu also needs: exo-utils libexo-1-0 libexo-2-0 libexo-common libexo-helpers libgarcon-1-0 libgarcon-common libxfce4panel-2.0-4 libxfce4panel-2.0-dev libxfce4ui-1-0 libxfce4ui-2-0 libxfce4ui-common libxfce4util7 libxfce4util-common libxfce4util-dev libxfconf-0-2 libxfconf-0-dev xfce4-panel xfce4-panel-dev xfconf
Vala Panel also needs: libvalapanel0 libvalapanel-dev
Источник
Как иметь глобальное меню в Ubuntu Mate благодаря Vala Panel AppMenu
Распространение таких сред, как Unity или MacOS, заставляет все больше и больше пользователей использовать такие меню, как Global Menu. Функция глобального меню, удобная для многих пользователей. Мы уже объяснили, как сделать это в нашей Ubuntu, а также как сделать это в Xubuntu.
Сегодня мы расскажем, как сделать это в Ubuntu MATE с помощью приложения под названием Меню приложения Vala Panel. Это приложение способно внести существенные изменения в меню MATE, то есть оставить в стороне старый аспект Gnome.
Vala Panel AppMenu поможет нам вывести меню за пределы окна приложения.
Чтобы заставить Vala Panel AppMenu работать с MATE, сначала у нас должна быть последняя версия MATE или Ubuntu MATE 16.10. Нам также понадобятся следующие библиотеки GLib 2.40 или новее, Valac 0.24 или новее и libbamf 0.5.0 или новее. Выполнив эти требования, мы открываем терминал в Ubuntu MATE и пишем следующее:
Это установит приложение. Теперь нам нужно настроить его для работы с различными приложениями Ubuntu MATE. Итак, мы открываем следующий файл с помощью терминала
/ .config / gtk-3.0 / settings.ini и в разделе «НАСТРОЙКИ» вставляем следующее:
Если у нас его нет, мы должны создать папку и файл с предыдущей информацией. После этого мы сохраняем все и перезапускаем сеанс. Теперь нам нужно только вставить AppMenu панели Vala в панель Ubuntu MATE, иначе это не сработает.
Итак, на панели мы щелкнем правой кнопкой мыши и выберем опцию «Добавить элемент», среди списка элементов, которые мы можем добавить, мы выберем Vala Panel AppMenu и все, У нас уже будет опция глобального меню в Ubuntu MATE.. Это долгий процесс, но если мы действительно ценим такую настройку, конечный результат окупится.
Содержание статьи соответствует нашим принципам редакционная этика. Чтобы сообщить об ошибке, нажмите здесь.
Полный путь к статье: Убунлог » Дистрибутивы на основе Ubuntu » Как иметь глобальное меню в Ubuntu Mate благодаря Vala Panel AppMenu
Источник