help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EXWM: file or program not found, ls


From: Gary Johnson
Subject: Re: EXWM: file or program not found, ls
Date: Tue, 05 Jan 2021 19:18:26 -0500

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]