View previous topic :: View next topic |
Author |
Message |
Elserjo n00b
Joined: 06 Jul 2021 Posts: 60
|
Posted: Sun Nov 20, 2022 10:09 am Post subject: Systemd shows some warning messages with sway[SOLVED] |
|
|
Hello everyone!
I see some warning messages since i have switched from gnome to sway. Something like this:
Code: | Nov 20 12:10:52 gentoo-pc systemd[502]: Failed to open configuration file '/dev/null/.config/systemd/user.conf': Not a directory
Nov 20 12:10:52 gentoo-pc systemd-xdg-autostart-generator[512]: Opening /dev/null/.config/autostart failed, ignoring: Not a directory
Nov 20 12:10:52 gentoo-pc systemd[502]: Failed to resolve symlink /dev/null/.config/systemd/user.control, ignoring: Not a directory
Nov 20 12:10:52 gentoo-pc systemd[502]: Failed to resolve symlink /dev/null/.config/systemd/user, ignoring: Not a directory
Nov 20 12:10:52 gentoo-pc systemd[502]: Failed to resolve symlink /dev/null/.local/share/systemd/user, ignoring: Not a directory
Nov 20 12:10:52 gentoo-pc systemd[502]: Failed to open "/dev/null/.config/systemd/user.control", ignoring: Not a directory
Nov 20 12:10:52 gentoo-pc systemd[502]: Failed to open "/dev/null/.config/systemd/user", ignoring: Not a directory
Nov 20 12:10:52 gentoo-pc systemd[502]: Failed to open "/dev/null/.local/share/systemd/user", ignoring: Not a directory |
To be honest, it does not affect any functionality. But can i get rid off these messages?
I use greetd with gtkgreet.
My greetd config:
Code: | [terminal]
# The VT to run the greeter on. Can be "next", "current" or a number
# designating the VT.
vt = 7
# The default session, also known as the greeter.
[default_session]
command = "dbus-run-session -- sway --config /etc/greetd/sway-config"
# The user to run the command as. The privileges this user must have depends
# on the greeter. A graphical greeter may for example require the user to be
# in the `video` group.
user = "greetd" |
gtkgreet:
Code: | # `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "gtkgreet -l -s /usr/share/themes/Adwaita-dark/gtk-3.0/gtk.css; swaymsg exit"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
#include /etc/sway/config.d/* |
My sway launcher script:
Code: | #!/bin/sh
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=sway
export XDG_CURRENT_DESKTOP=sway
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export QT_QPA_PLATFORMTHEME=gnome
dbus-run-session -- sway $@ |
I have also installed xdg-desktop-portal-gtk and xdg-desktop-portal-wlr.
Last edited by Elserjo on Wed Nov 23, 2022 6:30 pm; edited 1 time in total |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sun Nov 20, 2022 10:40 am Post subject: |
|
|
Try
Code: |
export HOME="/home/<user>"
|
in ~/.bashrc
Also check if your $HOME is correctly set:
Code: |
echo $HOME
grep $USER /etc/passwd
grep sway /etc/passwd ### is there a sway user?
|
It seems systemd is trying to access config of a system user who often have /dev/null as HOME. _________________
|
|
Back to top |
|
|
Elserjo n00b
Joined: 06 Jul 2021 Posts: 60
|
Posted: Sun Nov 20, 2022 11:17 am Post subject: |
|
|
alamahant wrote: | Try
Code: |
export HOME="/home/<user>"
|
in ~/.bashrc
Also check if your $HOME is correctly set:
Code: |
echo $HOME
grep $USER /etc/passwd
grep sway /etc/passwd ### is there a sway user?
|
It seems systemd is trying to access config of a system user who often have /dev/null as HOME. |
Thank you for answer. Here is output:
echo $HOME
As i understand, here is all ok.
grep $USER /etc/passwd
Code: | serg:x:1000:1000::/home/serg/:/bin/bash |
But:
grep sway /etc/passwd
is empty
And unfortunately, setting
Code: | export HOME="/home/serg" |
Gives exactly same result... |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3879
|
Posted: Sun Nov 20, 2022 11:25 am Post subject: |
|
|
Is
your hostname? _________________
|
|
Back to top |
|
|
Elserjo n00b
Joined: 06 Jul 2021 Posts: 60
|
Posted: Sun Nov 20, 2022 2:44 pm Post subject: |
|
|
alamahant wrote: | Is
your hostname? |
yep, this is my hostname |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 365
|
Posted: Tue Nov 22, 2022 5:41 pm Post subject: |
|
|
Maybe you try to start sway twice? I see in your greetd config
Code: |
command = "dbus-run-session -- sway --config /etc/greetd/sway-config"
| and in the "sway launcher script"
Code: | dbus-run-session -- sway $@
|
Is there a user with
Code: | grep 'dev/null' /etc/passwd | related to greetd? |
|
Back to top |
|
|
Elserjo n00b
Joined: 06 Jul 2021 Posts: 60
|
Posted: Tue Nov 22, 2022 6:28 pm Post subject: |
|
|
sMueggli wrote: |
Is there a user with
Code: | grep 'dev/null' /etc/passwd | related to greetd? |
Hmmm, thank you for answer. It seems, that you are right. I have disabled greetd, and launch sway by script. And now i don't see these messages.
But how can i get rid of these messages, if i want to use greetd?
Maybe change user from greetd?
Code: | [terminal]
# The VT to run the greeter on. Can be "next", "current" or a number
# designating the VT.
vt = 7
# The default session, also known as the greeter.
[default_session]
command = "dbus-run-session -- sway --config /etc/greetd/sway-config"
# The user to run the command as. The privileges this user must have depends
# on the greeter. A graphical greeter may for example require the user to be
# in the `video` group.
user = "greetd" |
|
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 365
|
Posted: Wed Nov 23, 2022 6:00 pm Post subject: |
|
|
I simply start sway with my "~/.zprofile". But as far as I understand it greetd will start a graphical environment with the "command" defined in the configuration to show gtkgreet. This session will then be closed, when the user logs in and starts another/a different graphical environment.
I think you should change the line
to your personal user. |
|
Back to top |
|
|
Elserjo n00b
Joined: 06 Jul 2021 Posts: 60
|
Posted: Wed Nov 23, 2022 6:30 pm Post subject: |
|
|
sMueggli wrote: | I simply start sway with my "~/.zprofile". But as far as I understand it greetd will start a graphical environment with the "command" defined in the configuration to show gtkgreet. This session will then be closed, when the user logs in and starts another/a different graphical environment.
I think you should change the line
to your personal user. |
thanks. i wiil mark topic as solved. |
|
Back to top |
|
|
|