You are not logged in.
Pages: 1
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
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
Offline
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
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
You can add it to .xsessionrc...
if [ -d $HOME/bin ]; then
export PATH="$HOME/bin:$PATH"
fi
bunsenlabs 8) forum mod squad
Offline
Thanks @hhh! I was hunting because I couldn't remember all the details of that discussion.
Offline
Bug marked WONTFIX...
https://bugs.debian.org/cgi-bin/bugrepo … bug=636108
bunsenlabs 8) forum mod squad
Offline
Anyway, here's the link to it.
http://crunchbang.org/forums/viewtopic.php?id=39135
Offline
Bug marked WONTFIX...
https://bugs.debian.org/cgi-bin/bugrepo … bug=636108
That sucks.
And yes, I noticed this as well.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
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
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
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
Thanks all {)
BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator
Offline
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
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
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
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
I guess you didn't read the thread or your not using lightdm.
bunsenlabs 8) forum mod squad
Offline
Sorry, yes you are correct.
Jessie doesn't have a ~/bin directory, so naturally, they won't care about this.
Offline
^ Waldorf will have a ~/bin directory, primarily because that's where the Contemplative Boss (me) puts his scripts.
Offline
I create a ~/bin folder for all the Live images I have built. I have too many personal scripts to not have one.
Offline
^ Waldorf will have a ~/bin directory, primarily because that's where the Contemplative Boss (me) puts his scripts.
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
Offline
^ No, that was not I. Most of my scripts are just avconv fragments.
Offline
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
Pages: 1
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