Hello everyone, I am on GuixSD, using EXWM as my window manager. Though I really appreciate the way it works, it seems that it does not find many of the programs which are required for emacs to function properly. I would like to, but cannot: * use dmenu and see (recently used) programs * open dired in a specific folder * open a file * use run-geiser / geiser / guile / mit-scheme / ... On the surface, most of these problems appear to be of the same nature: in many cases, the error message is (translated from german)! "Searching for program: file or directory not found, $PROGNAME", where $PROGNAME is one of the following: * ls (in case of dired) * git (open a file) * guile (run-geiser / guile) dmenu is a bit different, because while I can start it just fine via keyboard shortcut, it finds only two programs, "env" and "sh". I have been asking several times on #guix if anyone can help me, but was not able to successfully put what I was told into practice. Essentially, I was told to "source /etc/profile". I tried to do that for .bashrc and .profile, but that didnt help, because I dont have similar problems in the command-line/shell, only in emacs. Then I was told to "source /etc/profile" from a file such as .xinitrc / .xsessions, which I tried but which also didnt work because gdm stayed in place via the system configuration (there has been a helpful HOWTO by Alex Kost, which I might try as well if nothing else helps). Before writing, I have experimented with the (extra-arguments '("source /etc/profile")) in the (xorg-configuration), but this led my system to not start anymore, so I rolled back. Any help or pointer is greatly appreciated. I hope I have provided the necessary information, otherwise feel free to ask. Thank you guys in advance, so far I am stoked by how great a community guix is, and how awesome guix itself is :) Greetings, Olivier
[-- Attachment #1: Type: text/plain, Size: 931 bytes --] Hi Olivier, What's your login shell? If it's Bash, did you edit ~/.bashrc by any chance? The default file contains this snippet: --8<---------------cut here---------------start------------->8--- if [[ $- != *i* ]] then # We are being invoked from a non-interactive shell. If this # is an SSH session (as in "ssh host command"), source # /etc/profile so we get PATH and other essential variables. [[ -n "$SSH_CLIENT" ]] && source /etc/profile # Don't do anything else. return fi # Source the system-wide file. source /etc/bashrc --8<---------------cut here---------------end--------------->8--- You need to source /etc/profile if you want the environment variables like PATH to be set properly. You can do this from ~/.bashrc as is done in the snippet, or from other files such ~/.profile or ~/.xinitrc. Hope that helps! -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 511 bytes --]
Olivier Rojon <o.rojon@posteo.net> writes: > Any help or pointer is greatly appreciated. I hope I have provided > the necessary information, otherwise feel free to ask. The first thing to verify is that your login shell configuration (.bashrc or .profile) is set up with the proper PATH, etc. The defaults are. > Then I was told to "source /etc/profile" from a file such as .xinitrc > / .xsessions, which I tried but which also didnt work because gdm > stayed in place via the system configuration (there has been a > helpful HOWTO by Alex Kost, which I might try as well if nothing else > helps). It is a little suspicious that gdm does not load the defaults for a session. What happens if you create a new user and try to log in as that user? To configure the X login session, file is ~/.xsession and it should be set to be executable. Almost all X Window System distributions and session managers are set up to use this file (some of them require the file to be executable), and I assume gdm does as well (I run slim-service-type as my session manager on Guix System). Here is what my ~/.xession looks like: --8<---------------cut here---------------start------------->8--- . ~/.profile . ~/.xinitrc --8<---------------cut here---------------end--------------->8--- Instead of repeating the environment variable setup (sourcing /etc/profile, etc.) for X, you can source your shell configuration file. .xinitrc is there to load any X specific configuration (keyboard, etc) and to start the window manager. Note that this is not Guix or EXWM specific, it is an X configuration issue. I use the same .xsession on Debian and OpenBSD (which is one of the reasons why I use a custom one). -- Vladimir Sedach Software engineering services in Los Angeles https://oneofus.la
Hej,
my login shell is bash, and I have edited it. Yet, adding the lines you
have provided did not really help the issue.
I have now written an .xsession file which looks like this:
--8<---------------cut here---------------start------------->8---
#!/usr/bin/env bash
. /etc/profile &
. ~/.bashrc &
exec exwm
--8<---------------cut here---------------end--------------->8---
Unfortunately, this did not do the trick.
There's two things I suspect to be a possible culprit which I am about
to change:
- I had manually defined PATH in .bashrc, which I believe might have
overriden other attempts at defining it (even though it contains :$PATH
at the end)
- I did what is sometimes advised when you install a package, that you
should add the following lines to your shell:
--8<---------------cut here---------------start------------->8---
GUIX_PROFILE="/home/hapster/.guix-profile"
. "$GUIX_PROFILE/etc/profile"
--8<---------------cut here---------------end--------------->8---
However, I had not added an "export" in front of "GUIX_PROFILE", which
might be part of the problem.
But as you can see, I am kind of struggling to find the cause of the
problem. ;-)
On 02.01.21 15:17, Pierre Neidhardt wrote:
> Hi Olivier,
>
> What's your login shell? If it's Bash, did you edit ~/.bashrc by any chance?
>
> The default file contains this snippet:
>
> --8<---------------cut here---------------start------------->8---
> if [[ $- != *i* ]]
> then
> # We are being invoked from a non-interactive shell. If this
> # is an SSH session (as in "ssh host command"), source
> # /etc/profile so we get PATH and other essential variables.
> [[ -n "$SSH_CLIENT" ]] && source /etc/profile
>
> # Don't do anything else.
> return
> fi
>
> # Source the system-wide file.
> source /etc/bashrc
> --8<---------------cut here---------------end--------------->8---
>
> You need to source /etc/profile if you want the environment variables
> like PATH to be set properly.
>
> You can do this from ~/.bashrc as is done in the snippet, or from other
> files such ~/.profile or ~/.xinitrc.
>
> Hope that helps!
>
[-- Attachment #1: Type: text/plain, Size: 1593 bytes --] Hi, You most probably have an issue with your dotfiles. Some comments below: Olivier Rojon <o.rojon@posteo.net> writes: > --8<---------------cut here---------------start------------->8--- > #!/usr/bin/env bash > . /etc/profile & > . ~/.bashrc & > exec exwm > --8<---------------cut here---------------end--------------->8--- Remove the trailing `&`. This syntax is used to start processes in the background, but here you are sourcing configuration files which should be done synchronously. > - I had manually defined PATH in .bashrc, which I believe might have > overriden other attempts at defining it (even though it contains :$PATH > at the end) It may have a typo. Try commenting out any modification done to PATH and try again. > - I did what is sometimes advised when you install a package, that you > should add the following lines to your shell: > > --8<---------------cut here---------------start------------->8--- > GUIX_PROFILE="/home/hapster/.guix-profile" > . "$GUIX_PROFILE/etc/profile" > --8<---------------cut here---------------end--------------->8--- > > However, I had not added an "export" in front of "GUIX_PROFILE", which > might be part of the problem. Nope, it should not matter if the second line was applied properly. > But as you can see, I am kind of struggling to find the cause of the > problem. ;-) Try creating a new user with no modifications done to the dotfiles. Then import your dotfiles gradually do see which one triggers the issue. Cheers! -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 511 bytes --]
Hi Olivier, I'm also on GuixSD, using EXWM as my window manager. It sounds like you have an issue with your PATH environment variable. I set my environment variables in ~/.bash_profile, so that they are automatically set on login and are therefore propagated to Emacs when it is started by EXWM. Here's an excerpt from my ~/.bash_profile to get you started: ##################################################################### # Shell variables export MYPROFILE=$HOME/.guix-profile GUIX_PROFILE=$MYPROFILE source $MYPROFILE/etc/profile export ASPELL_DICT_DIR=$MYPROFILE/lib/aspell export GIT_EXEC_PATH=$MYPROFILE/libexec/git-core export PATH=$MYPROFILE/bin:$MYPROFILE/sbin:$PATH export CPATH=$MYPROFILE/include${CPATH:+:}$CPATH export LIBRARY_PATH=$MYPROFILE/lib${LIBRARY_PATH:+:}$LIBRARY_PATH export LD_LIBRARY_PATH=$MYPROFILE/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH export PKG_CONFIG_PATH=$MYPROFILE/lib/pkgconfig:$MYPROFILE/share/pkgconfig${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH export GIO_EXTRA_MODULES=$MYPROFILE/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES export ACLOCAL_PATH=$MYPROFILE/share/aclocal${ACLOCAL_PATH:+:}$ACLOCAL_PATH export NODE_PATH=$MYPROFILE/lib/node_modules${NODE_PATH:+:}$NODE_PATH # Remove duplicates from *PATH* variables export PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$PATH` export INFOPATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$INFOPATH` export CPATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$CPATH` export LIBRARY_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$LIBRARY_PATH` export LD_LIBRARY_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$LD_LIBRARY_PATH` export PKG_CONFIG_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$PKG_CONFIG_PATH` export GIO_EXTRA_MODULES=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$GIO_EXTRA_MODULES` export ACLOCAL_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$ACLOCAL_PATH` export NODE_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$NODE_PATH` ##################################################################### I also make ~/.bashrc a symlink to ~/.bash_profile since these variable definitions are idempotent. I don't do any other fancy magic with ~/.profile, ~/.xsession, or ~/.xinitrc other than using xsetroot, xset, setxkbmap, xrdb, and friends to tweak my X setup in .xsession and then call exwm on its final line. Hope that helps! Gary Olivier Rojon <o.rojon@posteo.net> writes: > Hello everyone, > > I am on GuixSD, using EXWM as my window manager. Though I really > appreciate the way it works, it seems that it does not find many of > the programs which are required for emacs to function properly. > > I would like to, but cannot: > > * use dmenu and see (recently used) programs > * open dired in a specific folder > * open a file > * use run-geiser / geiser / guile / mit-scheme / ... > > > On the surface, most of these problems appear to be of the same > nature: in many cases, the error message is (translated from german)! > > "Searching for program: file or directory not found, $PROGNAME", where > $PROGNAME is one of the following: > > * ls (in case of dired) > * git (open a file) > * guile (run-geiser / guile) > > dmenu is a bit different, because while I can start it just fine via > keyboard shortcut, it finds only two programs, "env" and "sh". > > > I have been asking several times on #guix if anyone can help me, but > was not able to successfully put what I was told into practice. > > Essentially, I was told to "source /etc/profile". I tried to do that > for .bashrc and .profile, but that didnt help, because I dont have > similar problems in the command-line/shell, only in emacs. > > Then I was told to "source /etc/profile" from a file such as .xinitrc > / .xsessions, which I tried but which also didnt work because gdm > stayed in place via the system configuration (there has been a helpful > HOWTO by Alex Kost, which I might try as well if nothing else helps). > > Before writing, I have experimented with the (extra-arguments > '("source /etc/profile")) in the (xorg-configuration), but this led my > system to not start anymore, so I rolled back. > > > Any help or pointer is greatly appreciated. I hope I have provided the > necessary information, otherwise feel free to ask. > > Thank you guys in advance, so far I am stoked by how great a community > guix is, and how awesome guix itself is :) > > Greetings, > > Olivier -- GPG Key ID: 7BC158ED Use `gpg --search-keys lambdatronic' to find me Protect yourself from surveillance: https://emailselfdefense.fsf.org ======================================================================= () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments Why is HTML email a security nightmare? See https://useplaintext.email/ Please avoid sending me MS-Office attachments. See http://www.gnu.org/philosophy/no-word-attachments.html
Hello everyone :)
so I figured out what the problem was and am super happy it had nothing
to do with Guix but was related to my Emacs init file.
The culprit was in the (custom ...)-form. I had (exec-path) defined to
values Guix probably couldn't use properly. Deleting (exec-path ...)
from the customs solved the issue completely.
I couldn't be more happy. Again, one step closer towards migration :)
Have a good day, thanks for your effort,
Ollivier
On 03.01.21 17:21, Pierre Neidhardt wrote:
> Hi,
>
> You most probably have an issue with your dotfiles.
> Some comments below:
>
> Olivier Rojon <o.rojon@posteo.net> writes:
>
>> --8<---------------cut here---------------start------------->8---
>> #!/usr/bin/env bash
>> . /etc/profile &
>> . ~/.bashrc &
>> exec exwm
>> --8<---------------cut here---------------end--------------->8---
> Remove the trailing `&`. This syntax is used to start processes in the
> background, but here you are sourcing configuration files which should
> be done synchronously.
>
>> - I had manually defined PATH in .bashrc, which I believe might have
>> overriden other attempts at defining it (even though it contains :$PATH
>> at the end)
> It may have a typo. Try commenting out any modification done to PATH
> and try again.
>
>> - I did what is sometimes advised when you install a package, that you
>> should add the following lines to your shell:
>>
>> --8<---------------cut here---------------start------------->8---
>> GUIX_PROFILE="/home/hapster/.guix-profile"
>> . "$GUIX_PROFILE/etc/profile"
>> --8<---------------cut here---------------end--------------->8---
>>
>> However, I had not added an "export" in front of "GUIX_PROFILE", which
>> might be part of the problem.
> Nope, it should not matter if the second line was applied properly.
>
>> But as you can see, I am kind of struggling to find the cause of the
>> problem. ;-)
> Try creating a new user with no modifications done to the dotfiles.
> Then import your dotfiles gradually do see which one triggers the issue.
>
> Cheers!
>