I have installed Sway a Wayland window manager. I have copied the `gnu/store/<hash>-sway-1.5.1/etc/sway/config` to `~/.sway/config`. When I run `sway` or `sudo sway` on virtual terminal 1 it outputs "XDG_RUNTIME_DIR is not set in the environment. Aborting.". `man sway` and `sway --help` does not mention `XDG_RUNTIME_DIR`. An suggestions on how to deal with this error?
March 27, 2021 8:44 PM, "Bone Baboon" <bone.baboon@disroot.org> wrote:
> I have installed Sway a Wayland window manager.
>
> I have copied the `gnu/store/<hash>-sway-1.5.1/etc/sway/config` to
> `~/.sway/config`.
>
> When I run `sway` or `sudo sway` on virtual terminal 1 it outputs
> "XDG_RUNTIME_DIR is not set in the environment. Aborting.". `man sway`
> and `sway --help` does not mention `XDG_RUNTIME_DIR`. An suggestions on
> how to deal with this error?
I run sway on my T400. I think I manually set XDG_RUNTIME_DIR in my
~/.bash_profile. Let me check how I do it...I don't have access to my
T400 at the moment. I'm just responding now, to remind myself to help
you out later. :)
[-- Attachment #1: Type: text/plain, Size: 553 bytes --] On 2021-03-27, Bone Baboon wrote: > I have installed Sway a Wayland window manager. > > I have copied the `gnu/store/<hash>-sway-1.5.1/etc/sway/config` to > `~/.sway/config`. > > When I run `sway` or `sudo sway` on virtual terminal 1 it outputs > "XDG_RUNTIME_DIR is not set in the environment. Aborting.". `man sway` > and `sway --help` does not mention `XDG_RUNTIME_DIR`. An suggestions on > how to deal with this error? Is the elogind service running? I *think* that is what I needed to get sway working from the console... live well, vagrant [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --]
Vagrant Cascadian <vagrant@debian.org> writes: > On 2021-03-27, Bone Baboon wrote: >> I have installed Sway a Wayland window manager. >> >> I have copied the `gnu/store/<hash>-sway-1.5.1/etc/sway/config` to >> `~/.sway/config`. >> >> When I run `sway` or `sudo sway` on virtual terminal 1 it outputs >> "XDG_RUNTIME_DIR is not set in the environment. Aborting.". `man sway` >> and `sway --help` does not mention `XDG_RUNTIME_DIR`. An suggestions on >> how to deal with this error? > > Is the elogind service running? I *think* that is what I needed to get > sway working from the console... That seems to be the trick. My .bash_profile is here: #+BEGIN_SRC sh # Honor per-interactive-shell startup file if [ -f ~/.bashrc ]; then . ~/.bashrc; fi # shepherd if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then export MOZ_ENABLE_WAYLAND=1 export GUIX_PACKAGE_PATH=/home/joshua/prog/gnu/guix/guix-packages/ XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/home/joshua/.local/share/flatpak/exports/share:$XDG_DATA_DIRS # this may fix a bug that I have with termite confusing backspace as space in guix environment # export TERM=linux shepherd -c /home/joshua/.config/shepherd/init.scm & exec dbus-run-session sway fi #+END_SRC > > live well, > vagrant > -- Joshua Branson (joshuaBPMan in #guix) Sent from Emacs and Gnus https://gnucode.me https://video.hardlimit.com/accounts/joshua_branson/video-channels https://propernaming.org "You can have whatever you want, as long as you help enough other people get what they want." - Zig Ziglar
Joshua Branson <jbranso@dismail.de> writes: I also just realized that sway started for me when I changed %base-services to %desktop-services. -- Joshua Branson (joshuaBPMan in #guix) Sent from Emacs and Gnus https://gnucode.me https://video.hardlimit.com/accounts/joshua_branson/video-channels https://propernaming.org "You can have whatever you want, as long as you help enough other people get what they want." - Zig Ziglar
Vagrant Cascadian writes:
> Is the elogind service running? I *think* that is what I needed to get
> sway working from the console...
I have added the `elogind` service. Here is the services section of my
systems configuration:
```
(services
(append
(list
(service elogind-service-type)
(service accountsservice-service-type)
(service inputattach-service-type)
x11-socket-directory-service
polkit-wheel-service)
%base-services))
```
When I run `sudo herd status` the output shows that `elogind` is
started.
When I run `sway` on virtual terminal 1 sway does not start and I get
this output:
```
localhost dbus-daemon[380]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1000 pid=26112 comm="sway ") interface="org.freedesktop.login1.Session" member="SetType" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=381 comm="/gnu/store/jdk3r1gs4d36n3aj9fscsvwwc9prnrzp-elogin")
[backend/backend.c:303] Failed to open any DRM device
[sway/server.c:49] Unable to create backend
```
When I run `sudo sway` it outputs "XDG_RUNTIME_DIR is not set in the
environment. Aborting.".
Joshua Branson writes:
> My .bash_profile is here:
>
> #+BEGIN_SRC sh
> # Honor per-interactive-shell startup file
> if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
>
> # shepherd
>
> if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
> export MOZ_ENABLE_WAYLAND=1
> export GUIX_PACKAGE_PATH=/home/joshua/prog/gnu/guix/guix-packages/
> XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/home/joshua/.local/share/flatpak/exports/share:$XDG_DATA_DIRS
> # this may fix a bug that I have with termite confusing backspace as space in guix environment
> # export TERM=linux
> shepherd -c /home/joshua/.config/shepherd/init.scm &
> exec dbus-run-session sway
> fi
> #+END_SRC
What package includes `dbus-run-session`? I do not have it installed on
my system?
Bone Baboon <bone.baboon@disroot.org> writes: > Vagrant Cascadian writes: > >> Is the elogind service running? I *think* that is what I needed to get >> sway working from the console... > > I have added the `elogind` service. Here is the services section of my > systems configuration: > > ``` > (services > (append > (list > (service elogind-service-type) > (service accountsservice-service-type) > (service inputattach-service-type) > x11-socket-directory-service > polkit-wheel-service) > %base-services)) > ``` Change %base-services to %desktop-services. That will probably fix it for you. > > When I run `sudo herd status` the output shows that `elogind` is > started. > > When I run `sway` on virtual terminal 1 sway does not start and I get > this output: > > ``` > localhost dbus-daemon[380]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1000 pid=26112 comm="sway ") interface="org.freedesktop.login1.Session" member="SetType" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=381 comm="/gnu/store/jdk3r1gs4d36n3aj9fscsvwwc9prnrzp-elogin") > [backend/backend.c:303] Failed to open any DRM device > [sway/server.c:49] Unable to create backend > ``` > > When I run `sudo sway` it outputs "XDG_RUNTIME_DIR is not set in the > environment. Aborting.". > -- Joshua Branson (joshuaBPMan in #guix) Sent from Emacs and Gnus https://gnucode.me https://video.hardlimit.com/accounts/joshua_branson/video-channels https://propernaming.org "You can have whatever you want, as long as you help enough other people get what they want." - Zig Ziglar
Bone Baboon <bone.baboon@disroot.org> writes: > Joshua Branson writes: >> My .bash_profile is here: >> >> #+BEGIN_SRC sh >> # Honor per-interactive-shell startup file >> if [ -f ~/.bashrc ]; then . ~/.bashrc; fi >> >> # shepherd >> >> if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then >> export MOZ_ENABLE_WAYLAND=1 >> export GUIX_PACKAGE_PATH=/home/joshua/prog/gnu/guix/guix-packages/ >> XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/home/joshua/.local/share/flatpak/exports/share:$XDG_DATA_DIRS >> # this may fix a bug that I have with termite confusing backspace as space in guix environment >> # export TERM=linux >> shepherd -c /home/joshua/.config/shepherd/init.scm & >> exec dbus-run-session sway >> fi >> #+END_SRC > > What package includes `dbus-run-session`? I do not have it installed on > my system? > I think it's dbus? I honestly don't remember... -- Joshua Branson (joshuaBPMan in #guix) Sent from Emacs and Gnus https://gnucode.me https://video.hardlimit.com/accounts/joshua_branson/video-channels https://propernaming.org "You can have whatever you want, as long as you help enough other people get what they want." - Zig Ziglar
Joshua Branson writes:
>> What package includes `dbus-run-session`? I do not have it installed on
>> my system?
>
> I think it's dbus? I honestly don't remember...
The `dbus` package does provide `dbus-run-session`.
When I run `dbus-run-session sway` on virtual terminal 1 sway does not
start and I get this output:
```
localhost dbus-daemon[380]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1000 pid=26112 comm="sway ") interface="org.freedesktop.login1.Session" member="SetType" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=381 comm="/gnu/store/jdk3r1gs4d36n3aj9fscsvwwc9prnrzp-elogin")
[backend/backend.c:303] Failed to open any DRM device
[sway/server.c:49] Unable to create backend
```
When I run `sudo dbus-run-session sway` it outputs "XDG_RUNTIME_DIR is
not set in the environment. Aborting.".
Joshua Branson writes:
> I also just realized that sway started for me when I changed
> %base-services to %desktop-services.
If I reconfigure the system with `%desktop-services`:
```
(services %desktop-services)
```
When I run `sway` on virtual terminal 1 sway does not start and I get
this output:
```
localhost dbus-daemon[380]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1000 pid=26112 comm="sway ") interface="org.freedesktop.login1.Session" member="SetType" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=381 comm="/gnu/store/jdk3r1gs4d36n3aj9fscsvwwc9prnrzp-elogin")
[backend/backend.c:303] Failed to open any DRM device
[sway/server.c:49] Unable to create backend
```
When I run `sudo sway` it outputs "XDG_RUNTIME_DIR is not set in the
environment. Aborting.".
Bone Baboon <bone.baboon@disroot.org> writes: > Joshua Branson writes: > >> I also just realized that sway started for me when I changed >> %base-services to %desktop-services. > > If I reconfigure the system with `%desktop-services`: > > ``` > (services %desktop-services) > ``` > > When I run `sway` on virtual terminal 1 sway does not start and I get > this output: > > ``` > localhost dbus-daemon[380]: [system] Rejected send message, 2 matched > rules; type="method_call", sender=":1.24" (uid=1000 pid=26112 > comm="sway ") interface="org.freedesktop.login1.Session" > member="SetType" error name="(unset)" requested_reply="0" > destination="org.freedesktop.login1" (uid=0 pid=381 > comm="/gnu/store/jdk3r1gs4d36n3aj9fscsvwwc9prnrzp-elogin") > [backend/backend.c:303] Failed to open any DRM device > [sway/server.c:49] Unable to create backend > ``` > > When I run `sudo sway` it outputs "XDG_RUNTIME_DIR is not set in the > environment. Aborting.". hmmm, maybe this will help. Here's my current guix config: https://notabug.org/jbranso/guix-config/src/master/sway.scm -- Joshua Branson (joshuaBPMan in #guix) Sent from Emacs and Gnus https://gnucode.me https://video.hardlimit.com/accounts/joshua_branson/video-channels https://propernaming.org "You can have whatever you want, as long as you help enough other people get what they want." - Zig Ziglar
On Sat, 27 Mar 2021 20:43:49 -0400
Bone Baboon <bone.baboon@disroot.org> wrote:
> I have installed Sway a Wayland window manager.
>
> I have copied the `gnu/store/<hash>-sway-1.5.1/etc/sway/config` to
> `~/.sway/config`.
>
> When I run `sway` or `sudo sway` on virtual terminal 1 it outputs
> "XDG_RUNTIME_DIR is not set in the environment. Aborting.". `man
> sway` and `sway --help` does not mention `XDG_RUNTIME_DIR`. An
> suggestions on how to deal with this error?
>
Run it with dbus-run-session sway. Do **not** run it as root. Generally
speaking, don't randomly run things as root.
[-- Attachment #1: Type: text/plain, Size: 866 bytes --] On 2021-03-29, Bone Baboon wrote: > When I run `dbus-run-session sway` on virtual terminal 1 sway does not > start and I get this output: > > ``` > localhost dbus-daemon[380]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1000 pid=26112 comm="sway ") interface="org.freedesktop.login1.Session" member="SetType" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=381 comm="/gnu/store/jdk3r1gs4d36n3aj9fscsvwwc9prnrzp-elogin") vvvvvvvvvvvvvvvvvvvvvvvvvvvvv > [backend/backend.c:303] Failed to open any DRM device ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I think this is your fundamental problem. There's no DRM device available (at least to your user). Are there devices in /dev/dri/, and are they writeable by your user? live well, vagrant [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --]
Vagrant Cascadian writes:
> On 2021-03-29, Bone Baboon wrote:
>> When I run `dbus-run-session sway` on virtual terminal 1 sway does not
>> start and I get this output:
>>
>> ```
>> localhost dbus-daemon[380]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1000 pid=26112 comm="sway ") interface="org.freedesktop.login1.Session" member="SetType" error name="(unset)" requested_reply="0" destination="org.freedesktop.login1" (uid=0 pid=381 comm="/gnu/store/jdk3r1gs4d36n3aj9fscsvwwc9prnrzp-elogin")
>
> vvvvvvvvvvvvvvvvvvvvvvvvvvvvv
>> [backend/backend.c:303] Failed to open any DRM device
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> I think this is your fundamental problem. There's no DRM device
> available (at least to your user). Are there devices in /dev/dri/, and
> are they writeable by your user?
What is the significance of the /dev/dri/ devices?
Is /dev/dri/ related to the GPU of a computer?
If there are no /dev/dri devices does that mean that the graphics card
is not compatible with Linux-libre or Guix and that a Wayland window
manager is not going to work?
I am trying to get Sway working on three computers.
Computer 0:
No /dev/dri/ directory.
The sticker on the computer says AMD Radeon Vega Graphics.
neofetch says the GPU is AMD ATI 05:00.0 Picasso.
Computer 1:
No /dev/dri/ directory.
neofetch says the GPU is NVIDEA GeForce FX 5200.
Computer 2:
Has a /dev/dri/ directory with devices that are writable by my user.
noefetch says the GPU is Intel Mobile 4 Series Chipset.
I have not got Sway working on computer 0 or 1.
On computer 2 I am able to start Sway with `sway` on virtual terminal
1.
The relevant parts of the system configuration on computer 2 are:
```
(packages
(append
(list
sway ;Wayland window manager
dmenu ;a selection utility that Sway can use to launch programs
foot) ;a terminal emulator that works with Sway
%base-packages))
(services
(append
(list
(service elogind-service-type))
%base-services))
```
[-- Attachment #1: Type: text/plain, Size: 2014 bytes --] On 2021-03-31, Bone Baboon wrote: > Vagrant Cascadian writes: > >> On 2021-03-29, Bone Baboon wrote: >>> When I run `dbus-run-session sway` on virtual terminal 1 sway does not >>> start and I get this output: ... >> vvvvvvvvvvvvvvvvvvvvvvvvvvvvv >>> [backend/backend.c:303] Failed to open any DRM device >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> I think this is your fundamental problem. There's no DRM device >> available (at least to your user). Are there devices in /dev/dri/, and >> are they writeable by your user? > > What is the significance of the /dev/dri/ devices? > Is /dev/dri/ related to the GPU of a computer? > If there are no /dev/dri devices does that mean that the graphics card > is not compatible with Linux-libre or Guix and that a Wayland window > manager is not going to work? Yes, you need /dev/dri for graphics acceleration to work, and wayland needs at least basic graphics acceleration, as I understand it. So missing/broken graphics drivers is the issue on two of your machines. > I am trying to get Sway working on three computers. > > Computer 0: > No /dev/dri/ directory. > The sticker on the computer says AMD Radeon Vega Graphics. > neofetch says the GPU is AMD ATI 05:00.0 Picasso. > > Computer 1: > No /dev/dri/ directory. > neofetch says the GPU is NVIDEA GeForce FX 5200. Both NVIDIA and AMD have a history of not always having free drivers/firmware/etc for their graphics hardware. > Computer 2: > Has a /dev/dri/ directory with devices that are writable by my user. > noefetch says the GPU is Intel Mobile 4 Series Chipset. And in my experience Intel chips usually work without problems... > I have not got Sway working on computer 0 or 1. > > On computer 2 I am able to start Sway with `sway` on virtual terminal > 1. That's consistent with my assertion, then, at least. :) So it sounds like you have sway configured correctly, but some of your hardware may be incompatible with linux-libre. live well, vagrant [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 227 bytes --]