You are not logged in.
Pages: 1
In my session (lxde) i open terminal-emulator sakura and input:
----------
[tenhi@tenhi ~]$ ifconfig
bash: ifconfig: command not found
[tenhi@tenhi ~]$ reboot
bash: reboot: command not found
[tenhi@tenhi ~]$ su
Password:
[root@tenhi tenhi]# ifconfig
bash: ifconfig: command not found
[root@tenhi tenhi]# iwlist
bash: iwlist: command not found
[root@tenhi tenhi]# reboot
bash: reboot: command not found
[root@tenhi tenhi]#
-----
but when i do it in virtual terminals Ctrl+Alt+F1-6 it works.
Could you please help me.
PS i apologize for my english.
Last edited by Tenhi (2010-11-17 22:05:20)
Offline
hm...could you check your $PATH whether you included /bin, /usr/bin, /sbin ?
further, have you checked the accessability of other commands in the same path? can you try to run these skripts/programms using the full path?
Offline
What if you type the full path to those binaries? Perhaps your PATH env variable is messed up?
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
ok
[root@tenhi tenhi]# $PATH
bash: /bin:/usr/bin:/usr/local/bin: No such file or directory
[root@tenhi tenhi]# cat /home/tenhi/.bash_profile
. $HOME/.bashrc
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH
[root@tenhi tenhi]# cat /etc/profile
#
# /etc/profile
#
# This file is intended to be used for ALL common
# Bourne-compatible shells. Shell specifics should be
# handled in /etc/profile.$SHELL where $SHELL is the name
# of the binary being run (discounting symlinks)
#
# Sections taken from SuSe's /etc/profile
# Note the explicit use of 'test' to cover all bases
# and potentially incompatible shells
#Determine our shell without using $SHELL, which may lie
shell="sh"
if test -f /proc/mounts; then
case $(/bin/ls -l /proc/$$/exe) in
*bash) shell=bash ;;
*dash) shell=dash ;;
*ash) shell=ash ;;
*ksh) shell=ksh ;;
*zsh) shell=zsh ;;
esac
fi
# Load shell specific profile settings
test -f "/etc/profile.$shell" && . "/etc/profile.$shell"
unset shell
#Set our umask
umask 022
# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -x $profile && . $profile
done
unset profile
fi
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP
# Man is much better than us at figuring this out
unset MANPATH
[root@tenhi tenhi]#
I don`t understand why it`s usr/local/bin. As you can see i have listed all config files, but i didn`t find it.
Offline
to find the current path use echo $PATH.
remove the PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH, part from .bash_profile (get sourced from /etc/profile)
Offline
Perhaps one of the scripts in /etc/profile.d is borking your PATH
Offline
[tenhi@tenhi ~]$ cat /etc/profile.d/
glib2.csh locale.sh openoffice.sh
glib2.sh mozilla-common.csh perlbin.sh
gpm.sh mozilla-common.sh xorg.sh
[tenhi@tenhi ~]$ cat /etc/profile.d/glib2.csh
setenv G_BROKEN_FILENAMES 1
[tenhi@tenhi ~]$ cat /etc/profile.d/glib2.sh
export G_BROKEN_FILENAMES=1
[tenhi@tenhi ~]$ cat /etc/profile.d/gpm.sh
case $( /usr/bin/tty ) in
/dev/tty[0-9]*) [ -n "$(pgrep gpm)" ] && /usr/bin/disable-paste ;;
esac
[tenhi@tenhi ~]$ cat /etc/profile.d/locale.sh
export LANG=ru_RU.UTF-8
if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\033%%G"; fi
[tenhi@tenhi ~]$ cat /etc/profile.d/mozilla-common.csh
setenv MOZ_PLUGIN_PATH "/usr/lib/mozilla/plugins"
[tenhi@tenhi ~]$ cat /etc/profile.d/mozilla-common.sh
export MOZ_PLUGIN_PATH="/usr/lib/mozilla/plugins"
[tenhi@tenhi ~]$ cat /etc/profile.d/openoffice.sh
export OOO_FORCE_DESKTOP=gnome
#export OOO_FORCE_DESKTOP=KDE4
#export PYTHONPATH=$PYTHONPATH:/usr/lib/openoffice/basis-link/program/[tenhi@tenhi ~]$ cat /etc/profile.d/openoff
cat: /etc/pro: No such file or directory
[tenhi@tenhi ~]$ cat /etc/profile.d/perlbin.sh
# Set path to perl scripts.
# Remove the perlbin dirs in the next release.
# Add dirs to path if they exist.
[ -d /usr/lib/perl5/site_perl/bin ] &&
PATH=$PATH:/usr/lib/perl5/site_perl/bin
[ -d /usr/bin/perlbin/site ] &&
PATH=$PATH:/usr/bin/perlbin/site
[ -d /usr/lib/perl5/vendor_perl/bin ] &&
PATH=$PATH:/usr/lib/perl5/vendor_perl/bin
[ -d /usr/bin/perlbin/vendor ] &&
PATH=$PATH:/usr/bin/perlbin/vendor
[ -d /usr/lib/perl5/core_perl/bin ] &&
PATH=$PATH:/usr/lib/perl5/core_perl/bin
export PATH
# If you have modules in non-standard directories you can add them here.
#export PERLLIB=dir1:dir2
[tenhi@tenhi ~]$ cat /etc/profile.d/xorg.sh
export XDG_DATA_HOME=$HOME/.local/share
export XDG_CONFIG_HOME=$HOME/.config
export XDG_CACHE_HOME=$HOME/.cache
if [ -z $XDG_DATA_DIRS ]; then
export XDG_DATA_DIRS=/usr/share:/usr/local/share
else
export XDG_DATA_DIRS=/usr/share:/usr/local/share:$XDG_DATA_DIRS
fi
if [ -z $XDG_CONFIG_DIRS ]; then
export XDG_CONFIG_DIRS=/etc/xdg
else
export XDG_CONFIG_DIRS=/etc/xdg:$XDG_CONFIG_DIRS
fi
Last edited by Tenhi (2010-11-16 22:28:57)
Offline
You can see from your very first output that /sbin is not included in your $PATH, now we just need to find out why.
I can't really work out what's goin on in your posts, too much information and it's not in [ code ] tags. If you don't mind please edit it down to just the output of the following:
grep PATH /etc/profile.d/*
and place that output in [ code ] tags this time. I'd also get rid of .bash_profile for now, it's obviously not doing anything.
Thanks.
Last edited by brisbin33 (2010-11-16 19:48:59)
//github/
Offline
check .bashrc too
Offline
thestinger, nothing intresting in .bashrc
Offline
i will create new user. Maybe it will be useful.
Offline
Are you using slim?
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
yes.
/etc/slim.conf
[tenhi@tenhi ~]$ cat /etc/slim.conf
# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path /bin:/usr/bin:/usr/local/bin
default_xserver /usr/bin/X
xserver_arguments -nolisten tcp
# Commands for halt, login, etc.
halt_cmd /sbin/shutdown -h now
reboot_cmd /sbin/shutdown -r now
console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd /usr/sbin/suspend
# Full path to the xauth binary
xauth_path /usr/bin/xauth
# Xauth file for server
authfile /var/run/slim.auth
# Activate numlock when slim starts. Valid values: on|off
# numlock on
# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor false
# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
login_cmd exec /bin/sh - ~/.xinitrc %session
#login_cmd exec xinit /usr/bin/ck-launch-session startlxde
# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd some command
# sessionstop_cmd some command
# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon yes
# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions xfce4,icewm,wmaker,blackbox
# Executed when pressing F11 (requires imagemagick)
screenshot_cmd import -window root /slim.png
# welcome message. Available variables: %host, %domain
welcome_msg Welcome to %host
# Session message. Prepended to the session name when pressing F1
# session_msg Session:
# shutdown / reboot messages
shutdown_msg The system is halting...
reboot_msg The system is rebooting...
# default user, leave blank or remove this line
# for avoid pre-loading the username.
#default_user simone
# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password no
# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
#auto_login no
# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme default
# Lock file
lockfile /var/lock/slim.lock
# Log file
logfile /var/log/slim.log
Offline
default_path /bin:/usr/bin:/usr/local/bin
there's the problem!
comment that out (or if slim requires it, put the proper path)
Last edited by thestinger (2010-11-17 20:56:50)
Offline
do you get different results if you su with a hyphen, to pick up your root account's environment?
ie. what comes next if you do this?
[tenhi@tenhi ~]$ su -
Password:
[root@tenhi tenhi]# ifconfig
Offline
thestinger, thank you very much)
phaedrus, no when i do it int X inviroment. When i do it in virtual terminal(Ctrl+Alt+f1-6) it`s normal results. I see that problem in slim.conf.
Offline
i think problem is solved.
Offline
Pages: 1