SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2015-04-07 19:39:16

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

[SOLVED]lightdm messes up $PATH?

I've just switched from slim to lightdm and found my ~/bin scripts weren't working. "echo $PATH" now doesn't show my user's bin.
Exporting PATH in .bashrc doesn't stick between sessions.
Anyone else having this problem, or have I messed something up somewhere?

Similar problem on the Arch forum here

@hhh's thread here might have an answer, but before I delve too deeply, does anyone have a quick fix?

EDIT: Solution

pvsage wrote:
hhh wrote:

You can add it to .xsessionrc...

if [ -d $HOME/bin ]; then
    export PATH="$HOME/bin:$PATH"
fi

From what I've read, this is The Debian Way (TM) to do it, and SLiM was doing it wrong by sourcing .bashrc.  Pretty sure we'll include this in .xsessionrc in /etc/skel in the BunsenLabs live images.

Last edited by damo (2015-04-08 13:18:26)


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

Be excellent to each other!

#2 2015-04-07 19:55:32

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: [SOLVED]lightdm messes up $PATH?

Lightdm does not source .bashrc. We had a discussion about this sometime ago. I'll have to poke around and see if I can find the discussion.

Offline

#3 2015-04-07 19:55:48

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED]lightdm messes up $PATH?

It shouldn't have anything to do with update-alternatives. Is ~/.profile present and does it contain this? ...

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

bunsenlabs     8)     forum mod squad

Offline

#4 2015-04-07 19:58:09

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED]lightdm messes up $PATH?

You can add it to .xsessionrc...

if [ -d $HOME/bin ]; then
    export PATH="$HOME/bin:$PATH"
fi

bunsenlabs     8)     forum mod squad

Offline

#5 2015-04-07 19:59:08

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: [SOLVED]lightdm messes up $PATH?

Thanks @hhh! I was hunting because I couldn't remember all the details of that discussion.  roll

Offline

#6 2015-04-07 20:00:29

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED]lightdm messes up $PATH?


bunsenlabs     8)     forum mod squad

Offline

#7 2015-04-07 20:00:42

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: [SOLVED]lightdm messes up $PATH?

Offline

#8 2015-04-07 20:29:11

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: [SOLVED]lightdm messes up $PATH?

That sucks.  sad

And yes, I noticed this as well.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#9 2015-04-07 20:37:59

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: [SOLVED]lightdm messes up $PATH?

hhh wrote:

You can add it to .xsessionrc...

if [ -d $HOME/bin ]; then
    export PATH="$HOME/bin:$PATH"
fi

From what I've read, this is The Debian Way (TM) to do it, and SLiM was doing it wrong by sourcing .bashrc.  Pretty sure we'll include this in .xsessionrc in /etc/skel in the BunsenLabs live images.

Offline

#10 2015-04-07 20:53:49

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: [SOLVED]lightdm messes up $PATH?

hhh wrote:

You can add it to .xsessionrc...

if [ -d $HOME/bin ]; then
    export PATH="$HOME/bin:$PATH"
fi

I added that ... it works.  Bash scripts in ~/bin are working again.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#11 2015-04-07 21:07:23

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: [SOLVED]lightdm messes up $PATH?

pvsage wrote:
hhh wrote:

You can add it to .xsessionrc...

if [ -d $HOME/bin ]; then
    export PATH="$HOME/bin:$PATH"
fi

From what I've read, this is The Debian Way (TM) to do it, and SLiM was doing it wrong by sourcing .bashrc.  Pretty sure we'll include this in .xsessionrc in /etc/skel in the BunsenLabs live images.

That is what I was figuring, but I thought I'd ask before messing around too much wink

Thanks all   {)


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#12 2015-04-09 00:14:36

Ozitraveller
#! Junkie
From: Less is More!
Registered: 2011-04-26
Posts: 289
Website

Re: [SOLVED]lightdm messes up $PATH?

I checked jessie RC2 and it has ~/.profile file

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

There's no .xsessionrc file.

Offline

#13 2015-04-09 01:06:29

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED]lightdm messes up $PATH?

Ozitraveller wrote:

There's no .xsessionrc file.

That's right, just create it...

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

Admittedly, it's not well documented. man startx doesn't even refer to it.


bunsenlabs     8)     forum mod squad

Offline

#14 2015-04-09 01:14:18

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED]lightdm messes up $PATH?

Ah, see man xsession under "Supplied Scripts"...

/etc/X11/Xsession.d/40x11-common_xsessionrc
Source global environment variables.  This  script  will  source
anything  in  $HOME/.xsessionrc  if  the  file  is present. This
allows the user to set global environment variables for their  X
session, such as locale information..

Last edited by hhh (2015-04-09 01:16:29)


bunsenlabs     8)     forum mod squad

Offline

#15 2015-04-09 02:12:35

Ozitraveller
#! Junkie
From: Less is More!
Registered: 2011-04-26
Posts: 289
Website

Re: [SOLVED]lightdm messes up $PATH?

I don't have  ~/.bash_profile or ~/.bash_login so the ~/.profile should work I assume.

Last edited by Ozitraveller (2015-04-09 03:54:08)

Offline

#16 2015-04-09 02:34:44

hhh
Cityspeak
Registered: 2010-08-04
Posts: 3,253

Re: [SOLVED]lightdm messes up $PATH?

I guess you didn't read the thread or your not using lightdm.


bunsenlabs     8)     forum mod squad

Offline

#17 2015-04-09 03:55:22

Ozitraveller
#! Junkie
From: Less is More!
Registered: 2011-04-26
Posts: 289
Website

Re: [SOLVED]lightdm messes up $PATH?

Sorry, yes you are correct.

Jessie doesn't have a ~/bin directory, so naturally, they won't care about this.

Offline

#18 2015-04-09 05:41:10

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: [SOLVED]lightdm messes up $PATH?

^ Waldorf will have a ~/bin directory, primarily because that's where the Contemplative Boss (me) puts his scripts. smile

Offline

#19 2015-04-09 14:53:42

tknomanzr
#! Die Hard
From: Heavener, OK
Registered: 2014-12-09
Posts: 777

Re: [SOLVED]lightdm messes up $PATH?

I create a ~/bin folder for all the Live images I have built. I have too many personal scripts to not have one.

Offline

#20 2015-04-09 15:39:16

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: [SOLVED]lightdm messes up $PATH?

pvsage wrote:

^ Waldorf will have a ~/bin directory, primarily because that's where the Contemplative Boss (me) puts his scripts. smile

Was it you who wrote the "@script" script, which I use all the time?


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#21 2015-04-09 19:32:15

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 13,970

Re: [SOLVED]lightdm messes up $PATH?

^ No, that was not I.  Most of my scripts are just avconv fragments.

Offline

#22 2015-05-06 00:05:37

DogMatix
Member
From: UK
Registered: 2012-05-04
Posts: 34

Re: [SOLVED]lightdm messes up $PATH?

I found this exact same problem after installing lightdm on my Jessie/Bunsen DIY installation. After some head scratching found this thread and post #4 was the fix.

Thanks.


Your mind will answer most questions if you learn to relax and wait for the answer. - William Burroughs

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo