Score:0

Adding an enviromental variable in .desktop icon fails the desktop icon

cn flag

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)

qiz_newbie avatar
ru flag
The first line of .desktop is "[Desktop Entry]", you did not add it ?
Yerong Li avatar
cn flag
The executable for microsoft edge is a bash-script, I export in that script directly to fix it.
Yerong Li avatar
cn flag
I am editing the microsoft-edge.desktop, that header is originally there.
qiz_newbie avatar
ru flag
Oh maybe i know the reason,try "gtk-launch microsoft-edge" to start edge from command line , it will use microsoft-edge.desktop instead of "/usr/bin/microsoft-edge"
Score:0
cn flag

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"`"
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.