Skip to content

The LightDM does not read $HOME/.profile, so $HOME/.cargo/bin is not included in PATH #40354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
amosbatto opened this issue Mar 8, 2017 · 3 comments

Comments

@amosbatto
Copy link

In LInux/UNIX, the installation program for Rust 1.15.1 adds the following line to $HOME/.profile:

export PATH="$HOME/.cargo/bin:$PATH"

This should make make the rustc and cargo commands work without their full paths, but it doesn't work in systems which use LightDM to login. See:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636108
LightDM is the default display manager for Ubuntu (and for Debian and Fedora when installing a Desktop Environment which is not GNOME or KDE), so a sizable proportion of the people who use Linux will encounter this problem.

I have filed a bug report at LightDM, asking that it read $HOME/.profile like other display managers:
https://bugs.launchpad.net/lightdm/+bug/1671026

However, I don't know if that bug will ever get fixed. It would be helpful if the Rust installer would auto-detect whether the system used LightDM to login. If so, also add the following line to $HOME/.xsessionrc :

export PATH="$HOME/.cargo/bin:$PATH"

Unfortunately, it isn't easy to auto-detect the use of LightDM (http://unix.stackexchange.com/questions/20370/is-there-a-simple-linux-command-that-will-tell-me-what-my-display-manager-is), but the installation script should be able to figure it out on the most common Linux/UNIX distributions.

@est31
Copy link
Member

est31 commented Mar 8, 2017

Just note that the bug is fixed on ubuntu. Lightdm sources ~/.profile there: https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/794315

Only pure debian is the problem (and other distros that dont base on ubuntu but use Lightdm obviously).

@nagisa
Copy link
Member

nagisa commented Mar 8, 2017

Report either against cargo or rustup.

See also rust-lang/rustup#478

@steveklabnik
Copy link
Member

Yes, this is the wrong tracker. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants