all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Guix Home Issues: Redshift Service Won't Run (Problem with Wayland?)
@ 2023-11-28  9:02 Jaft
  2023-11-28 11:45 ` Tomas Volf
  0 siblings, 1 reply; 3+ messages in thread
From: Jaft @ 2023-11-28  9:02 UTC (permalink / raw)
  To: help-guix

I dunno if anyone would be able to help but I've had this issue where
the Redshift home service just won't run.

My config. is below but, as it's (relatively) long, I'll put it last.

Looking at ~herd status redshift~, it says that it's stopped and
disabled but, I also noticed, says it requires =x11-display=. I'm
guessing this may be a reason the service keeps getting disabled and
refuses to run?

But Redshift works with Wayland (I'm using the =redshift-wayland=
package); is there something I'm supposed to do to get the service to
play nice with Wayland? I'm running XWayland.



Not as pressing (or clear as to what might be wrong) but I've had
trouble getting the batsignal service to work right, as well. That one
does seem to run (I can see a running instance on my machine) but it
doesn't ever provide notifications. It worked the /first/ time I
ran/installed it and hasn't ever worked since – it never gives any
notifications for anything I set. I'm pretty certain it works if I run
=batsignal= manually, though (just not when ran via the service). Any
ideas?



> (use-modules (gnu   home)
>              (gnu   home     services)
>              (gnu   home     services   desktop)  ; home-redshift-service-type
>              (gnu   home     services   mcron)  ; home-mcron-service-type
>              (gnu   home     services   pm)  ; home-batsignal-service-type
>              (gnu   home     services   shells)  ; home-bash-service-type
>              (gnu   packages)
>              (gnu   packages pantheon)  ; pantheon-wallpapers
>              (gnu   packages xdisorg)  ; redshift-wayland
>              (gnu   services)
>              (guix  gexp)
>              (guix  packages)  ; package-output
>              (guix  store)  ; with-store
>              (ice-9 ftw))  ; scandir
>
> (let* ([  homeDir              (passwd:dir (getpwnam (getlogin)))]
>        [configDir         (string-append homeDir "/.config/guix")]
>        [exclude-rel-paths       (lambda (file)
>                                   (not (or (string= "."  file)
>                                            (string= ".." file))))])
>   (home-environment
>     ;; Below is the list of packages that will show up in your
>     ;; Home profile, under ~/.guix-home/profile.
>     (packages (list pantheon-wallpapers))
>
>     ;; Below is the list of Home services.  To search for available
>     ;; services, run 'guix home search KEYWORD' in a terminal.
>     (services (list (simple-service 'some-useful-env-vars-service
> 		                    home-environment-variables-service-type
> 		                    `(("QT_QPA_PLATFORM" . "wayland;xcb")
>                                       ("GDK_BACKEND"     . "wayland,x11")
>                                       ("PATH"            . ,(string-append "$PATH" ":$HOME/.local/bin"
>                                                                                    ":$HOME/.fly/bin"))
>                                       ("GUIX_PROFILE"    . "$HOME/.guix-profile")
>                                       ("EDITOR"          . "emacs -nw")))
>                     (service        home-bash-service-type
>                                     (home-bash-configuration
>                                       (environment-variables `(("QT_QPA_PLATFORM" . "wayland;xcb")
>                                                                ("GDK_BACKEND"     . "wayland,x11")))
>                                       (aliases               '(("la"   . "ls -A")
>                                                                ("ll"   . "ls -l")
>                                                                ("lsds" . "ls -p1  $* | grep /")
>                                                                ("lsde" . "ls -Alh $* | grep ^d")
>                                                                ("lsd"  . "ls -Ap1 $* | grep /")))
>                                       (bash-profile          (list (local-file "./bash/initialize_wayfire.sh"
>                                                                                "bash_profile")))
>                                       (bashrc                (list (local-file "./bash/rc.sh"  "bashrc")
>                                                                    (local-file "./bash/ps1.sh" "bashrc")))))
>                     (simple-service 'home-dir
>                                     home-files-service-type
>                                     (append `((".gtkrc-2.0" ,(local-file "./gtk/gtkrc-2.0")))
>                                             (map (lambda (file)
>                                                    (list (string-append "Templates/" file)
>                                                          (local-file (string-append configDir
>                                                                                     "/Templates/"
>                                                                                     file))))
>                                                  (scandir (string-append configDir "/Templates")
>                                                           exclude-rel-paths))
>                                             (let ([backgrounds (string-append (with-store store
>                                                                                 (package-output store
>                                                                                                 pantheon-wallpapers))
>                                                                               "/share/backgrounds")])
>                                               (map (lambda (file)
>                                                      (list (string-append ".local/share/wallpapers/" file)
>                                                            (local-file (string-append backgrounds "/" file))))
>                                                    (scandir backgrounds
>                                                             (lambda (file)
>                                                               (not (or (string=         file ".")
>                                                                        (string=         file "..")
>                                                                        (string-contains file " ")))))))))
>                     (simple-service 'home-config
>                                     home-xdg-configuration-files-service-type
>                                     `(("dunst/dunstrc"          ,(local-file "./dunst/dunstrc"))
> 
>                                       ("Thunar/accels.scm"      ,(local-file "./Thunar/accels.scm"))
>                                       ("Thunar/uca.xml"         ,(local-file "./Thunar/uca.xml"))
> 
>                                       ("gtk-3.0/settings.ini"   ,(local-file "./gtk/settings.ini"))
>                                       ("gtk-3.0/bookmarks"      ,(local-file "./gtk/bookmarks"))
> 
>                                       ("user-dirs.dirs"         ,(local-file "./xdg/user-dirs.dirs"))
> 
>                                       ("kitty/kitty.conf"       ,(local-file "./kitty/kitty.conf"))
> 
>                                       ("labwc/autostart"        ,(local-file "./labwc/autostart"))
>                                       ("labwc/environment"      ,(local-file "./labwc/environment"))
>                                       ("labwc/menu.xml"         ,(local-file "./labwc/menu.xml"))
>                                       ("labwc/rc.xml"           ,(local-file "./labwc/rc.xml"))
>                                       ("labwc/themerc-override" ,(local-file "./labwc/themerc-override"))
> 
>                                       ("mpv/input.conf"         ,(local-file "./mpv/input.conf"))
>                                       ("mpv/mpv.conf"           ,(local-file "./mpv/mpv.conf"))
> 
>                                       ("waybar/config"          ,(local-file "./waybar/config"))
>                                       ("waybar/style.css"       ,(local-file "./waybar/style.css"))
> 
>                                       ("wayfire.ini"            ,(local-file "./wayfire/wayfire.ini"))))
>                     (service        home-batsignal-service-type
>                                     (home-batsignal-configuration
>                                       (full-level            100)
>                                       (warning-level          30)
>                                       (critical-level         15)
>                                       (danger-level            5)
>                                       (danger-command        "loginctl hibernate")
>                                       (notifications-expire? #f)))
>                     (service        home-redshift-service-type
>                                     (home-redshift-configuration
>                                       (redshift          redshift-wayland)
>                                       (adjustment-method 'wayland)
>                                       (location-provider 'manual)
>                                       (latitude           41.9804596)    ; northern hemisphere
>                                       (longitude         -87.6712512)))  ; west of Greenwich
>                     (simple-service 'pull
>                                     home-mcron-service-type
>                                               ;; Every day at 2 P. M.
>                                     (list #~(job '(next-hour '(14)) "guix pull")
>                                           #~(job '(next-month)      ;; "guix gc -F 2G"
>                                                                     "guix gc -d 6m")))))))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Guix Home Issues: Redshift Service Won't Run (Problem with Wayland?)
  2023-11-28  9:02 Guix Home Issues: Redshift Service Won't Run (Problem with Wayland?) Jaft
@ 2023-11-28 11:45 ` Tomas Volf
  2023-11-28 20:06   ` Jaft
  0 siblings, 1 reply; 3+ messages in thread
From: Tomas Volf @ 2023-11-28 11:45 UTC (permalink / raw)
  To: Jaft; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 10854 bytes --]

On 2023-11-28 03:02:58 -0600, Jaft wrote:
> I dunno if anyone would be able to help but I've had this issue where
> the Redshift home service just won't run.
> 
> My config. is below but, as it's (relatively) long, I'll put it last.
> 
> Looking at ~herd status redshift~, it says that it's stopped and
> disabled but, I also noticed, says it requires =x11-display=. I'm
> guessing this may be a reason the service keeps getting disabled and
> refuses to run?
> 
> But Redshift works with Wayland (I'm using the =redshift-wayland=
> package); is there something I'm supposed to do to get the service to
> play nice with Wayland? I'm running XWayland.

I do not use redshift nor wayland, so this is based just on a quick look at the
service definition.  If you check the gnu/home/services/desktop.scm file,
definition of redshift-shepherd-service, you will see that the dependency on
x11-display is non-conditional.

As a test, you could just remove the requirement from the shepherd service and
see if that helps.  If it does work, the dependency should probably be made
optional.  I do not know if there is something like wayland-display service.

> 
> 
> 
> Not as pressing (or clear as to what might be wrong) but I've had
> trouble getting the batsignal service to work right, as well. That one
> does seem to run (I can see a running instance on my machine) but it
> doesn't ever provide notifications. It worked the /first/ time I
> ran/installed it and hasn't ever worked since – it never gives any
> notifications for anything I set. I'm pretty certain it works if I run
> =batsignal= manually, though (just not when ran via the service). Any
> ideas?
> 
> 
> 
> > (use-modules (gnu   home)
> >              (gnu   home     services)
> >              (gnu   home     services   desktop)  ; home-redshift-service-type
> >              (gnu   home     services   mcron)  ; home-mcron-service-type
> >              (gnu   home     services   pm)  ; home-batsignal-service-type
> >              (gnu   home     services   shells)  ; home-bash-service-type
> >              (gnu   packages)
> >              (gnu   packages pantheon)  ; pantheon-wallpapers
> >              (gnu   packages xdisorg)  ; redshift-wayland
> >              (gnu   services)
> >              (guix  gexp)
> >              (guix  packages)  ; package-output
> >              (guix  store)  ; with-store
> >              (ice-9 ftw))  ; scandir
> >
> > (let* ([  homeDir              (passwd:dir (getpwnam (getlogin)))]
> >        [configDir         (string-append homeDir "/.config/guix")]
> >        [exclude-rel-paths       (lambda (file)
> >                                   (not (or (string= "."  file)
> >                                            (string= ".." file))))])
> >   (home-environment
> >     ;; Below is the list of packages that will show up in your
> >     ;; Home profile, under ~/.guix-home/profile.
> >     (packages (list pantheon-wallpapers))
> >
> >     ;; Below is the list of Home services.  To search for available
> >     ;; services, run 'guix home search KEYWORD' in a terminal.
> >     (services (list (simple-service 'some-useful-env-vars-service
> > 		                    home-environment-variables-service-type
> > 		                    `(("QT_QPA_PLATFORM" . "wayland;xcb")
> >                                       ("GDK_BACKEND"     . "wayland,x11")
> >                                       ("PATH"            . ,(string-append "$PATH" ":$HOME/.local/bin"
> >                                                                                    ":$HOME/.fly/bin"))
> >                                       ("GUIX_PROFILE"    . "$HOME/.guix-profile")
> >                                       ("EDITOR"          . "emacs -nw")))
> >                     (service        home-bash-service-type
> >                                     (home-bash-configuration
> >                                       (environment-variables `(("QT_QPA_PLATFORM" . "wayland;xcb")
> >                                                                ("GDK_BACKEND"     . "wayland,x11")))
> >                                       (aliases               '(("la"   . "ls -A")
> >                                                                ("ll"   . "ls -l")
> >                                                                ("lsds" . "ls -p1  $* | grep /")
> >                                                                ("lsde" . "ls -Alh $* | grep ^d")
> >                                                                ("lsd"  . "ls -Ap1 $* | grep /")))
> >                                       (bash-profile          (list (local-file "./bash/initialize_wayfire.sh"
> >                                                                                "bash_profile")))
> >                                       (bashrc                (list (local-file "./bash/rc.sh"  "bashrc")
> >                                                                    (local-file "./bash/ps1.sh" "bashrc")))))
> >                     (simple-service 'home-dir
> >                                     home-files-service-type
> >                                     (append `((".gtkrc-2.0" ,(local-file "./gtk/gtkrc-2.0")))
> >                                             (map (lambda (file)
> >                                                    (list (string-append "Templates/" file)
> >                                                          (local-file (string-append configDir
> >                                                                                     "/Templates/"
> >                                                                                     file))))
> >                                                  (scandir (string-append configDir "/Templates")
> >                                                           exclude-rel-paths))
> >                                             (let ([backgrounds (string-append (with-store store
> >                                                                                 (package-output store
> >                                                                                                 pantheon-wallpapers))
> >                                                                               "/share/backgrounds")])
> >                                               (map (lambda (file)
> >                                                      (list (string-append ".local/share/wallpapers/" file)
> >                                                            (local-file (string-append backgrounds "/" file))))
> >                                                    (scandir backgrounds
> >                                                             (lambda (file)
> >                                                               (not (or (string=         file ".")
> >                                                                        (string=         file "..")
> >                                                                        (string-contains file " ")))))))))
> >                     (simple-service 'home-config
> >                                     home-xdg-configuration-files-service-type
> >                                     `(("dunst/dunstrc"          ,(local-file "./dunst/dunstrc"))
> > 
> >                                       ("Thunar/accels.scm"      ,(local-file "./Thunar/accels.scm"))
> >                                       ("Thunar/uca.xml"         ,(local-file "./Thunar/uca.xml"))
> > 
> >                                       ("gtk-3.0/settings.ini"   ,(local-file "./gtk/settings.ini"))
> >                                       ("gtk-3.0/bookmarks"      ,(local-file "./gtk/bookmarks"))
> > 
> >                                       ("user-dirs.dirs"         ,(local-file "./xdg/user-dirs.dirs"))
> > 
> >                                       ("kitty/kitty.conf"       ,(local-file "./kitty/kitty.conf"))
> > 
> >                                       ("labwc/autostart"        ,(local-file "./labwc/autostart"))
> >                                       ("labwc/environment"      ,(local-file "./labwc/environment"))
> >                                       ("labwc/menu.xml"         ,(local-file "./labwc/menu.xml"))
> >                                       ("labwc/rc.xml"           ,(local-file "./labwc/rc.xml"))
> >                                       ("labwc/themerc-override" ,(local-file "./labwc/themerc-override"))
> > 
> >                                       ("mpv/input.conf"         ,(local-file "./mpv/input.conf"))
> >                                       ("mpv/mpv.conf"           ,(local-file "./mpv/mpv.conf"))
> > 
> >                                       ("waybar/config"          ,(local-file "./waybar/config"))
> >                                       ("waybar/style.css"       ,(local-file "./waybar/style.css"))
> > 
> >                                       ("wayfire.ini"            ,(local-file "./wayfire/wayfire.ini"))))
> >                     (service        home-batsignal-service-type
> >                                     (home-batsignal-configuration
> >                                       (full-level            100)
> >                                       (warning-level          30)
> >                                       (critical-level         15)
> >                                       (danger-level            5)
> >                                       (danger-command        "loginctl hibernate")
> >                                       (notifications-expire? #f)))
> >                     (service        home-redshift-service-type
> >                                     (home-redshift-configuration
> >                                       (redshift          redshift-wayland)
> >                                       (adjustment-method 'wayland)
> >                                       (location-provider 'manual)
> >                                       (latitude           41.9804596)    ; northern hemisphere
> >                                       (longitude         -87.6712512)))  ; west of Greenwich
> >                     (simple-service 'pull
> >                                     home-mcron-service-type
> >                                               ;; Every day at 2 P. M.
> >                                     (list #~(job '(next-hour '(14)) "guix pull")
> >                                           #~(job '(next-month)      ;; "guix gc -F 2G"
> >                                                                     "guix gc -d 6m")))))))

Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Guix Home Issues: Redshift Service Won't Run (Problem with Wayland?)
  2023-11-28 11:45 ` Tomas Volf
@ 2023-11-28 20:06   ` Jaft
  0 siblings, 0 replies; 3+ messages in thread
From: Jaft @ 2023-11-28 20:06 UTC (permalink / raw)
  To: Tomas Volf, help-guix

On Tuesday (November 28, 2023) at 05:45:28 AM CST, Tomas Volf wrote:
> 
> [1  <text/plain; utf-8 (quoted-printable)>]
> On 2023-11-28 03:02:58 -0600, Jaft wrote:
> > I dunno if anyone would be able to help but I've had this issue where
> > the Redshift home service just won't run.
> > 
> > My config. is below but, as it's (relatively) long, I'll put it last.
> > 
> > Looking at ~herd status redshift~, it says that it's stopped and
> > disabled but, I also noticed, says it requires =x11-display=. I'm
> > guessing this may be a reason the service keeps getting disabled and
> > refuses to run?
> > 
> > But Redshift works with Wayland (I'm using the =redshift-wayland=
> > package); is there something I'm supposed to do to get the service to
> > play nice with Wayland? I'm running XWayland.
> 
> I do not use redshift nor wayland, so this is based just on a quick look at the
> service definition.  If you check the gnu/home/services/desktop.scm file,
> definition of redshift-shepherd-service, you will see that the dependency on
> x11-display is non-conditional.
> 
> As a test, you could just remove the requirement from the shepherd service and
> see if that helps.  If it does work, the dependency should probably be made
> optional.  I do not know if there is something like wayland-display service.

So I tried removing ~(requirement '(x11-display))~ from
=redshift-shepherd-service= but that resulted in an error from
~string-append~ (trying to append ~#f~).

So I commented out the adjustment of the =DISPLAY= variable in
~#:environment-variables~ and that resulted in, finally, no errors but
Redshift, nevertheless, failing.

Since the environment variable was returning ~#f~, I hardcoded it to
"0:0" and set =WAYLAND_DISPLAY= to "wayland-1"; and that did the trick!

At least, it seems so; I see it running in =htop=, now; going to have
to wait until later tonight to see if things get less blue.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-28 20:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-28  9:02 Guix Home Issues: Redshift Service Won't Run (Problem with Wayland?) Jaft
2023-11-28 11:45 ` Tomas Volf
2023-11-28 20:06   ` Jaft

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.