elogind is the part of SystemD logind that can run as standalone. So we need it to run Sway without SystemD. To do that we need to build wlroots
with elogind
option. Then we can install and use Sway as normal from the current repo. There are other ways to achieve this without elogind here. But I tried with the elogind option and I was successful.
UPDATE: I tried again on a fresh install. The elogind
option is set by default on the repo version. So you can skip the xbps-src command below and continue. wlroots
should install as a dependency of sway
if you follow the later commands.
git clone git://github.com/void-linux/void-packages.git
cd void-packages
./xbps-src binary-bootstrap
./xbps-src pkg wlroots -o elogind
sudo xbps-install --repository=hostdir/binpkgs wlroots
Install things necessary and enable dbus also:
sudo xbps-install elogind sway dmenu rxvt-unicode sakura
sudo ln -s /etc/sv/dbus /var/services/
rxvt-unicode
and sakura
are optional. Sakura is Wayland supported, so it is good to have it handy.
You may also want to install swaylock
and swayidle
if you need.
Let's create the config directory for Sway:
mkdir -p ~/.config/sway/
Now copy your i3config to ~/.config/sway/
or if you want to use the template config from Sway:
cp /etc/sway/config ~/.config/sway/config
Now edit ~/.config/sway/config
if necessary.
If you want to launch Sway directly after booting:
Run nano ~/.bashrc
and add:
# If running from tty1, start sway
if [ "$(tty)" = "/dev/tty1" ]; then
exec sway
fi
If it says that XDG_RUNTIME_DIR
is not found, then this to fix it:
mkdir -p /tmp/swaytmp
export XDG_RUNTIME_DIR=/tmp/swaytmp
To kill the Sway session, $mod+Shift+e. $mod is the Super or Windows key by default if you didn't change it on config.
Ref:
I just purchased an Intel Arc A750 and struggling to get the graphics card working within (Void, or any distribution of) Linux for the past month, while the graphics/video card worked with Windows 10 without problems. Happened to find a recent Internet post stating somebody else could not get their Intel A750/A770 working with either Xorg or Gnome Wayland, however using Sway the video/graphics card finally worked. And low and behold, same here, this Intel A750 is coming alive with using Sway, Void Linux kernel 6.0.7_1 version, i915.force_probe Linux cmdline option, and just the older default installed dg2_dmc 2022.10.22 linux-firmware!
I also had a problem with no graphical mouse pointer or invisible mouse pointer:
$ export WLR_NO_HARDWARE_CURSORS=1 && sway --verbose
Already mentioned, if the DISPLAY variable is initialized, for example within $HOME/.bashrc or $HOME/.bash_profile file, ensure $DISPLAY variable is not set!
$ unset DISPLAY
Good work!
Now my only wish, besides all of my prior wishes including wishing to get this Intel A750 card working, is that SWAY would act more like DWM! Guess I'm going to be doing a lot of work with sway's config file.