Emacs launched from favorites doesn't read .bashrc

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite
1












If I open emacs from the command line, it loads my .bashrc and correctly sets my paths.



M-: (getenv "PATH")


Returns my actual $PATH variable.



If I open emacs from the command line, pin the icon to favorites, close emacs, then open emacs from the favorites panel, it does not load .bashrc and does not correctly set my paths.



M-: (getenv "PATH")


Produces very different results that look like system defaults. This is emacs 27.1 and Ubuntu 18.04.



Questions:



  1. What is happening?

  2. How can I fix it?

  3. What bashrc is being read if not mine?






share|improve this question



















  • Also noting, this caused me tremendous frustration while thinking I had my $GOPATH variable set incorrectly. It was set correctly, and emacs found it in the shell, but emacs.d/init.el did not find it.
    – Mittenchops
    Jun 11 at 21:04










  • What do you mean by "emacs found it in the shell"? My guess is that the emacs started by the .desktop file you pinned to favourites is not started from bash and thus .bashrc is not sourced.
    – danzel
    Jun 11 at 22:13










  • If I M-x shell, and echo $PATH, it is right. But if I M-x getenv it is not right.
    – Mittenchops
    Jun 11 at 22:32










  • My guess remains the same. If you M-x shell, it starts bash, which in turn sources .bashrc (just tested it in Kubuntu 18.04). getenv doesn't start a bash, so .bashrc is not sourced and thus the environment variables exported in .bashrc aren't visible.
    – danzel
    Jun 11 at 22:51










  • Thanks, @danzel. In previous ubuntus, this is the way I would pin things to the launcher, and they would retain the start environment they had when I launched them, as far as I can tell. Is there a new process for adding things to the launcher without breaking them now? Did I do something wrong?
    – Mittenchops
    Jun 11 at 22:54














up vote
0
down vote

favorite
1












If I open emacs from the command line, it loads my .bashrc and correctly sets my paths.



M-: (getenv "PATH")


Returns my actual $PATH variable.



If I open emacs from the command line, pin the icon to favorites, close emacs, then open emacs from the favorites panel, it does not load .bashrc and does not correctly set my paths.



M-: (getenv "PATH")


Produces very different results that look like system defaults. This is emacs 27.1 and Ubuntu 18.04.



Questions:



  1. What is happening?

  2. How can I fix it?

  3. What bashrc is being read if not mine?






share|improve this question



















  • Also noting, this caused me tremendous frustration while thinking I had my $GOPATH variable set incorrectly. It was set correctly, and emacs found it in the shell, but emacs.d/init.el did not find it.
    – Mittenchops
    Jun 11 at 21:04










  • What do you mean by "emacs found it in the shell"? My guess is that the emacs started by the .desktop file you pinned to favourites is not started from bash and thus .bashrc is not sourced.
    – danzel
    Jun 11 at 22:13










  • If I M-x shell, and echo $PATH, it is right. But if I M-x getenv it is not right.
    – Mittenchops
    Jun 11 at 22:32










  • My guess remains the same. If you M-x shell, it starts bash, which in turn sources .bashrc (just tested it in Kubuntu 18.04). getenv doesn't start a bash, so .bashrc is not sourced and thus the environment variables exported in .bashrc aren't visible.
    – danzel
    Jun 11 at 22:51










  • Thanks, @danzel. In previous ubuntus, this is the way I would pin things to the launcher, and they would retain the start environment they had when I launched them, as far as I can tell. Is there a new process for adding things to the launcher without breaking them now? Did I do something wrong?
    – Mittenchops
    Jun 11 at 22:54












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





If I open emacs from the command line, it loads my .bashrc and correctly sets my paths.



M-: (getenv "PATH")


Returns my actual $PATH variable.



If I open emacs from the command line, pin the icon to favorites, close emacs, then open emacs from the favorites panel, it does not load .bashrc and does not correctly set my paths.



M-: (getenv "PATH")


Produces very different results that look like system defaults. This is emacs 27.1 and Ubuntu 18.04.



Questions:



  1. What is happening?

  2. How can I fix it?

  3. What bashrc is being read if not mine?






share|improve this question











If I open emacs from the command line, it loads my .bashrc and correctly sets my paths.



M-: (getenv "PATH")


Returns my actual $PATH variable.



If I open emacs from the command line, pin the icon to favorites, close emacs, then open emacs from the favorites panel, it does not load .bashrc and does not correctly set my paths.



M-: (getenv "PATH")


Produces very different results that look like system defaults. This is emacs 27.1 and Ubuntu 18.04.



Questions:



  1. What is happening?

  2. How can I fix it?

  3. What bashrc is being read if not mine?








share|improve this question










share|improve this question




share|improve this question









asked Jun 11 at 20:22









Mittenchops

73641532




73641532











  • Also noting, this caused me tremendous frustration while thinking I had my $GOPATH variable set incorrectly. It was set correctly, and emacs found it in the shell, but emacs.d/init.el did not find it.
    – Mittenchops
    Jun 11 at 21:04










  • What do you mean by "emacs found it in the shell"? My guess is that the emacs started by the .desktop file you pinned to favourites is not started from bash and thus .bashrc is not sourced.
    – danzel
    Jun 11 at 22:13










  • If I M-x shell, and echo $PATH, it is right. But if I M-x getenv it is not right.
    – Mittenchops
    Jun 11 at 22:32










  • My guess remains the same. If you M-x shell, it starts bash, which in turn sources .bashrc (just tested it in Kubuntu 18.04). getenv doesn't start a bash, so .bashrc is not sourced and thus the environment variables exported in .bashrc aren't visible.
    – danzel
    Jun 11 at 22:51










  • Thanks, @danzel. In previous ubuntus, this is the way I would pin things to the launcher, and they would retain the start environment they had when I launched them, as far as I can tell. Is there a new process for adding things to the launcher without breaking them now? Did I do something wrong?
    – Mittenchops
    Jun 11 at 22:54
















  • Also noting, this caused me tremendous frustration while thinking I had my $GOPATH variable set incorrectly. It was set correctly, and emacs found it in the shell, but emacs.d/init.el did not find it.
    – Mittenchops
    Jun 11 at 21:04










  • What do you mean by "emacs found it in the shell"? My guess is that the emacs started by the .desktop file you pinned to favourites is not started from bash and thus .bashrc is not sourced.
    – danzel
    Jun 11 at 22:13










  • If I M-x shell, and echo $PATH, it is right. But if I M-x getenv it is not right.
    – Mittenchops
    Jun 11 at 22:32










  • My guess remains the same. If you M-x shell, it starts bash, which in turn sources .bashrc (just tested it in Kubuntu 18.04). getenv doesn't start a bash, so .bashrc is not sourced and thus the environment variables exported in .bashrc aren't visible.
    – danzel
    Jun 11 at 22:51










  • Thanks, @danzel. In previous ubuntus, this is the way I would pin things to the launcher, and they would retain the start environment they had when I launched them, as far as I can tell. Is there a new process for adding things to the launcher without breaking them now? Did I do something wrong?
    – Mittenchops
    Jun 11 at 22:54















Also noting, this caused me tremendous frustration while thinking I had my $GOPATH variable set incorrectly. It was set correctly, and emacs found it in the shell, but emacs.d/init.el did not find it.
– Mittenchops
Jun 11 at 21:04




Also noting, this caused me tremendous frustration while thinking I had my $GOPATH variable set incorrectly. It was set correctly, and emacs found it in the shell, but emacs.d/init.el did not find it.
– Mittenchops
Jun 11 at 21:04












What do you mean by "emacs found it in the shell"? My guess is that the emacs started by the .desktop file you pinned to favourites is not started from bash and thus .bashrc is not sourced.
– danzel
Jun 11 at 22:13




What do you mean by "emacs found it in the shell"? My guess is that the emacs started by the .desktop file you pinned to favourites is not started from bash and thus .bashrc is not sourced.
– danzel
Jun 11 at 22:13












If I M-x shell, and echo $PATH, it is right. But if I M-x getenv it is not right.
– Mittenchops
Jun 11 at 22:32




If I M-x shell, and echo $PATH, it is right. But if I M-x getenv it is not right.
– Mittenchops
Jun 11 at 22:32












My guess remains the same. If you M-x shell, it starts bash, which in turn sources .bashrc (just tested it in Kubuntu 18.04). getenv doesn't start a bash, so .bashrc is not sourced and thus the environment variables exported in .bashrc aren't visible.
– danzel
Jun 11 at 22:51




My guess remains the same. If you M-x shell, it starts bash, which in turn sources .bashrc (just tested it in Kubuntu 18.04). getenv doesn't start a bash, so .bashrc is not sourced and thus the environment variables exported in .bashrc aren't visible.
– danzel
Jun 11 at 22:51












Thanks, @danzel. In previous ubuntus, this is the way I would pin things to the launcher, and they would retain the start environment they had when I launched them, as far as I can tell. Is there a new process for adding things to the launcher without breaking them now? Did I do something wrong?
– Mittenchops
Jun 11 at 22:54




Thanks, @danzel. In previous ubuntus, this is the way I would pin things to the launcher, and they would retain the start environment they had when I launched them, as far as I can tell. Is there a new process for adding things to the launcher without breaking them now? Did I do something wrong?
– Mittenchops
Jun 11 at 22:54















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1045712%2femacs-launched-from-favorites-doesnt-read-bashrc%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1045712%2femacs-launched-from-favorites-doesnt-read-bashrc%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491