unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Gary Johnson <lambdatronic@disroot.org>
To: Olivier Rojon <o.rojon@posteo.net>
Cc: help-guix@gnu.org
Subject: Re: EXWM: file or program not found, ls
Date: Tue, 05 Jan 2021 19:18:26 -0500	[thread overview]
Message-ID: <87zh1mq5nx.fsf@disroot.org> (raw)
In-Reply-To: <48099c1e-63b9-d252-bb48-8c11f90a45ee@posteo.net>

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


      parent reply	other threads:[~2021-01-06  0:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31 12:41 EXWM: file or program not found, ls Olivier Rojon
2021-01-02 14:17 ` Pierre Neidhardt
2021-01-03 15:12   ` Olivier Rojon
2021-01-03 16:21     ` Pierre Neidhardt
2021-02-06 13:47       ` Olivier Rojon
2021-01-02 21:56 ` Vladimir Sedach
2021-01-06  0:18 ` Gary Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zh1mq5nx.fsf@disroot.org \
    --to=lambdatronic@disroot.org \
    --cc=help-guix@gnu.org \
    --cc=o.rojon@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).