Re: [dev] [dmenu] running shell scripts in dmenu
Em sex, 4 de jan de 2019 às 10:50, Leonardo Taccari <iamleot_AT_gmail.com>
> Maybe that PATH (with the `/home/caio/scripts') is not seen by
> dmenu (and probably all other X11 applications invoked from dwm).
> This depends how X11 was started.
>
> (If no other dmenu-s is running and your operating systems support
> a procfs you can probably check that via something like:
>
> % sleep 5 && cat /proc/`pgrep dmenu`/environ
>
> ...and then invoke dmenu in the next 5 seconds!)
Hum, not sure if I understand that command. When I try to run it it
just gives me
cat: /proc//environ: no such file or directory
(Not sure if this is the right message in english, my shell is in portuguese)
> PS: No reboot should be needed! :) (if you adjust your ~/.profile
> or similar what can be needed is to logout, kill X11 and then
> login, but no reboot should be needed!)
The old trick of turning off and on again ;) I rebooted anyway just to be sure.
Em sex, 4 de jan de 2019 às 10:51, Storkman <storkman_AT_storkman.xyz> escreveu:
> So you didn't test this script?
> Are you sure it's actually executable?
Yes, it works if I run it from st. I just wrote it from memory because
since it is a one liner it was easier for me to do that
Em sex, 4 de jan de 2019 às 11:01, Markus Wichmann <nullplan_AT_gmx.net> escreveu:
> How are you starting dwm? If you are using a display manager (a
> graphical login), check on how it logs you in. It is possible it doesn't
> start a shell to start dwm, so then the bashrc is never run. I have no
> idea how to solve that problem. I think you might try to put that into
> ~/.profile, but I'm not sure.
>
> I run dwm from startx. So I know all the variables present in the first
> shell started from the login will be present in dwm, and therefore also
> in dmenu.
That's it! Yes, I'm unfotunately still runing a display manager:
lightdm. I'm slowly getting rid of the bloat but I tried to remove the
package yesterday (I'm running Arch linux) but for some reason startx
didn't work. But, anyway, it turns out you do have an idea on how to
solve the problem! From the Arch Linux wiki:
"If you are migrating from xinit, you will notice that the display is
not launched by your shell. This is because, as opposed to your shell
starting the display (and the display inheriting the environment of
your shell), LightDM starts your display and does not source your
shell. LightDM launches the display by running a wrapper script and
that finally exec's your graphic environment. By default,
/etc/lightdm/Xsessions.conf is run."
LightDM does check ~/.xprofile, though. So I added the path (together
with other programs I want to launch at starrtup, such as slstatus),
and it now works.
Thank you very much!
Caio
Received on Fri Jan 04 2019 - 17:17:12 CET
This archive was generated by hypermail 2.3.0
: Fri Jan 04 2019 - 17:24:07 CET