flathub/com.viber.Viber

How to run viber (flatpak) in wayland?

nazar2sfive opened this issue · 20 comments

android@inspi:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Neon
Description:    KDE neon Unstable Edition
Release:        20.04
Codename:       focal
android@inspi:~$ echo $XDG_SESSION_TYPE
wayland
android@inspi:~$ flatpak run com.viber.Viber 
QStandardPaths: wrong permissions on runtime directory /run/user/1000, 7755 instead of 7700
qt.qpa.wayland: Failed to load client buffer integration: "wayland-egl"
qt.qpa.wayland: Available client buffer integrations: ()
sh: line 1: xdg-mime: command not found
android@inspi:~$ QT_QPA_PLATFORM=xcb flatpak run com.viber.Viber 
QStandardPaths: wrong permissions on runtime directory /run/user/1000, 7755 instead of 7700
sh: line 1: xdg-mime: command not found

Managed to run it on Arch in the following way:

sudo pacman -S flatpak-xdg-utils (or sudo apt-get install flatpak-xdg-utils in your case I guess)

This will get you going, but without tray icon and it won't run from the menu. So:

flatpak --user override org.viber.Viber --env=QT_QPA_PLATFORM=xcb --own-name=org.kde.StatusNotifierItem-2-2

The --user thing is how I've installed it, tune the line according to your needs.
Hope this helps a bit.

Same issue. Nvidia wayland. Run as black window.

$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	Fedora
Description:	Fedora release 34 (Thirty Four)
Release:	34
Codename:	ThirtyFour
$ echo $XDG_SESSION_TYPE
wayland
$ flatpak run com.viber.Viber
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QStandardPaths: wrong permissions on runtime directory /run/user/1000, 7755 instead of 7700
QStandardPaths: wrong permissions on runtime directory /run/user/1000, 7755 instead of 7700
Qt: Session management error: None of the authentication protocols specified are supported
sh: строка 1: xdg-mime: команда не найдена
[2:15:0909/201916.019720:ERROR:address_tracker_linux.cc(171)] Could not bind NETLINK socket: Адрес уже используется (98)
android@pc:~$ QT_QPA_PLATFORM=xcb viber

Command 'viber' not found, did you mean:

  command 'biber' from deb biber (2.14-1)

Try: sudo apt install <deb name>

android@pc:~$ flatpak list
Name                                         Application ID                            Version      Branch     Installation
Pinta                                        com.github.PintaProject.Pinta             1.7          stable     system
Viber                                        com.viber.Viber                           11.9         stable     system
Fedora Media Writer                          org.fedoraproject.MediaWriter             4.2.2        stable     system
Freedesktop Platform                         org.freedesktop.Platform                  20.08.16     20.08      system
Freedesktop Platform                         org.freedesktop.Platform                  21.08.4      21.08      system
Mesa                                         org.freedesktop.Platform.GL.default       21.1.8       20.08      system
Mesa                                         org.freedesktop.Platform.GL.default       21.2.2       21.08      system
Intel                                        org.freedesktop.Platform.VAAPI.Intel                   20.08      system
Intel                                        org.freedesktop.Platform.VAAPI.Intel                   21.08      system
ffmpeg-full                                  org.freedesktop.Platform.ffmpeg-full                   21.08      system
openh264                                     org.freedesktop.Platform.openh264         2.1.0        2.0        system
GNOME Application Platform version 3.38      org.gnome.Platform                                     3.38       system
Breeze GTK theme                             org.gtk.Gtk3theme.Breeze                               3.22       system
KDE Application Platform                     org.kde.Platform                                       5.15       system
Telegram Desktop                             org.telegram.desktop                      3.2.5        stable     system
WebKitGTK                                    org.telegram.desktop.webview                           stable     system
android@pc:~$ flatpak --user override org.viber.Viber --env=QT_QPA_PLATFORM=xcb --own-name=org.kde.StatusNotifierItem-2-2
android@pc:~$ flatpak run com.viber.Viber
sh: line 1: xdg-mime: command not found
android@pc:~$ sudo apt-get install xdg-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
xdg-utils is already the newest version (1.1.3-2ubuntu1.20.04.2).
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following package was automatically installed and is no longer required:
  squashfs-tools
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
android@pc:~$ 

In my opinion this issue shoud focus on adding at least a patch for XWayland compatibility.

Do you guys still face the issue with latest updates? nothing fixed specifically for xwayland compatibility but update to freedesktop.Platform 21.08 might make a difference.

yes.. i'm here for ubuntu 22.04. I thought this would be fixed by now. The deb works from viber site, but need to install an older outdated deb for internet to be seen.
I thought this would work, but I guess it does not work and neither does the kde fix for ubuntu.
I will go with the deb on the official viber website (I advise you not to use others).
The snap version is made by: who knows? quite a lot of resources to get a broken flatpak installed.

Hi.. I can confirm that the AppImage on the website which used to not work, now works.
The trick with the deb and installing an outdated ssh deb is not possible for download either.

The AppImage works out of the box... I'm also thinking of doing an appimage for my own flutter app.

I had some emailing with the support. They told me that there are no plans for Wayland support :/

Still, what causes it to not launch via XWayland?

Is this issue still not resolved or have any workaround? I`m getting transparent Viber window when try launch it.

[mykyta@fedora ~]$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 36 (Thirty Six)
Release: 36
Codename: ThirtySix
[mykyta@fedora ~]$ flatpak list
Назва Ід. програми Версія Гілка Встановлення
Viber com.viber.Viber 16.1.0.37 stable system
Freedesktop Platform org.freedesktop.Platform 21.08.14 21.08 system
Mesa org.freedesktop.Platform.GL.default 21.3.8 21.08 system
nvidia-510-68-02 org.freedesktop.Platform.GL.nvidia-510-68-02 1.4 system
nvidia-515-57 org.freedesktop.Platform.GL.nvidia-515-57 1.4 system
openh264 org.freedesktop.Platform.openh264 2.1.0 2.0 system
Adwaita theme org.kde.KStyle.Adwaita 5.15-21.08 system
KDE Application Platform org.kde.Platform 5.15-21.08 system
QGnomePlatform org.kde.PlatformTheme.QGnomePlatform 5.15-21.08 system
QtSNI org.kde.PlatformTheme.QtSNI 5.15-21.08 system
QGnomePlatform-decoration org.kde.WaylandDecoration.QGnomePlatform-decoration 5.15-21.08 system
Zoom us.zoom.Zoom 5.11.1.3595 stable system
[mykyta@fedora ~]$ flatpak run com.viber.Viber
sh: рядок 1: xdg-mime: command not found
^C
[mykyta@fedora ~]$

@phobos-nik No, it is not. Maybe you could email Viber support as well. If they see there is an actual need for it they might pull some resources for development.

Latest version (18.2.0.2) runs on Wayland naively. Too bad it's quite buggy otherwise.

Latest version (18.2.0.2) runs on Wayland naively. Too bad it's quite buggy otherwise.

Did you mean natively?

So, after nearly half-year long conversation with Viber support team using email they noticed me that they does not support any other window system except X11. Seems like Viber running successfully on some configs is the matter of luck

"--socket=x11",

This is wrong. Should be fallback-x11 when wayland is used

"--socket=x11",

This is wrong. Should be fallback-x11 when wayland is used

Would you please provide PR fixing that ?

Would you please provide PR fixing that ?

Sorry, not really using Wayland

"--socket=x11",

This is wrong. Should be fallback-x11 when wayland is used

Would you please provide PR fixing that ?

Does setting this in for instance Flatseal, while unsetting --socket=x11 fix the application on wayland for you?

Does setting this in for instance Flatseal, while unsetting --socket=x11 fix the application on wayland for you?

Don't know, switched to *.deb

I was asking @akurtakov specifically.

These are my results:
image
image
Both seem to work fine (I have not tested further functionality).
@faveoled is indeed correct, that x11 should be specified as fallback in the sockets if we want to be correct.
You can see that the Viber application does launch on Wayland, the red cursor is an indicator (Extramaus), that it is not using XWayland.
The theming is not correct at least on GNOME in this case. When forcing it to run through XWayland, the theming is correct.
If the project uses Electron (probably), they must have updated it in the meantime. Electron actually has full Wayland support, but only in newer versions.
@nazar2sfive @TingPing with this in mind, maybe do change the socket to fallback-x11 instead of x11? It would be more correct. Otherwise I think the issue can be closed as it is fixed.