You are not logged in.

#1 2020-09-11 10:59:34

duyinthee
Member
Registered: 2015-06-14
Posts: 222
Website

setting wayland for Firefox

I am using Arch + sway. I start sway by just typing "sway" in Linux Console. No display manager is in use.

Now I am trying to set MOZ_ENABLE_WAYLAND=1 for Firefox.
I have tried setting it in ~/.xprofile as

export MOZ_ENABLE_WAYLAND=1

, does not work.

And I have tried setting it in ~/.config/environment.d/envvars.conf as

MOZ_ENABLE_WAYLAND=1

, does not work.

And I also have tried setting it in ~/.local/share/applications/firefox.desktop as

Exec=env MOZ_ENABLE_WAYLAND=1 firefox

, does not work.

I can only get it works by typing

$ MOZ_ENABLE_WAYLAND=1 firefox

in terminal.

I can not figure out what is missing.
I think, the problem is setting graphical environment variable in sway which is started from consule (under Wayland).
if anyone has same experience, please kindly advice.

Offline

#2 2020-09-11 11:57:42

demaio
Member
From: Germany
Registered: 2012-09-02
Posts: 101
Website

Re: setting wayland for Firefox

duyinthee wrote:

I have tried setting it in ~/.xprofile as

export MOZ_ENABLE_WAYLAND=1

, does not work.

Well, sway does not use ~/.xprofile

You could export this variable in your shell configuration (for example ~/.bashrc if you are using bash)

Offline

#3 2020-09-11 12:33:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,820

Re: setting wayland for Firefox

Environment variables do not have the inherent concept of "graphical" or not. They are either set when the parent starts the childprocess or they aren't. To that effect both the desktop file adjustment and the .config/environment.d configuration should work just the same. How are you starting firefox if you are not starting it from the terminal? What's your output of

printenv

Offline

#4 2020-09-11 14:44:32

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 459

Re: setting wayland for Firefox

I am using Wayland and I write my environment variables in /etc/environment. It's working for Firefox.

Offline

#5 2020-09-11 14:44:50

duyinthee
Member
Registered: 2015-06-14
Posts: 222
Website

Re: setting wayland for Firefox

My

$ printenv

is

SHELL=/bin/bash
COLORTERM=truecolor
I3SOCK=/run/user/1000/sway-ipc.1000.466.sock
NNN_BMS=d:~/Documents/mshDic;h:~;j:~/Downloads;u:~/Documents
NNN_TRASH=1
XCURSOR_SIZE=24
XDG_SEAT=seat0
PWD=/home/msh
LOGNAME=msh
XDG_SESSION_TYPE=tty
BEMENU_BACKEND=wayland
MOTD_SHOWN=pam
HOME=/home/msh
LANG=en_US.UTF-8
SWAYSOCK=/run/user/1000/sway-ipc.1000.466.sock
WAYLAND_DISPLAY=wayland-0
INVOCATION_ID=3592827a00084ab8ae6b77aacb5c419b
QT_QPA_PLATFORM=xcb
XDG_SESSION_CLASS=user
TERM=alacritty
USER=msh
DISPLAY=:0
SHLVL=2
XDG_VTNR=1
XDG_SESSION_ID=1
XDG_RUNTIME_DIR=/run/user/1000
JOURNAL_STREAM=8:22093
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/msh/.mshdir/scripts
ALACRITTY_LOG=/tmp/Alacritty-838.log
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
HG=/usr/bin/hg
MAIL=/var/spool/mail/msh
_=/usr/bin/printenv
MOZ_ENABLE_WAYLAND=1

is not there, although I have set it in ~/.config/environment.d/envvars.conf.

Last edited by duyinthee (2020-09-11 14:46:41)

Offline

#6 2020-09-11 14:56:15

duyinthee
Member
Registered: 2015-06-14
Posts: 222
Website

Re: setting wayland for Firefox

icar wrote:

I am using Wayland and I write my environment variables in /etc/environment. It's working for Firefox.

Right, I now have set the environment in /etc/environment and got it work. Now firefox is running on wayland.
Thanks.
Now, it also shows up in the following

$ printenv
......
.....
MOZ_ENABLE_WAYLAND=1
.....
.....

Thank you all.

Offline

Board footer

Powered by FluxBB