Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#65183 - [sway] systemd --user service

Attached to Project: Community Packages
Opened by MMH (mmh) - Friday, 17 January 2020, 02:33 GMT
Last edited by Brett Cornwall (ainola) - Friday, 10 April 2020, 02:14 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Jerome Leclanche (Adys)
Brett Cornwall (ainola)
Maxim Baz (maximbaz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This is a followup of  FS#62012 .

I managed to start sway as a user service (without display manager):
In order to get a 'graphical session' I passed the XDG_SESSION_ID environment variable to sway:
1.) Write the XDG_SESSION_ID variable to a file (e.g. $XDG_RUNTIME_DIR/sway.session)
2.) Include that file in the service file (e.g. EnvironmentFile=%t/sway.session)

I attached the service file and .bash_profile which worked for me.
If there is no interest in adding something like that to the package I could update the wiki.
This task depends upon

Closed by  Brett Cornwall (ainola)
Friday, 10 April 2020, 02:14 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Too custom, and filled to the brim with potential bugs (see https://github.com/swaywm/sway/issues/51 60 and the discussion there). This should be upstream
Comment by Alexander F. Rødseth (xyproto) - Tuesday, 18 February 2020, 10:04 GMT
Re-opened this issue, because the duplicate issue was closed because of "No response", and this issue provides more information.
Comment by Brett Cornwall (ainola) - Monday, 24 February 2020, 04:19 GMT
I'm hesitant to include this. The maintainers of sway don't have an official recommendation but they do seem to start sway directly from the TTY [1]. Sway does already have a community wiki where contributors have documented how to get various components to work with systemd user sessions [2]. I would prefer upstream to carry the service files so that every distro doesn't have to implement it themselves.

Including unit files for sway would certainly create an expectation to create unit files for other components (like waybar, etc.), too... it looks to open a can of worms.

Ultimately, the problem that this ticket would be solving would be to allow automatic launching of sway when logging in. I don't think that the needs justify the means IMO. Feedback welcome. :)

[1] https://github.com/swaywm/sway/issues/3105#issuecomment-437650315
[2] https://github.com/swaywm/sway/wiki/Systemd-integration
Comment by Maxim Baz (maximbaz) - Monday, 06 April 2020, 08:09 GMT
I agree with Brett, would prefer upstream to provide the service file. There is an upstream ticket that tracks this: https://github.com/swaywm/sway/issues/5160

Loading...