You are not logged in.
Hi,
Discord refuses to open any links whatsoever, no prompt, no web browser, no error, everything seems ok, but links just won't open.
I am using bspwm.
As mentioned xdg-utils package is installed.
I made sure that xdg-open works fine and double-checked and set my default web browser with xdg-settings. Also tried another browser, nothing helped.
I tried the arch-electron version of Discord from AUR but no luck there.
I enabled and checked the developer tools console for errors or some hints but again no luck.
Sometimes it works when I run discord from the terminal like this: "strace discord", but it is really strange because like I said only sometimes, I've been starting and quitting discord like a madman, I have no idea what's going on, nothing suspicious in journalctl output.
I do not know what to do anymore, it is extremely annoying.
It used to work just fine for a long time, I'm clueless as to what caused or is still causing this behavior.
Thanks for any suggestions.
Last edited by Filip62 (2022-02-27 13:20:27)
Offline
Try running the following:
xdg-mime default firefox.desktop x-scheme-handler/http
xdg-mime default firefox.desktop x-scheme-handler/httpsAlso there was a similar issue of discord crashing due to absence of a notification daemon.
Offline
Thank you, but it didn't help.
Btw, yeah I also faced the issue of discord crashing/freezing without a notification daemon running but I fixed that a long time ago.
Last edited by Filip62 (2022-02-07 19:01:53)
Offline
I also have this issue.
Links in Discord do open if firefox was already running. If firefox was not running, clicking a link spawns the xdg-open and firefox processes, but doesn't create a firefox window. In this state, it is also impossible to launch firefox at all until both those processes are killed.
This behaviour happens if X was launched via startx, but everything works as expected if I use LightDM instead. So I'm guessing there's something wrong with my session setup with xinit?
$ cat ~/.xinitrc#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.xprofile ] && . ~/.xprofile
export XDG_SESSION_TYPE=x11
export XDG_CURRENT_DESTOP=i3
exec i3Offline
I think we do have the same problem.
I also just use startx, altough Discord was opening links a few months/weeks ago only with startx.
I didn't notice the spawned processes before. But they indeed appear. https://imgur.com/a/FhBi4kD
Offline
Running
sh /usr/bin/xdg-open https://archlinux.org in the terminal works without a problem though.
Last edited by Filip62 (2022-02-25 13:46:17)
Offline
You are right, Discord does indeed open links when I use LightDM.
I am not sure what causes this behavior. I replaced my
.xinitrccontents with the contents of
/etc/lightdm/Xsession(changing the exec line of course), but that did not fix the issue.
Offline
Post your previous xinitrc, try "xinit" instead of "startx" and compare the outputs of "printenv" for the session started w/ xinit and the one started by lightdm - notably $DBUS_SESSION_BUS_ADDRESS
Offline
My previous .xinitrc
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
[ -e $HOME/.profile ] && . $HOME/.profile
exec bspwmXinit did not help, same results.
Xinit env https://termbin.com/2lnj
LightDM env https://termbin.com/zifr
$DBUS_SESSION_BUS_ADDRESS looks the same.
Offline
There're some $PATH differences but they don't look significant enough (double entries, slightly changed order, cargo-crap)
Leaves interesting
+DESKTOP_SESSION=bspwm
+XDG_SESSION_DESKTOP=bspwm
-XDG_SESSION_TYPE=tty
+XDG_SESSION_TYPE=x11
+XAUTHORITY=/home/filip/.Xauthority
+XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0My money is on the first two, I don't think it's the authority location (check "xauth info"), XDG_SEAT_PATH would be weird and XDG_SESSION_TYPE really really dumb.
Try to export the relevant variables to discord (or for DESKTOP_SESSION=bspwm & XDG_SESSION_DESKTOP=bspwm: the session) and see what happens…
Offline
I am sorry, I'm not sure I understand what you mean by:
(or for DESKTOP_SESSION=bspwm & XDG_SESSION_DESKTOP=bspwm: the session)
but I have the same results with this:
env DESKTOP_SESSION=bspwm XDG_SESSION_DESKTOP=bspwm XDG_SESSION_TYPE=x11 XAUTHORITY=/home/filip/.Xauthority XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 discordOffline
Export the two in your xinitrc as we don't know which element of the IPC would test them (if that's the problem)
Offline
So I did this:
Export the two in your xinitrc as we don't know which element of the IPC would test them (if that's the problem)
and the result was same still.
I even tried exporting them before running xinit, and another try was right before I exec bspwm.
Also didn't help.
Offline
Been having the exact same issue for months too now. Any new ideas?
Offline
Unfortunately, no. I've started using LightDM.
Offline
This issue is happening with me too sadly. It's really annoying, but installing a display manager doesn't exactly fix the underlying issue. I would like to use xinit, and I'm not ready to give it up so quickly.
Offline
If firefox was not running, clicking a link spawns the xdg-open and firefox processes, but doesn't create a firefox window. In this state, it is also impossible to launch firefox at all until both those processes are killed.
Running
sh /usr/bin/xdg-open https://archlinux.org
in the terminal works without a problem though.
There's going to be somehting™ relevant in your shell rc (bashrc, zshrc) that you do get from the interactive shell and lightdm (which iirc uses your shell to login) but not xinit.
Replacing the shebang in ~/.xinitrc will NOT help, but you could compare
tr '\0' '\n' < /proc/$(pidof i3)/environWith
printenvin the interactive shell.
Offline
This behaviour has changed a bit, now the firefox window does open, but in an unusable state. Doesn't render contents and doesn't respond to inputs. I was thinking if discord depends on the systemd-logind session type to be something else than "tty"?
loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}')As far as I know, this cannot be changed if startx is used. It is set to "x11" when a display manager is used instead.
Offline
Offline
This behaviour has changed a bit, now the firefox window does open, but in an unusable state. Doesn't render contents and doesn't respond to inputs.
Same problem here.
I have applied the patched mentioned there. Indeed it set my logind session type as "x11" while using startx (as per `loginctl show-session 1`), however the issue persists. So that's probably not the cause.
I don't want to use a display manager just for this issue ![]()
Offline
https://bbs.archlinux.org/viewtopic.php … 3#p2024683
The most common cause of "I use startx and my session is weird" is actually the missing logind integration in your xinitrc.
Offline
https://bbs.archlinux.org/viewtopic.php?id=284906
In that thread they concluded that this was a bug in firefox and will be fixed in version 114. I've fixed it in the meanwhile by redirecting stdout and stderr to a file in my .xinitrc.
[ -f ~/.local/share/xorg/stdout ] && mv ~/.local/share/xorg/stdout ~/.local/share/xorg/stdout.old
[ -f ~/.local/share/xorg/stderr ] && mv ~/.local/share/xorg/stderr ~/.local/share/xorg/stderr.old
exec awesome 1>~/.local/share/xorg/stdout 2>~/.local/share/xorg/stderrOffline