Emacs launched from favorites doesn't read .bashrc
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
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:
- What is happening?
- How can I fix it?
- What bashrc is being read if not mine?
18.04 bashrc emacs
 |Â
show 1 more comment
up vote
0
down vote
favorite
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:
- What is happening?
- How can I fix it?
- What bashrc is being read if not mine?
18.04 bashrc emacs
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
 |Â
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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:
- What is happening?
- How can I fix it?
- What bashrc is being read if not mine?
18.04 bashrc emacs
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:
- What is happening?
- How can I fix it?
- What bashrc is being read if not mine?
18.04 bashrc emacs
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
 |Â
show 1 more comment
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
 |Â
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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