Home liberachat/#xmonad: Logs Calendar

Logs: liberachat/#xmonad

←Prev  Next→
Page 1 .. 265 266 267 268 269 270 271 272 273 274 275 .. 1847
184,630 events total
2021-10-16 09:48:57 <Solid> FOSSHuman[m]: spawn "..." >> spawn "..."
2021-10-16 09:49:13 <ranmacar> where would be best to set it?
2021-10-16 09:49:21 <tomsmeding> ranmacar: fish config probably doesn't work because the login manager only gets the global profile; I would've expected /etc/profile to work (after a reboot)
2021-10-16 09:49:31 <Solid> indeed
2021-10-16 09:49:45 <FOSSHuman[m]> Solid: Nice! Thanks..
2021-10-16 09:53:08 <ranmacar> didnt seem to work in /etc/profile. any tips where it could?
2021-10-16 09:54:43 <ranmacar> or would setting the binding mod+q to --recompile && --restart manually work? :)
2021-10-16 09:54:49 <tomsmeding> get xmonad to print the shell environment somehow (i.e. the output of `env`)
2021-10-16 09:55:10 <tomsmeding> ranmacar: yes, but you probably have to add an absolute path to xmonad
2021-10-16 09:56:08 <ranmacar> i have it in ~/.cabal/bin/xmonad
2021-10-16 09:57:50 <ranmacar> how can i print the env?
2021-10-16 09:58:24 <tomsmeding> execute the 'env' executable somehow and make sure you get the output; perhaps run 'env >/home/ranmacar/envstuff.txt' in a binding
2021-10-16 09:58:28 tomsmeding doesn't actually know xmonad
2021-10-16 10:00:04 <ranmacar> it probably is a more general linux issue :)
2021-10-16 10:00:59 × rundown quits (~eb0t@90.210.94.119) (Ping timeout: 264 seconds)
2021-10-16 10:01:19 <tomsmeding> feels like it, but I wouldn't know how to make xmonad run something :p
2021-10-16 10:02:05 <Solid> you can just do `spawn "env"' as a keybinding (this will print to stdout, so make sure you know where that goes :))
2021-10-16 10:02:23 rundown joins (~eb0t@90.196.142.168)
2021-10-16 10:14:32 <ranmacar> where does it go? :)
2021-10-16 10:16:37 <mc47> depends
2021-10-16 10:16:41 <Solid> that entirely depends on your login manager, so I can't help you there, sorry
2021-10-16 10:17:05 <Solid> (I start X with `exec launchx >& ~/.xsession.log' and so goes to ~/.xsession.log for me, though ~/.xsession-errors is somewhat more common for a lot of distros)
2021-10-16 10:17:40 <mc47> for me, it goes to ~/.local/share/sddm/xorg-session.log
2021-10-16 10:17:55 <FOSSHuman[m]> <Solid> "you can just do `spawn "env"' as..." <- Maybe `spawn "env >> example.txt"`??
2021-10-16 10:18:59 <Solid> oh right, POSIX shell is an actual language :)
2021-10-16 10:19:15 <Solid> probably need to make that an absolute path though
2021-10-16 10:21:12 <liskin> ranmacar: xargs -0 -n1 </proc/$(pidof xmonad-x86_64-linux)/environ | grep ^PATH
2021-10-16 10:21:24 <liskin> prints the env of the running xmonad instance
2021-10-16 10:22:10 <ranmacar> import XMonad
2021-10-16 10:22:10 <ranmacar> import XMonad.Util.EZConfig
2021-10-16 10:22:11 <ranmacar> main :: IO ()
2021-10-16 10:22:11 <ranmacar> main = xmonad $ def
2021-10-16 10:22:12 <ranmacar> { modMask = mod4Mask -- Rebind Mod to the Super key
2021-10-16 10:22:12 <ranmacar> , terminal = "alacritty"
2021-10-16 10:22:13 <ranmacar> }
2021-10-16 10:22:13 <ranmacar> `additionalKeysP`
2021-10-16 10:22:14 <ranmacar> [ ("M-a", spawn "env >> /home/ranmacar/xmonad.env")]
2021-10-16 10:22:54 <ranmacar> this worked, and printed the env, but the path seems to be ok
2021-10-16 10:23:06 <ranmacar> PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:~/.cabal/bin:~/.local/bin:/home/ranmacar/.cabal/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
2021-10-16 10:26:50 <liskin> what display manager do you use?
2021-10-16 10:27:14 <liskin> we need to see logs. if you have gdm, it'll probably be in the systemd journal, if not, then maybe .xsession-errors or something
2021-10-16 10:27:18 <liskin> but it has to be somewhere
2021-10-16 10:27:35 <liskin> ls -la /proc/$(pidof xmonad-x86_64-linux)/fd
2021-10-16 10:27:41 <liskin> that will tell us where
2021-10-16 10:28:21 <liskin> ls -la /proc/$(pidof xmonad-x86_64-linux)/fd/{1,2}
2021-10-16 10:31:50 <ranmacar> sddm :)
2021-10-16 10:31:53 <ranmacar> xmonad: ghc: runProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
2021-10-16 10:32:43 <liskin> where's your ghc binary?
2021-10-16 10:33:28 <ranmacar> in ghcup, not in path :)
2021-10-16 10:33:32 <tomsmeding> yay
2021-10-16 10:33:39 <liskin> but why
2021-10-16 10:33:57 <liskin> how do you build xmonad then?
2021-10-16 10:34:14 <tomsmeding> liskin: people add stuff to their path in their shell profiles
2021-10-16 10:34:30 <tomsmeding> login managers don't care about that and only read /etc/profile
2021-10-16 10:34:34 <ranmacar> i installed ghcup from the website, then xmonad with cabal
2021-10-16 10:34:58 <liskin> ranmacar: you just said there's no ghc on your path
2021-10-16 10:35:05 <liskin> does ghcup only put cabal on path?
2021-10-16 10:35:11 <liskin> that seems rather hard to believe tbh
2021-10-16 10:35:37 <tomsmeding> liskin: ghcup definitely puts ghc in your path, but it does that by modifying your shell rc file
2021-10-16 10:35:45 <tomsmeding> login managers don't care about shell rc files :p
2021-10-16 10:36:18 <ranmacar> it gets added somewhere, but the env printed from xmonad doesnt have it
2021-10-16 10:36:27 <liskin> okay let me try to put it another way
2021-10-16 10:36:30 <liskin> $ which ghc
2021-10-16 10:36:34 <liskin> what does this give?
2021-10-16 10:36:43 <Solid> ghcup seems to create ~/.ghcup/bin and put executables there
2021-10-16 10:36:52 <tomsmeding> liskin: in their normal shell, that will give a ghc
2021-10-16 10:37:07 <tomsmeding> because their .bashrc or their .config/fish/config.fish or whatever adds that
2021-10-16 10:37:12 <Solid> and I can't see that in the above $PATH
2021-10-16 10:37:28 <liskin> tomsmeding: I don't want to be rude, man, but what I want is specific stuff, not some vague "something does something"
2021-10-16 10:37:40 <liskin> I want to see their specific ghc location
2021-10-16 10:37:47 <liskin> I want to see their specific $PATH in a shell
2021-10-16 10:37:57 <liskin> and I want to see their specific $PATH in the xmonad process
2021-10-16 10:38:06 <liskin> specific shit.
2021-10-16 10:38:12 <liskin> only then can we do something about the problem.
2021-10-16 10:38:46 <ranmacar> ~/.ghcup/bin
2021-10-16 10:38:54 <tomsmeding> you're right I was being the rude person here, kind of, because you clearly know your shit. It's just that I think I already know what the problem is (which ghc gives ~/.ghcup/bin/ghc which is in .bashrc but not in /etc/profile etc., but I shouldn't presume and that's exactly what I was doing!)
2021-10-16 10:38:58 <liskin> (and, I believe, only by actually seeing specific shit can one get some understanding)
2021-10-16 10:39:22 <liskin> 12:23 <ranmacar> PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:~/.cabal/bin:~/.local/bin:/home/ranmacar/.cabal/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
2021-10-16 10:39:28 <liskin> ranmacar: ^^ see, no ~/.ghcup/bin in there
2021-10-16 10:40:04 <ranmacar> yeah, i noticed :)
2021-10-16 10:40:23 <ranmacar> thanks, adding that to /etc/profile
2021-10-16 10:42:27 × ranmacar quits (~ranmacar@2001:16b8:5c51:6500:2a39:26ff:fe02:85bb) (Quit: Client closed)
2021-10-16 10:43:02 <Solid> why would login managers not read shell rc files
2021-10-16 10:43:18 <Solid> that seems insane
2021-10-16 10:43:46 <liskin> some of them read .xsessionrc (it's probably more complicated than that, some may read that, some may invoke Xsession which sources that)
2021-10-16 10:44:26 ranmacar joins (~ranmacar@88.130.159.133)
2021-10-16 10:44:43 <tomsmeding> Solid: how would a login manager like gdm know how to read my fish config file?
2021-10-16 10:45:21 <liskin> but .bashrc really is meant for interactive shell (actually just bash, as tomsmeding correctly says) sessions only, so dms don't read that
2021-10-16 10:46:26 <liskin> I just tried googling for how to set env vars with sddm and didn't really get an answer
2021-10-16 10:46:37 <liskin> how the hell are less experienced people supposed to do that :-/
2021-10-16 10:48:13 <liskin> (oh and there's also ~/.pam_environment which should just work for all sessions, but I bet that thing doesn't expand tildes and $vars)
2021-10-16 10:49:24 <liskin> and for added fun, every distro does it differently, so arch seems to have ~/.xprofile instead of ~/.xsessionrc: https://wiki.archlinux.org/title/xprofile
2021-10-16 10:49:26 <liskin> :-D
2021-10-16 10:49:33 <ranmacar> etc/profile didnt help :(
2021-10-16 10:49:54 <ranmacar> maybe xprofile :D
2021-10-16 10:50:01 <liskin> yeah, try xprofile and xsessionrc
2021-10-16 10:50:12 <ranmacar> yay linuxes :)
2021-10-16 10:50:28 <liskin> maybe add XXX=xprofile and XXX=xsessionrc respectively so that you can then check which one actually worked :-)
2021-10-16 10:51:35 <ranmacar> should .xprofile be there already?
2021-10-16 10:52:31 <liskin> probably not

All times are in UTC.