我正在编辑 .desktop 文件微软边缘,原来图标文件的作用是:
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
Exec=/usr/bin/microsoft-edge-stable %U
StartupNotify=true
Terminal=false
Icon=microsoft-edge
Type=Application
Categories=Network;WebBrowser;
在添加环境变量后执行官该程序将无法启动。
Comment[vi]=Truy cập Internet
Comment[zh_CN]=访问互联网
Comment[zh_HK]=連線到網際網路
Comment[zh_TW]=連線到網際網路
# Exec=/usr/bin/microsoft-edge-stable %U
Exec=env GTK_IM_MODULE=xim /usr/bin/microsoft-edge-stable %U
StartupNotify=true
Terminal=false
Icon=microsoft-edge
Type=Application
Categories=Network;WebBrowser;
有人知道如何纠正这个问题吗?(GTK_IM_模块用于 ibus)
答案1
microsoft-edge 和 brave 的可执行文件是 bash 脚本,我导出了GTK_IM_模块和修改器在脚本 /usr/bin/microsoft-edge-stable 中并修复了该问题。
#!/bin/bash
#
# Copyright 2011 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#ibus
export GTK_IM_MODULE=xim #Fix for Chrome and Brave, when I start either of them from command lines
export XMODIFIERS=@im=ibus
# Let the wrapped binary know that it has been run through the wrapper.
export CHROME_WRAPPER="`readlink -f "$0"`"