Skip to main content

Thread: .bashrc not sourced when running bash script from unity dash


i upgraded 11.10 , decided try out using unity while, instead of classic menu. have few programs need run variables set in .bashrc, , able create bash script run program , point launcher @ script make sure program ran right env variables (as per https://help.ubuntu.com/community/howtoaddalauncher). worked classic menu.

however, if use unity dash find , run launcher (which runs script) .bashrc apparently not sourced. if run script directly terminal fine (as expected), if run nautilus have same problem. script simply:

#!/bin/bash
spyder

i've tested exporting env variables directly in script, , explicitly sourcing either ~/.bashrc or relevant files .bashrc sources. works except explictly sourcing ~/.bashrc.

else run or similar issues (and know how fix them)?

well, solved own problem, helpful else. apparently shell invoked non-interactive, ~/.bashrc isn't sourced. don't remember having before, maybe has changed type of shell invoked? (i'm not sure).

in case, fix had start script off with:

#!/bin/bash -i

hope helps else out there...


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Desktop Environments [ubuntu] .bashrc not sourced when running bash script from unity dash


Ubuntu

Comments

Popular posts from this blog

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support