Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
waybar error
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 56

PostPosted: Thu Oct 17, 2024 10:12 pm    Post subject: waybar error Reply with quote

Trying to configure waybar on hyprland. When i try to run waybar from kitty, I get the error that waybar cannot find dbus.
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 473
Location: Naarm/Melbourne, Australia

PostPosted: Fri Oct 18, 2024 12:15 am    Post subject: Reply with quote

Is there a D-Bus session bus running? (Note this is not the same as the D-Bus system bus provided by the 'dbus' service.) Check if the DBUS_SESSION_BUS_ADDRESS variable is set, e.g. by running:

Code:
$ env | grep DBUS

If it's not, then you need to start a session bus when you start your Hyprland session, e.g. by starting Hyprland like this:

Code:
$ dbus-run-session hyprland

_________________
https://wiki.gentoo.org/wiki/User:Flexibeast
Back to top
View user's profile Send private message
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 56

PostPosted: Fri Oct 18, 2024 4:42 am    Post subject: Reply with quote

flexibeast wrote:
Is there a D-Bus session bus running? (Note this is not the same as the D-Bus system bus provided by the 'dbus' service.) Check if the DBUS_SESSION_BUS_ADDRESS variable is set, e.g. by running:

Code:
$ env | grep DBUS

If it's not, then you need to start a session bus when you start your Hyprland session, e.g. by starting Hyprland like this:

Code:
$ dbus-run-session hyprland


I don't think Hyprland likes to be started from lightdm
Back to top
View user's profile Send private message
flexibeast
Guru
Guru


Joined: 04 Apr 2022
Posts: 473
Location: Naarm/Melbourne, Australia

PostPosted: Fri Oct 18, 2024 6:37 am    Post subject: Reply with quote

You haven't answered my question about confirming whether or not there is a D-Bus session bus active. If there's not, you need to work out how to ensure LightDM starts a session bus before it starts Hyprland. (i'm not at all familiar with LightDM, and the Gentoo wiki page for LightDM only talks about the `dbus` service, which as i wrote in my previous message, starts a system bus, not the session bus that's required.)
_________________
https://wiki.gentoo.org/wiki/User:Flexibeast
Back to top
View user's profile Send private message
steveo314
n00b
n00b


Joined: 08 Sep 2006
Posts: 56

PostPosted: Fri Oct 18, 2024 12:20 pm    Post subject: Reply with quote

Running
Code:
$ env | grep DBUS
gives the DBUS ID

When I actually run
Code:
dbus-run-session Hyprland
from tty1, Hyprland and waybar
start how they should. I have lightdm starting on tty7 which is how I go into KDE plasma.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1477
Location: Earth

PostPosted: Fri Oct 18, 2024 8:53 pm    Post subject: Reply with quote

you can also edit /usr/share/wayland-sessions/hyprland.desktop and add dbus-run-session to Exec=dbus-run-session Hyprland or use the following patch,

file is located in /etc/portage/patches/gui-wm/hyprland/what-ever-name-you-choose.patch
Code:
diff --git a/example/hyprland.desktop b/example/hyprland.desktop
index 57ad076f..2a8a77db 100644
--- a/example/hyprland.desktop
+++ b/example/hyprland.desktop
@@ -1,5 +1,5 @@
 [Desktop Entry]
 Name=Hyprland
 Comment=An intelligent dynamic tiling Wayland compositor
-Exec=Hyprland
+Exec=dbus-run-session Hyprland
 Type=Application
\ No newline at end of file

for newer versions of Hyprland
Code:
diff --git a/example/hyprland.desktop b/example/hyprland.desktop
index bb2801a..9a7f2f4 100644
--- a/example/hyprland.desktop
+++ b/example/hyprland.desktop
@@ -1,7 +1,7 @@
 [Desktop Entry]
 Name=Hyprland
 Comment=An intelligent dynamic tiling Wayland compositor
-Exec=Hyprland
+Exec=dbus-run-session Hyprland
 Type=Application
 DesktopNames=Hyprland
 Keywords=tiling;wayland;compositor;
lines 1-13/13 (END)

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum