You are not logged in.
Pages: 1
I use gmrun to run graphical programs without having them attached to a console. I would like to use dmenu_run instead, but every time I start a program with dmenu_run, it looks like it creates and forks a bash process.
To illustrate, here is the relevant pstree output from both methods:
Gmrun:
systemd───login───startx───xinit─┬─X
└─openbox───leafpadDmenu_run:
systemd───bash───leafpadIs there any way to have dmenu/dmenu_run fork the WM process like gmrun? (I refer to WM in general because this occurs in DWM as well)
Last edited by DeletedUser210719 (2013-08-10 14:46:12)
Offline
dmenu_run is a very short script. Just edit it. Remove the | ${SHELL:-/usr/bin/bash} on the last line and "exec" the result of the subshell in parentheses.
#!/bin/sh
cachedir=${XDG_CACHE_HOME:-"$HOME/.cache"}
if [ -d "$cachedir" ]; then
cache=$cachedir/dmenu_run
else
cache=$HOME/.dmenu_cache # if no xdg dir, fall back to dotfile in ~
fi
exec $(
IFS=:
if stest -dqr -n "$cache" $PATH; then
stest -flx $PATH | sort -u | tee "$cache" | dmenu "$@"
else
dmenu "$@" < "$cache"
fi
)Last edited by Trilby (2013-08-04 22:45:27)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1