You are not logged in.
Hi Everybody,
My $HOME variable is /home/ly. When I start my xfce4-terminal, the PATH is
/home/ly/maven-3.1.1/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/java-8-openjdk/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
My ~/.bashrc is
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
export EDITOR="vi"
My ~/.bash_profile is
export EDITOR=vi
export M2_HOME=$HOME/maven-3.3.3
export GRADLE_HOME=$HOME/gradle
export PATH=$M2_HOME/bin:$GRADLE_HOME/bin:$PATH
My /etc/bash.bashrc is
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
PS1='[\u@\h \W]\$ '
PS2='> '
PS3='> '
PS4='+ '
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
I wonder where the /home/ly/maven-3.1.1/bin comes from.
Thanks.
Solved: The reason for everything is that I used maven-3.1.1 before, had it in .bash_profile, then I upgraded it to maven-3.3.3, modified .bash_profile but didn't log out. That happened about 6 weeks ago and now I forgot I did that.
Last edited by dxxvi (2015-08-12 02:02:03)
Offline
What have you got in /etc/profile.d/? And how do you start xfce?
Offline
If the above doesn't shed any light on the issue, try brute force:
sudo ag maven /etc
Offline
Beware, that ag does not search hidden files (DOT filename) by default. It also didn't find my test words in pacnew files.
Offline
What have you got in /etc/profile.d/? And how do you start xfce?
My /etc/profile.d/ has gpm.sh jre.csh jre.sh locale.sh perlbin.csh perlbin.sh vte.sh and none of those files has anything related to maven. One more strange thing is that my ~/.bash_profile didn't seem to be executed.
I use openbox and start xfce4-terminal with this line in ~/.config/openbox/autostart
( sleep 1s && /usr/bin/xfce4-terminal ) &
If the above doesn't shed any light on the issue, try brute force:
sudo ag maven /etc
That command returns nothing. By the way, does the ag maven /etc give anything different from find /etc -type f | xargs grep maven ?
Thanks.
Offline
I use openbox
Then how do you start openbox or more general how do you start X with whatever environment you use? DMs don't always respect your $SHELL and only execute ~/.profile and/or ~/.xprofile.
Offline
Don't pipe xargs grep, use -exec:
find /etc -type f -exec grep -l $SEARCHTERM {} \;
The -l grep switch outputs the filename instead of the text line. Was it -l? Man yourself. The output of ag is indeed very different. Not only does display and color the text, it searches for all combinations of your search term (upper/lowercase), but does not search hidden files and non-text files by default.
Offline
Then how do you start openbox or more general how do you start X with whatever environment you use? DMs don't always respect your $SHELL and only execute ~/.profile and/or ~/.xprofile.
My computer starts into the command prompt, then I run startx to start openbox. My ~/.xinitrc is exec openbox-session.
Don't pipe xargs grep, use -exec:
find /etc -type f -exec grep -l $SEARCHTERM {} \;
Thanks for that.
Does anybody have any other idea why maven-3.1.1 is in my PATH and why .bash_profile is not executed?
Offline
Offline
Thanks for that link. I just read it but still don't know how to solve my issue. Could you please clarify a little bit?
Offline
You can check htop or run
pgrep -at tty1 bash
assuming you start on tty1.
If you're using systemd, try
loginctl session-status
What's the output of
ls ~/.profile* ~/.bash*
Offline
Maybe you installed maven 2 times, once from the official packages, once just make manual in $HOME dir, or upgraded? Did you manually enter in .bash_profile the exports?
Look at the older version PKGBUILD for maven 3.1.1, where the PATH is being exported to
Offline
You can check htop or run
pgrep -at tty1 bash
That command returns 341 -bash
loginctl session-status
returns
[ly@ArchCustom shm]$ loginctl session-status
c1 - ly (1000)
Since: Sat 2015-08-01 22:09:09 EDT; 1 weeks 2 days ago
Leader: 307 (login)
Seat: seat0; vc1
TTY: tty1
Service: login; type tty; class user
State: active
Unit: session-c1.scope
├─ 307 login -- ly
├─ 341 -bash
├─ 392 /bin/sh /usr/bin/startx
├─ 414 xinit /home/ly/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -auth /tmp/serverauth.NrY9dDVdBN
├─ 415 /usr/lib/xorg-server/Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.NrY9dDVdBN
├─ 419 /usr/bin/openbox --startup /usr/lib/openbox/openbox-autostart OPENBOX
├─ 431 sh /home/ly/.config/openbox/autostart
├─ 432 sh /home/ly/.config/openbox/autostart
├─ 433 sh /home/ly/.config/openbox/autostart
├─ 434 sh /home/ly/.config/openbox/autostart
├─ 437 sh /home/ly/.config/openbox/autostart
├─ 445 tint2
├─ 446 /usr/bin/xfce4-terminal
├─ 447 nm-applet
├─ 448 /usr/bin/gedit
├─ 449 conky
├─ 454 dbus-launch --autolaunch=04afc3e42a744ab09a0bf17758a7dcdd --binary-syntax --close-stderr
├─ 461 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
├─ 468 /usr/lib/at-spi2-core/at-spi-bus-launcher
├─ 473 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
├─ 476 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
├─ 498 /usr/lib/dconf/dconf-service
├─ 502 gnome-pty-helper
├─ 503 bash
├─ 519 /usr/lib/GConf/gconfd-2
├─ 565 bash
├─ 566 bash
├─ 568 bash
├─ 1371 nemo --no-desktop
├─ 2908 bash
├─ 4588 loginctl session-status
├─ 4589 less
├─ 5066 adb -P 5037 fork-server server
├─ 9709 bash
├─10028 bash
├─10314 /usr/lib/virtualbox/VirtualBox
├─10328 /usr/lib/virtualbox/VBoxXPCOMIPCD
├─10334 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
├─30631 firefox-beta-bin -private
└─31234 qbittorrent
Aug 02 02:47:36 ArchCustom crontab[29139]: (ly) REPLACE (ly)
Aug 02 02:47:36 ArchCustom crontab[29139]: (ly) END EDIT (ly)
Aug 02 02:47:39 ArchCustom crontab[29152]: (ly) LIST (ly)
Aug 02 02:49:40 ArchCustom crontab[29197]: (ly) BEGIN EDIT (ly)
Aug 02 02:50:18 ArchCustom crontab[29197]: (ly) REPLACE (ly)
Aug 02 02:50:18 ArchCustom crontab[29197]: (ly) END EDIT (ly)
Aug 02 03:41:49 ArchCustom firefox-beta-bin[450]: getaddrinfo*.gaih_getanswer: got type "DNAME"
Aug 02 03:41:49 ArchCustom firefox-beta-bin[450]: getaddrinfo*.gaih_getanswer: got type "DNAME"
Aug 02 03:59:14 ArchCustom firefox-beta-bin[450]: getaddrinfo*.gaih_getanswer: got type "DNAME"
Aug 02 03:59:14 ArchCustom firefox-beta-bin[450]: getaddrinfo*.gaih_getanswer: got type "DNAME"
ls ~/.profile* ~/.bash*
returns
ls: cannot access /home/ly/.profile*: No such file or directory
/home/ly/.bash_history /home/ly/.bash_logout /home/ly/.bash_profile /home/ly/.bashrc
Maybe you installed maven 2 times, once from the official packages, once just make manual in $HOME dir, or upgraded?Look at the older version PKGBUILD for maven 3.1.1, where the PATH is being exported to
I don't install the maven package. pacman -Q | grep maven returns nothing. The one in $HOME was downloaded manually and unzipped there.
Did you manually enter in .bash_profile the exports?
Yes, I did.
Does anybody have any idea? Thanks.
Offline