Giter VIP home page Giter VIP logo

sway-services's People

Contributors

b0o avatar boredland avatar jtheoof avatar kemurphy avatar markstos avatar xdbob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sway-services's Issues

/etc/profile sourced twice when run from shell

When executing sway-user-service from a shell, /etc/profile has already been sourced and does not need to be sourced again. Although this has limited impact on functionality, it does cause annoyances such as duplicate entries in $PATH.

Consider updating `10-service.conf` to call `dbus-update-activation-environment`

As seen in swaywm/sway#5777 there can be problems launching Flatpaks under Sway due to the dbus environment.

To address this, the Arch Linux package for sway ships /etc/sway/config.d/50-systemd-user.conf.

To compare, here's the version shipped by this project:

Current version

# Import variables set-up by sway into the environment and notify systemd that
# sway is ready.
exec systemctl --user import-environment SWAYSOCK \
					 DISPLAY \
					 I3SOCK \
					 WAYLAND_DISPLAY \
					 XCURSOR_SIZE \
					 XCURSOR_THEME \
  && systemd-notify --ready

Arch Linux package version:

#  sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment
# See FS#63021
# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal.

exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
     dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK

If someone using this project has trouble with Flatpaks, try merging in the approach used by Arch and see it if helps.

`podman stop` kills sway

A manjaro-sway user reported a really strange issue: when stopping a container using podman stop, sway is being killed. I didn't have a deeper look yet, but could reproduce it quite easily.

Environment cleanup

graphical session leaves a lot of env variables, they should be cleaned-up at exit (it can make sway fail to restart)

`sway-contrib` conflicts with `sway-session.target`

It seems that months ago, someone added sway-session.target to sway-contrib.

I tried to install sway-contrib package but it fails because the file already exist and was installed by this package.

pacman -S sway-contrib 

error: failed to commit transaction (conflicting files)
sway-contrib: /usr/lib/systemd/user/sway-session.target exists in filesystem (owned by sway-services-git)
Errors occurred, no packages were upgraded.

I might suggest adapting the .target unit here because it seems to be a custom solution, but I have not fully developed this idea.

In the meantime, is there any workaround?

Thank you for the effort maintaining the package.

Upstream `mako.service` does **not** work with current state

Due to the current design services units need After=wayland-session.target in order to avoid racing sway initialization and environment importation...

Current workaround:

$ cat ~/.config/systemd/user/mako.service.d/override.conf
[Unit]
After=wayland-session.target

See #12

wish: gnome-keyring example

I tried to get gnome-keyring as a systemd service with Sway and could not. I believe it was due to making sure that gnome-keyring got launched early and got the environment variable it produces properly exported to other apps.

Eventually I got gnome-keyring working with Ly, but not as a systemd service:

fairyglade/ly#228 (comment)

Shipping a working gnome-keyring intetegration for Sway using systemd would be a helpful reference for how to do it properly.

Replace wayland-session.target with ConditionEnvironment=wayland

It was proposed that systemd provide a standardized "wayland-session.target".

systemd/systemd#15180

Instead, the approach implemented was a more general solution of adding ConditionEnvironment= to test environment variables. This was released in systemd v246 which in use now on at least Arch Linux.

Given that, we could adopt the the approach by no longer shipping or referencing a wayland-session.target.

Instead, rely on the standardized graphical-session.target and use ConditionEnvironment=WAYLAND_DISPLAY for services that should only launch under Wayland.

This approach would avoid conflicts with other projects that might otherwise ship a "wayland-session.target" for the same reason this project did.

Rework services and dependencies

systemd should not be viewed as a dependency manager but as an event manager (ie: sway should up the *.target witch should not be automatically pulled via dependency).

Also wayland-session*.target will not happen, I should use Condition*=

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.