Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-16-2007, 01:16 PM   #1
Registered: Sep 2007
Distribution: Xubuntu 8.04
Posts: 35

Rep: Reputation: 15
Dash ignoring PATH?

My dash shell seems to be ignoring the PATH set in my /etc/environment file. Trying to launch firefox with dash, for example, gives me this message "dash: Can't open firefox". I have to specify "/usr/bin/firefox" for it to work. I'm pretty sure that it didn't work this way before, since some of my shell script are now broken. I could point "/bin/sh" to bash instead (bash still works properly), but I'd like to get to the bottom of this.

I was fiddling with the PATH lately, so that may be the cause. Currently it's like this:
Is there a problem with it?
Old 12-16-2007, 04:21 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,840

Rep: Reputation: 342Reputation: 342Reputation: 342Reputation: 342
A brief search via tells me that dash sources $HOME/.profile. So, check your .profile to see if you have a line like this: set PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/myusername/lejos/bin".
Old 12-18-2007, 01:07 PM   #3
Registered: Sep 2007
Distribution: Xubuntu 8.04
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks for the reply, but that doesn't seem to be working. Am I doing it right? Here is my ~/.profile file (I added the last line):
# ~/.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
#umask 022

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

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then

# added to try to fix path
set PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/myusername/lejos/bin"
Old 12-18-2007, 06:00 PM   #4
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,529

Rep: Reputation: 74
I don't think you are supposed to use set with path

user@system# PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/myusername/lejos/bin

Last edited by exvor; 12-18-2007 at 06:02 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
dash logout script? Coviti Debian 2 09-24-2007 01:40 PM
howto change $PS1 when using su (without dash) remcovr Red Hat 2 09-07-2006 12:20 PM
How to setup the Apple-like dash-board in Gnome yinglcs Linux - Newbie 2 03-12-2006 03:03 AM
What are those double-dash (--) options in man? Utah Linux - Newbie 4 06-04-2004 10:53 PM
Red Hat 8 Dash Character meshcurrent Linux - General 3 02-20-2003 12:51 AM

All times are GMT -5. The time now is 04:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration