FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-14-2009, 11:16 PM
"Mike Castle"
 
Default stuff in ~/bin won't run

On Wed, Jan 14, 2009 at 8:33 AM, JoeHill <joehill@teksavvy.com> wrote:
> The funny thing is, I already have this in my .bash_profile:
>
> # set PATH so it includes user's private bin if it exists
> if [ -d ~/bin ] ; then
> PATH=~/bin:"${PATH}"
> fi

I don't think .bash_profile gets sourced when you log in via an
XDM/GDM type session. (After all, when would it, since you don't
really have a login shell.)

Personally, I have it in my .bashrc, though that has it's own set of drawbacks.

If you do some searches about debian and sourcing login shells and
gdm, you'll find more than enough reading material to keep you busy
for hours.

mrc


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-15-2009, 08:24 AM
Tzafrir Cohen
 
Default stuff in ~/bin won't run

On Wed, Jan 14, 2009 at 04:16:57PM -0800, Mike Castle wrote:
> On Wed, Jan 14, 2009 at 8:33 AM, JoeHill <joehill@teksavvy.com> wrote:
> > The funny thing is, I already have this in my .bash_profile:
> >
> > # set PATH so it includes user's private bin if it exists
> > if [ -d ~/bin ] ; then
> > PATH=~/bin:"${PATH}"
> > fi
>
> I don't think .bash_profile gets sourced when you log in via an
> XDM/GDM type session. (After all, when would it, since you don't
> really have a login shell.)


Possible fix:

echo 'if [ $SHELL = /bin/bash ]; then . $HOME/.bash_profile; fi' > /etc/X11/Xsession.d/91bash_profile

This looks all too simple so someone must have thought of it previously
and decided not to use it. Why?

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-15-2009, 09:12 AM
"Dotan Cohen"
 
Default stuff in ~/bin won't run

2009/1/15 Mike Castle <dalgoda+debian@gmail.com>:
> On Wed, Jan 14, 2009 at 8:33 AM, JoeHill <joehill@teksavvy.com> wrote:
>> The funny thing is, I already have this in my .bash_profile:
>>
>> # set PATH so it includes user's private bin if it exists
>> if [ -d ~/bin ] ; then
>> PATH=~/bin:"${PATH}"
>> fi
>
> I don't think .bash_profile gets sourced when you log in via an
> XDM/GDM type session. (After all, when would it, since you don't
> really have a login shell.)
>
> Personally, I have it in my .bashrc, though that has it's own set of drawbacks.
>
> If you do some searches about debian and sourcing login shells and
> gdm, you'll find more than enough reading material to keep you busy
> for hours.
>
> mrc
>

Thanks, Mike. Actually, rather than be busy for hours, I do wish that
there were some document that explains what gets run where, clearly. I
have yet to find one.

--
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-*-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-*-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه*-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-*-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-*-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü
 
Old 01-15-2009, 08:22 PM
Cameron Hutchison
 
Default stuff in ~/bin won't run

Tzafrir Cohen <tzafrir@cohens.org.il> writes:
>On Wed, Jan 14, 2009 at 04:16:57PM -0800, Mike Castle wrote:
>>
>> I don't think .bash_profile gets sourced when you log in via an
>> XDM/GDM type session. (After all, when would it, since you don't
>> really have a login shell.)

>Possible fix:

> echo 'if [ $SHELL = /bin/bash ]; then . $HOME/.bash_profile; fi' > /etc/X11/Xsession.d/91bash_profile

>This looks all too simple so someone must have thought of it previously
>and decided not to use it. Why?

Probably because of this line:
#!/bin/sh

at the start of /etc/X11/Xsession, which is the master script that will
source your 91bash_profile script.

So, $SHELL will not be /bin/bash and $HOME/.bash_profile will not be
sourced. If you try to source .bash_profile unconditionally from there,
any bashisms in it will cause Xsession to fail.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-18-2009, 02:59 AM
Kamaraju S Kusumanchi
 
Default stuff in ~/bin won't run

JoeHill wrote:

> Could you not just give your versions of the apps you want to run
> different names? Would that not be safer? What I've done in the past is to
> add _mine to end of the names, ie. 'todisc_mine'.
>

This approach will be a PITA if you use tab completion. Inputting _ is more
painful (especially after pressing tab 2 times for possible list of
completions). I'd go for a different name.

raju
--
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-19-2009, 12:07 AM
JoeHill
 
Default stuff in ~/bin won't run

Mike Castle wrote:

> On Wed, Jan 14, 2009 at 8:33 AM, JoeHill <joehill@teksavvy.com> wrote:
> > The funny thing is, I already have this in my .bash_profile:
> >
> > # set PATH so it includes user's private bin if it exists
> > if [ -d ~/bin ] ; then
> > PATH=~/bin:"${PATH}"
> > fi
>
> I don't think .bash_profile gets sourced when you log in via an
> XDM/GDM type session. (After all, when would it, since you don't
> really have a login shell.)
>
> Personally, I have it in my .bashrc, though that has it's own set of
> drawbacks.
>
> If you do some searches about debian and sourcing login shells and
> gdm, you'll find more than enough reading material to keep you busy
> for hours.

Or, I could just set it up the way I always used to have it, no GDM (goddamned
display manager?), just a text-mode login.

I used to have an option for 'automatically start X when computer boots', which
I would disable. What is the 'Debian Way' for this?

--
J


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-19-2009, 12:16 AM
JoeHill
 
Default stuff in ~/bin won't run

Mike Castle wrote:

> On Wed, Jan 14, 2009 at 8:33 AM, JoeHill <joehill@teksavvy.com> wrote:
> > The funny thing is, I already have this in my .bash_profile:
> >
> > # set PATH so it includes user's private bin if it exists
> > if [ -d ~/bin ] ; then
> > PATH=~/bin:"${PATH}"
> > fi
>
> I don't think .bash_profile gets sourced when you log in via an
> XDM/GDM type session. (After all, when would it, since you don't
> really have a login shell.)
>
> Personally, I have it in my .bashrc, though that has it's own set of
> drawbacks.
>
> If you do some searches about debian and sourcing login shells and
> gdm, you'll find more than enough reading material to keep you busy
> for hours.

Or, I could just set it up the way I always used to have it, no GDM (goddamned
display manager?), just a text-mode login.

I used to have an option for 'automatically start X when computer boots', which
I would disable. What is the 'Debian Way' for this?

--
J


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-19-2009, 12:22 AM
Ken Irving
 
Default stuff in ~/bin won't run

On Sun, Jan 18, 2009 at 08:07:11PM -0500, JoeHill wrote:
> I used to have an option for 'automatically start X when computer boots', which
> I would disable. What is the 'Debian Way' for this?

Unless you want it for other users, simplest is probably to remove
gdm and install xinit (if not already there) for startx.

--
Ken Irving


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 01-19-2009, 07:53 PM
Chris Davies
 
Default stuff in ~/bin won't run

Dotan Cohen <dotancohen@gmail.com> wrote:
> Thanks, Mike. Actually, rather than be busy for hours, I do wish that
> there were some document that explains what gets run where, clearly. I
> have yet to find one.

Put these lines in your .bashrc and .bash_profile and you'll see what
gets run when

# bashrc
echo "Running bashrc: `date`" >>"$HOME/.bash.log"
test -t 1 && echo "Running bashrc: `date`"

# bash_profile
echo "Running bash_profile: `date`" >>"$HOME/.bash.log"
test -t 1 && echo "Running bash_profile: `date`"


What I find works for me is to put all the "run once" stuff into one file,
and all the "run each time I start a terminal" stuff in the other:

# bashrc
test -z "$DONE_ONCE" && . "$HOME/.bash_runonce"
test -z "$DONE_EACH" && . $HOME/.bash_runeach"

# bash_profile
test -z "$DONE_ONCE" && . "$HOME/.bash_runonce"
test -z "$DONE_EACH" && . $HOME/.bash_runeach"

# bash_runonce
export DONE_ONCE=true
...

# bash_runeach
DONE_EACH=true # NB no "export"
...

Chris


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 03-18-2009, 07:59 AM
Andrei Popescu
 
Default stuff in ~/bin won't run

I know this is old stuff, but...

On Tue,13.Jan.09, 11:10:49, JoeHill wrote:
>
> I'm used to ~/bin being automatically picked up in my path, so therefore I am
> absolutely clueless as to how to add it. Also, considering the potential
> consequences to my system, I would rather not do it the wrong way
>
> This was what came up on a search, is this correct?
>
> export PATH =$PATH:/new/path/to/add

On a new sid install I have this:


,----[ ~/.profile ]
| # ~/.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
`----

and there is no .bash_profile. This works with gdm. On my former system
I had mostly the same stuff in .bash_profile, but had to setup my
terminal emulator to start a login shell (because /bin/sh -> dash).

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
 

Thread Tools




All times are GMT. The time now is 02:18 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org