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 > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-23-2008, 04:58 PM
Benjamin Leggett
 
Default Non-interactive bash help?

Alright guys, I'm a beginner in need of a little shell help.

What I want to do is make fbrun (the run dialog for fluxbox) aware of
my bashrc. Upon perusing the source, I found that fbrun execs the given
string with $SHELL if set, otherwise /bin/sh is used. My $SHELL is set
to bash so fbrun runs the command with a non-interactive bash shell
(the "-c" option.)

Checking the bash manpage, I found that bash apparently checks the
environment variable $BASH_ENV for an rc file if it's run with the -c
option. I sure that I should probably know this, but where should I set
this variable? I considered dropping something in /etc/env.d, but that
didn't work, and I don't know if that's the right way to do it.

Any help appreciated,

Ben Leggett


--
When in doubt, parenthesize. At the very least it will let some
poor schmuck bounce on the % key in vi.
-- Larry Wall in the perl man page
 
Old 04-23-2008, 05:01 PM
Albert Hopkins
 
Default Non-interactive bash help?

On Wed, 2008-04-23 at 12:58 -0400, Benjamin Leggett wrote:
> Alright guys, I'm a beginner in need of a little shell help.
>
> What I want to do is make fbrun (the run dialog for fluxbox) aware of
> my bashrc. Upon perusing the source, I found that fbrun execs the
> given
> string with $SHELL if set, otherwise /bin/sh is used. My $SHELL is set
> to bash so fbrun runs the command with a non-interactive bash shell
> (the "-c" option.)
>
> Checking the bash manpage, I found that bash apparently checks the
> environment variable $BASH_ENV for an rc file if it's run with the -c
> option. I sure that I should probably know this, but where should I
> set
> this variable? I considered dropping something in /etc/env.d, but that
> didn't work, and I don't know if that's the right way to do it.
>
> Any help appreciated,

I guess my question would be why do you (think you) want to run
your .bashrc? That's really designed for setting up interactive stuff.



--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-23-2008, 05:21 PM
Benjamin Leggett
 
Default Non-interactive bash help?

On Wed, 23 Apr 2008 12:01:24 -0500
Albert Hopkins <marduk@letterboxes.org> wrote:

> On Wed, 2008-04-23 at 12:58 -0400, Benjamin Leggett wrote:
> > Alright guys, I'm a beginner in need of a little shell help.
> >
> > What I want to do is make fbrun (the run dialog for fluxbox) aware
> > of my bashrc. Upon perusing the source, I found that fbrun execs the
> > given
> > string with $SHELL if set, otherwise /bin/sh is used. My $SHELL is
> > set to bash so fbrun runs the command with a non-interactive bash
> > shell (the "-c" option.)
> >
> > Checking the bash manpage, I found that bash apparently checks the
> > environment variable $BASH_ENV for an rc file if it's run with the
> > -c option. I sure that I should probably know this, but where
> > should I set
> > this variable? I considered dropping something in /etc/env.d, but
> > that didn't work, and I don't know if that's the right way to do it.
> >
> > Any help appreciated,
>
> I guess my question would be why do you (think you) want to run
> your .bashrc? That's really designed for setting up interactive
> stuff.
>

Well, I'd like to have fbrun use my aliases.
e.g., running foo instead of foo --bar --baz=noo
 

Thread Tools




All times are GMT. The time now is 01:10 AM.

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