0

I am editing the .desktop file for microsoft edge, originally the icon file works:

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;

While after adding an environmental variable in the Exec the program won't start.

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;

Anyone knows how to correct this? (GTK_IM_MODULE is for ibus)

2017561-1
  • 530

1 Answers1

0

The executables for microsoft-edge and brave are bash scripts,I exported GTK_IM_MODULE and XMODIFIERS in the script /usr/bin/microsoft-edge-stable and fixed the problem.

#!/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"`"
2017561-1
  • 530