#Discord screensharing on wayland (swaywm)

70 messages · Page 1 of 1 (latest)

dreamy holly
#

I'VE READ THE WIKI PAGE.

After trying various methods at screensharing, I've installed vesktop. when running vesktop in a terminal window I am given these errors when I click the screensharing button:

[3:0324/200127.801067:ERROR:screen_capture_portal_interface.cc(48)] Failed to request session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop
[3:0324/200127.801086:ERROR:base_capturer_pipewire.cc(81)] ScreenCastPortal failed: 3
Error during screenshare picker Failed to get sources.
(node:3) UnhandledPromiseRejectionWarning: TypeError: Video was requested, but no video stream was provided
    at AsyncFunction.<anonymous> (VCDMain:40:2158)
(node:3) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 40)```
knotty needle
#

**Web based screen sharing does not work also

dreamy holly
#

yeah

marsh crown
#

@dreamy holly have you enabled Wayland support for Vesktop?

dreamy holly
#

also other important notes:
xdg-desktop-portal and xdg-desktop-portal-wlr are installed

PipeWire is installed

systemctl --user show-environment returns the following:

LANG=en_US.UTF-8
LOGNAME=john
MAIL=/var/spool/mail/john
PATH=/usr/local/bin:/usr/bin
SHELL=/usr/bin/bash
USER=john
XDG_DATA_DIRS=/home/john/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/shar>
XDG_RUNTIME_DIR=/run/user/1000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DISPLAY=:0
SWAYSOCK=/run/user/1000/sway-ipc.1000.719.sock
WAYLAND_DISPLAY=wayland-1
XDG_CURRENT_DESKTOP=sway```
marsh crown
#

@dreamy holly Install xeyes and run it. Then move your mouse inside vesktop and check if the eyes move?

dreamy holly
#

the eyes dont move anywhere unless im in the xeyes window

marsh crown
#

okay so you are running it under wayland then

dreamy holly
#

yes

#

i know im running wayland

#

sway is wayland

marsh crown
#

no

#

I mean

#

by default, Vesktop runs under XWayland

#

you'd have to set your electron flags to specifically use Wayland, or pass the arguments to Vesktop

#

in the .desktop file

#

this is what I had to do on Wayfire:

dreamy holly
#

wlp

marsh crown
#

also, do you have pipewire installed?

#

also, what are the values of these env variables XDG_CURRENT_DESKTOP and WAYLAND_DISPLAY

dreamy holly
marsh crown
#

yep so your XDG_CURRENT_DESKTOP isn't set

dreamy holly
#

isnt it?

#

its set to sway

marsh crown
#

oh nvm I'm blind lol

dreamy holly
#

lol

#

i have not done anything with ozone

#

could that be something i should try

marsh crown
#

worth a shot

dreamy holly
marsh crown
#

and wireplumber?

dreamy holly
#

yes

marsh crown
#

also check systemctl --user status xdg-desktop-portal

dreamy holly
# marsh crown also check `systemctl --user status xdg-desktop-portal`
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Sun 2024-03-24 17:07:04 PDT; 3h 18min ago
   Main PID: 773 (xdg-desktop-por)
      Tasks: 6 (limit: 38402)
     Memory: 4.1M (peak: 5.4M)
        CPU: 240ms
     CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/xdg-desktop-portal.service
             └─773 /usr/lib/xdg-desktop-portal

Mar 24 17:07:04 ArchDesktop systemd[651]: Starting Portal service...
Mar 24 17:07:04 ArchDesktop xdg-desktop-por[773]: No skeleton to export
Mar 24 17:07:04 ArchDesktop systemd[651]: Started Portal service.
Mar 24 18:55:12 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 251
Mar 24 18:55:15 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 256
Mar 24 18:55:16 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 261
Mar 24 18:55:16 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 266
Mar 24 18:55:17 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 271```
#

would this error not be the most important?
ERROR:screen_capture_portal_interface.cc(48)] Failed to request session: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.ScreenCast” on object at path /org/freedesktop/portal/desktop

marsh crown
#

how about systemctl --user status xdg-desktop-portal-wlr

#

Also that previous log for -portal is weird, compared to mine which has these lines at the end:

Mar 25 10:22:58 dex-um780 xdg-desktop-por[1351]: Choosing wlr.portal for org.freedesktop.impl.portal.ScreenCast via the deprecated UseIn key
Mar 25 10:22:58 dex-um780 systemd[1182]: Started Portal service.
dreamy holly
#

FOUND AN ERROR 🎉 🎉 🎉

marsh crown
#

ok

#

so stop your xdg-desktop-portal service

#

and then user start the -wlr service

#

then user start the -portal service

#

and check the systemctl status

dreamy holly
#

so just

#

systemctl stop xdg-desktop-portal
systemctl start xdg-desktop-portal-wlr
systemctl start xdg-desktop-portal

marsh crown
#
systemctl --user start xdg-desktop-portal-wlr
systemctl --user start xdg-desktop-portal
dreamy holly
#

now just

#

reboot my system?

marsh crown
#

then check systemctl --user status xdg-desktop-portal.service

dreamy holly
#

for good luck

marsh crown
#

nah don't reboot

dreamy holly
#
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Sun 2024-03-24 17:07:04 PDT; 3h 29min ago
   Main PID: 773 (xdg-desktop-por)
      Tasks: 7 (limit: 38402)
     Memory: 4.1M (peak: 5.4M)
        CPU: 264ms
     CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/xdg-desktop-portal.service
             └─773 /usr/lib/xdg-desktop-portal

Mar 24 17:07:04 ArchDesktop systemd[651]: Starting Portal service...
Mar 24 17:07:04 ArchDesktop xdg-desktop-por[773]: No skeleton to export
Mar 24 17:07:04 ArchDesktop systemd[651]: Started Portal service.
Mar 24 18:55:12 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 251
Mar 24 18:55:15 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 256
Mar 24 18:55:16 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 261
Mar 24 18:55:16 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 266
Mar 24 18:55:17 ArchDesktop xdg-desktop-por[773]: Realtime error: Could not map tid: Process ids could not be found: 271```
marsh crown
marsh crown
#

did you stop them first?

dreamy holly
#

oop

marsh crown
#
systemctl --user stop xdg-desktop-portal-wlr
systemctl --user stop xdg-desktop-portal
dreamy holly
#
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal-wlr.service; static)
     Active: active (running) since Sun 2024-03-24 20:38:54 PDT; 26s ago
   Main PID: 18261 (xdg-desktop-por)
      Tasks: 8 (limit: 38402)
     Memory: 7.1M (peak: 8.4M)
        CPU: 25ms
     CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/xdg-desktop-portal-wlr.service
             └─18261 /usr/lib/xdg-desktop-portal-wlr

Mar 24 20:38:54 ArchDesktop systemd[651]: Starting Portal service (wlroots implementation)...
Mar 24 20:38:54 ArchDesktop systemd[651]: Started Portal service (wlroots implementation).```
#

🥳

marsh crown
#

also check systemctl --user status xdg-desktop-portal.service

dreamy holly
#
     Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal.service; static)
     Active: active (running) since Sun 2024-03-24 20:39:01 PDT; 1min 12s ago
   Main PID: 18270 (xdg-desktop-por)
      Tasks: 5 (limit: 38402)
     Memory: 2.6M (peak: 3.7M)
        CPU: 20ms
     CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/xdg-desktop-portal.service
             └─18270 /usr/lib/xdg-desktop-portal

Mar 24 20:39:01 ArchDesktop systemd[651]: Starting Portal service...
Mar 24 20:39:01 ArchDesktop xdg-desktop-por[18270]: No skeleton to export
Mar 24 20:39:01 ArchDesktop systemd[651]: Started Portal service.```
#

still No skeleton to export

#

FUCK IT

#

MY STREAMING WORKS

#

🥳 🥳 🥳 🥳 🥳 🥳 🥳

marsh crown
#

nice 🙂