shortcut keys - Run script from i3 config - Ask Ubuntu


i'm using i3-wm , have mod3 working hotkey. have following in './config/i3/config':

#this command works   bindsym mod3+f exec "firefox"   #this doesn't work nor other scripts   bindsym mod3+w exec "openbrowser"  

both of these commands work fine when run them bash 'firefox' command runs hotkey.

openbrowser script in /opt/bin/ in path. tried doing exec "/opt/bin/openbrowser"

note: noticed when i'm in bash if mod3+w cursor blinks, if mod3+[any unset key] key writes it's value screen. seems system @ least trying run function.

apparently i3 uses sh launch stuff, , not source $path ~/.bashrc :

cat ~/.xsession-errors (...) /bin/sh: 1: mycommand: not found 

so, create ~/.xsessionrc file , put in :

if [ -d "/opt/bin" ] ;     path="/opt/bin:$path" fi 

then logout , in ; should work now.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User