1

I recently installed EndeavourOS, followed by Sway

I've added ~/scripts/screenshot.sh however dmenu is not finding it, so tried adding ~/scripts to my path environment however none of my approaches are adding it for dmenu

Since then I've:

  • set permission with chmod 777 ~/scripts/screenshot.sh
  • ensured ownership of screenshot.sh using chown to my user
  • created .bashrc, .bash_profile, .profile, .xprofile, .xinitrc, .session, .xsesson with the $PATH to include the scripts folder (I know a lot of these are redundant but they were all the files I found from other posts with same issue)
  • if I add/update a config, before a reboot I do rm -f ~/.cache/dmenu_run (there's no other dmenu file)

Debugging steps

  • From the terminal, printenv shows the correct PATH
  • From the terminal, screenshot.sh works from any path
  • From dmenu, echo $PATH > /tmp/path is missing the additional PATH
  • From dmenu, echo $SHELL > /tmp/shell shows /bin/bash
  • From dmenu, who > /tmp/who shows it as my user
  • Copying screenshot.sh to /usr/bin, which is in the $PATH, dmenu found it and it worked

My understanding is dmenu is running a different shell but I don't know why it's not picking up any of my config files (e.g. .bashrc, .bash_profile, etc.)

What else can I check or do?

4
  • use the full path, if you use ~/ that is always relative to the thing running it, not you. Using ~/ is just asking for trouble, this is a common issue with for example cron joibs. Rather than guess, use the true full path, then if you hit further issues, you don't have to guess as to the cause and solution, you've already excluded the main issue.
    – Lizardx
    Commented Mar 8, 2023 at 23:40
  • Which file is sway launched from? Are your changes to $PATH applied before sway is run?
    – user208716
    Commented Apr 12, 2023 at 2:18
  • I've setup EndeavourOS with Sway out of the box. I'm using the default LightDM login method. It says it will check ~/.profile wiki.archlinux.org/title/LightDM#Environment_variables Commented Apr 13, 2023 at 3:36
  • My environment picks up the .profile using bash if [ -d "$HOME/scripts" ] ; then PATH="$HOME/scripts:$PATH" fi Commented Apr 13, 2023 at 3:43

0

You must log in to answer this question.

Browse other questions tagged .