Public bug reported:

/usr/share/wayland-sessions/sway.desktop executes sway directly, not via
a login shell, so /etc/profile is not sourced. Additionally, when the
user opens a terminal (by default via x-terminal-emulator), this is not
a login shell, so the user's ~/.profile is not sourced either. This is
unexpected behaviour.

There was an extensive discussion on this subject for gnome wayland
sessions [1] resolved by (amongst other things) adding logic to /usr/bin
/gnome-session [2].

For my own personal use, I have created a /usr/bin/sway-session script
that I launch from my own .desktop file in /usr/share/wayland-sessions:

#!/bin/sh
. /etc/profile
test -r ~/.profile && . ~/.profile
exec sway

Ubuntu 20.04.2 LTS
sway 1.4-2

[1] https://bugzilla.gnome.org/show_bug.cgi?id=736660
[2] https://bug736660.bugzilla-attachments.gnome.org/attachment.cgi?id=343441

** Affects: sway (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1924653

Title:
  sway session does not source /etc/profile or ~/.profile

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sway/+bug/1924653/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to