Re: Guix Home Issues: Redshift Service Won't Run (Problem with Wayland?)

2023-11-28 Thread Jaft
On Tuesday (November 28, 2023) at 05:45:28 AM CST, Tomas Volf wrote:
> 
> [1  ]
> 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.



Re: Guix Home Issues: Redshift Service Won't Run (Problem with Wayland?)

2023-11-28 Thread Tomas Volf
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")))
> > (servicehome-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")
> >  

Guix Home Issues: Redshift Service Won't Run (Problem with Wayland?)

2023-11-28 Thread Jaft
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")))
> (servicehome-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/"
>