未加星标

Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二05 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

A while back I wrote about TopMenu, a panel plugin that provides global menu (AppMenu) supportfor MATE, then also included support forXfce and LXDE.

The problem with TopMenu is that it only partially supports GTK3, it doesn't support LibreOffice, andwith Ubuntu 16.04, it doesn't support Qt (4 or 5) applications.

Here's where Vala Panel AppMenu comes in.

Vala Panel AppMenu is a global menu panel applet for Xfce, MATE and Vala panels, whichuses unity-gtk-module as its backend, and it works with all the applications supported by Unity's AppMenu.


Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]

As a result, Vala Panel AppMenu provides global menu support for GTK2, GTK3, Qt4 and Qt5 applications, as well as applications like Firefox, Thunderbird, Google Chrome / Chromium, and LibreOffice .

For MATE, Vala Panel AppMenu requires MATE Panel built with GTK3 (so for Ubuntu, it requires Ubuntu MATE 16.10 and newer). Its README also mentions that to build Vala Panel AppMenu, you'll need GTK 3.12 or newer, GLib 2.40 or newer, valac 0.24 or newer and libbamf 0.5.0 or newer.

Here's Vala Panel AppMenu in action with Chromium, Firefox, Gedit (GTK3), LibreOffice, VLC (Qt5), and Thunar (GTK2):


Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]
Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]
Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]
Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]
Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]
Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]

Here's an Ubuntu MATE 16.10 screenshot as well:


Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]

Vala Panel AppMenu is not perfect though, and I did encounter a few issues in my test:

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.

You may also want to check out the Vala Panel AppMenu issues page on GitHub .

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.

1. Install Vala AppMenu.

Vala AppMenu is available in the WebUpd8 MATE and Xfce PPA.

For Ubuntu MATE, the plugin is only available for Ubuntu 16.10 , because it requires MATE Panel built with GTK3, and that is only the case for Ubuntu 16.10 and newer.

For Xfce, the Vala AppMenu plugin is available for Xubuntu 16.10 and 16.04, as well as Linux Mint Xfce 18.x.

To add the WebUpd8 MATE and Xfce PPA and update the software sources, use the following commands:

sudo add-apt-repository ppa:webupd8team/mate sudo apt update

Then, install the Vala AppMenu plugin / applet:

- for Xfce (Xubuntu 16.10, 16.04 / Linux Mint Xfce 18.x):

sudo apt install xfce4-vala-appmenu-plugin unity-gtk3-module unity-gtk2-module appmenu-qt appmenu-qt5

- for MATE (Ubuntu MATE 16.10):

sudo apt install mate-applet-vala-appmenu unity-gtk3-module unity-gtk2-module appmenu-qt appmenu-qt5

2. Disable the menu from being displayed in application windows (so it's only displayed on the panel; without this, you'll get double menus, in both the panel and application windows).

2.A. for Xfce, simply run the command below:

xfconf-query -c xsettings -p /Gtk/ShellShowsMenubar -n -t bool -s true xfconf-query -c xsettings -p /Gtk/ShellShowsAppmenu -n -t bool -s true 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]": gtk-shell-shows-app-menu=true gtk-shell-shows-menubar=true

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:

mkdir -p ~/.config/gtk-3.0/

Then open ~/.config/gtk-3.0/settings.ini with Pluma text editor:

pluma ~/.config/gtk-3.0/settings.ini If this file has a "[Settings]" section, paste under it the following: gtk-shell-shows-app-menu=true gtk-shell-shows-menubar=true

If the file is empty, paste the following in this file:

[Settings] gtk-shell-shows-app-menu=true gtk-shell-shows-menubar=true

... 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).

4.A. For Xfce , right click the panel on which you want to add Vala AppMenu to, and select Panel > Panel Preferences (I prefer this to directly adding the applet to the panel, because it also allows moving it to the desired position), and on the Items tab, click "+" and add "AppMenu Plugin" to the panel :


Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]

You can move Vala AppMenu to the desired position on the panel via the Items tab from the Xfce4 Panel Preferences.

If you have TopMenu installed, make sure you don't mix the two!

4.B. For MATE , right click the panel, select "Add to panel", then search for "Global Application Menu" and click "Add":


Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]
Unfortunately there's no easy way of moving the applet to the desired pos

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: UbuntuLinuxQtGitGitHubUnityChromeOfficeFirefoxAU
分页:12
转载请注明
本文标题:Alternative Global Menu For MATE And Xfce: Vala Panel AppMenu [PPA]
本站链接:http://www.codesec.net/view/534876.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(85)