Telegram Desktop does not recognize IBus switch between Japanese and English input #2013

Open
jairusan opened this Issue May 11, 2016 · 14 comments

Comments

Projects
None yet
6 participants

Steps to reproduce

  1. Log in to the native app in Ubuntu 16.04 64bit
  2. Press CTRL+Spacebar the IBus program switch the language on the system to Japanese from default English.
  3. Type on the window a message to one of the contacts, but Telegram does not recognize the switch and just type in English.

Expected behaviour

Tell us what should happen: The native Telegram app for Linux desktop should recognize the IBus switch from English to Japanese and allow typing in Japanese like on the other IM clients like Line, Hangouts, Facebook Messenger.

Actual behaviour

Tell us what happens instead: It is no recognizing the switch between En/JP in the desktop Ubuntu 16.04 64bit

Configuration

Operating system:
jair@x1:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"

Version of Telegram Desktop:
Telegram Desktop 0.9.48 alpha

Logs

Insert logs here (if necessary)

You can type "debugmode" in settings and then see ~/.TelegramDesktop/DebugLogs/log_...txt for log files.
Type "debugmode" in settings again to disable logs.

Try starting the app like this:

QT_IM_MODULE=ibus /<path_to_executable>/Telegram/Telegram

Ref: issue #1348

Hello bit-pirate,

I ran it but got this:

Telegram/ Templates/

jair@W510 ~ $ sudo QT_IM_MODULE=ibus /home/jair/Telegram/Telegram
[sudo] password for jair:
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number

Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number

(Telegram:25076): libnotify-WARNING **: Failed to connect to proxy
jair@W510 ~ $

Thank you for your time and suggestions.

Sincerely,

You should not need (and should not use) sudo to run Telegram. For me on Kubuntu 14.04 Telegram runs fine with and without sudo. However, I only get that warning (Failed to connect to proxy), when using sudo.

ありがとうございます!

bit-pirate,

You were right, worked perfectly, the only concern I have is do i need to run Telegram always from the CLI and with the manual command:

jair@x1:~$ QT_IM_MODULE=ibus /home/jair/Telegram/Telegram
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number

At least works in the native application for Linux. But if there is somewhere a setting where I can make that permanent will be excellent. Thank you in advance for the finding ^^

よろしくお願いします、

Collaborator

stek29 commented Oct 25, 2016

You can edit command in .desktop file

Like @stek29 I created a desktop file/link/icon.

Telegram.desktop

[Desktop Entry]
Comment[en_US]=
Comment=
Exec=QT_IM_MODULE=ibus /home/someone/Downloads/Telegram/Telegram
GenericName[en_US]=
GenericName=
Icon=/home/someone/Pictures/icons_and_logos/telegram_td_logo.png
MimeType=
Name[en_US]=Telegram
Name=Telegram
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

Hello bit-pirate,

Thank you again for battling with me and this bug. This is what I have in Ubuntu 16.04:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Telegram Desktop
Comment=Official desktop version of Telegram messaging app
Exec=/home/jair/Telegram/Telegram -- %u
Icon=telegram
Terminal=false
StartupWMClass=Telegram
Type=Application
Categories=Network;
MimeType=x-scheme-handler/tg;
X-Desktop-File-Install-Version=0.22
Name[en_US]=Telegram

If I add the line: QT_IM_MODULE=ibus /home/jair/Telegram/Telegram -- %u

Telegram does not run/start.

Perhaps there is a different syntax?

I will also keep testing and researching.

Sincerely,

Try replacing

Exec=/home/jair/Telegram/Telegram -- %u

with

Exec=QT_IM_MODULE=ibus /home/jair/Telegram/Telegram

BTW what is the -- %u for?

Owner

john-preston commented Oct 31, 2016

@bit-pirate For handling telegram.me links, as I remember.

jairusan commented Oct 31, 2016

Is there a possibility that the team will fix this bug going forward in the next version update?

The format: Exec=/home/jair/Telegram/Telegram -- %u is how ubuntu 16.04 make the desktop icons.

NOTE: Again the issue is just on the Ubuntu 16.04 no even in older versions of Debian or Mint I have this issue.

Thank you!

Collaborator

stek29 commented Nov 7, 2016

@bit-pirate @john-preston It's for link handling indeed -- according to FreeDesktop specification %u is replaced by URL when file or link are opened via the app. And TDesktop handles protocol tg://, to which telegram.me links are redirected.

And -- marks end of options..

@jairusan did you manage to solve your problem by adjusting the shortcut settings as proposed?

lne1030 commented Jan 5, 2017

According to https://wiki.archlinux.org/index.php/Desktop_entries#Modify_environment_variables

Exec=env QT_IM_MODULE=ibus /opt/Telegram/Telegram -- %u

has better compatibility.

jamal919 commented Nov 7, 2017

The way suggested by @lne1030 worked for me on CentOS 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment