Skip to content

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

Closed
@amosbatto

Description

@amosbatto

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions