phillbush / xmenu

a x11 menu utility
Other
296 stars 26 forks source link

cannot launch qutebrowser from xmenu #22

Closed pnotz17 closed 3 years ago

pnotz17 commented 3 years ago

here is my xmenu.sh i dont know if this is xmenu related or through qutebrowser but it works through dmenu

!/bin/sh

cat <<EOF | xmenu -r | sh &
File manager    pcmanfm
Terminal    st
Web browser firefox 
Accessories
    feh feh  ~/Pictures/Wallpapers/*
    vim st -e vim
Development
    geany   geany
    keepassxc   keepassxc
Graphics
    gimp    gimp
    xsane-scanning  xsane
Network 
    qutebrowser  /usr/bin/qutebrowser 
    firefox firefox
    transmission    transmission-gtk
    thunderbird thunderbird
Multimedia
    alsa mixer  st -e alsamixer
    mpv mpv
Office
Settings 
    Customize Look & Feel   lxappearance
System 
    htop    st -e htop
Kill    xkill

Leave
    Reboot          reboot
    Shutdown        poweroff
EOF
phillbush commented 3 years ago

xmenu doesn't launch anything, it just prints what the user selects to the stdout. If you pipe its output into sh(1), the shell will cope with the launching.

If you replace your xmenu.sh with the following command, does qutebrowser launches when running it?

echo qutebrowser | sh &
pnotz17 commented 3 years ago

no it still doesnt i mean it seems likeits reading something then fails, its only with qutebrowser i dont know why i have been going at this for a week now i have installed re installed x menu ,deleted the binary debuged qutebrowser , it only launches from dmenu

phillbush commented 3 years ago

If you call xmenu.sh from a terminal, rather than from xclickroot(1), does the problem persist?

pnotz17 commented 3 years ago

xclickroot is in my .xprofile its always running

pnotz17 commented 3 years ago

hold on il test that actually

pnotz17 commented 3 years ago

that launched it

this is in my .xprofile

Autostart

xrandr --output VGA1 --scale 1.25x1.25 & picom -b & ~/.fehbg & xset dpms 600 900 1200 xset r rate 350 60 /home/user/dwm/dwmbartext.sh & xclickroot -r /home/user/xmenu/xmenu.sh &

Keymap

!/bin/sh

setxkbmap "us,gr" -option "grp:alt_shift_toggle"

Custom Resolution

!/bin/sh

xrandr --newmode "1408x792_60.00" 90.75 1408 1480 1624 1840 792 795 800 823 -hsync +vsync xrandr --addmode VGA1 1408x792_60.00

dwm restart loop

while true; do

#/usr/local/bin/dwm 2> /dev/null

done

pnotz17 commented 3 years ago

even if i switch xclickroot to start first in xprofile it doesnt make a diff ,running ./xmenu.sh from term launches quteb that way, i dont get it

phillbush commented 3 years ago

So the problem is in your setup.
Your .xprofile (or other file such as .xinitrc or whatever other file your window manager or display manager sources) seems to set an environment variable or call a program that set things up for qutebrowser. That's probably why calling xmenu.sh earlier doesn't launch qutebrowser (stuff haven't set up for qutebrowser yet), but calling xmenu.sh on a terminal launches it (stuff are already set up once you've fully logged in).

You need to look for shell scripts your window manager, desktop environment and/or display manager sources.
What display manager and window manager/desktop environment do you use?
Look on the Arch Linux wiki for the files those program sources.

pnotz17 commented 3 years ago

i am on arch wm dwm xmonad qtile display manager lxdm

so what exactly do i search so i can fix this issue are u talking about Environment variables

phillbush commented 3 years ago

On your .xmenu.sh file, replace the line calling xmenu with the following line and then, after logging up, try to open qutebrowser from xmenu.

cat <<EOF | xmenu -r | sh >$HOME/log 2>&1 &

This will generate a log file on your $HOME directory, post the content of it here.

pnotz17 commented 3 years ago
[359808:359808:0101/233555.435442:FATAL:credentials.cc(302)] : No child processes (10)
sh: line 1: 359808 Trace/breakpoint trap   (core dumped) qutebrowser
phillbush commented 3 years ago

I have no idea why qutebrowser cannot be launched from a script that is ran earlier in the log in process.

I think you should open an issue on qutebrowser's repo with the title “qutebrowser does not run when launched from script executed at logging in” and link this thread there, explaining that you run a script in your ~/.xprofile (which is sourced by your display manager right after you log in) and that this script launches qutebrowser by printing qutebrowser into sh standard input when you click on its option on the menu. Also remember to post the content of log.

Since this does not seem to be a problem related to xmenu, I'm closing this issue.

pnotz17 commented 3 years ago

thank you