Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-05-2005, 07:01 PM
|
#1
|
|
Member
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266
Rep:
|
kpackage wont uninstall
Hi all, I tried to uninstall a package using kpackage, it asked me for the root pass as normal but once i entered it, it gives me root@computername:/home/user>.
I was watching someone using bash and they changed some stuff in .bash_profile, i couldnt find the file in my home dir but added stuff to .bashrc instead. Here is my .bashrc:
Code:
PS1="\u@\h:\w> "
export PS1
eval `dircolors -b`
alias ls='ls --color=auto'
alias rm='rm -i'
alias 0ff='shutdown -h now'
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
# User Specific environment and startup programs
PATH=$PATH:/usr/sbin:/sbin
export PATH
unset USERNAME
Is this what has messed up kpackage?
While on the .bashrc subject, the 0ff alias works if i su to root from my normal user but not if i just log in as root. Can anyone tell me where i am going wrong on these 2 problems?
Any help very appreciated.
Last edited by dave`2005; 09-05-2005 at 07:05 PM.
|
|
|
|
09-06-2005, 12:04 PM
|
#2
|
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
I would recommend you to use pkgtool instead of kpackage, just to be on the safe side.
Regarding bash,
That file only applies to the user that owns it, ~ means home directory. So ~/.bashrc applies to the user that has it.
It works when you su to root because values are passed from the user to root.
If you need some global options for bash, use /etc/bashrc or put them in /etc/profile.
|
|
|
|
09-06-2005, 02:37 PM
|
#3
|
|
Member
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266
Original Poster
Rep:
|
Thanks for the help  Gonna try /etc/bashrc or /etc/profile. One thing tho, i put the same .bashrc (one with the 0ff alias) into the /root dir shouldnt that make it work for the root user?
|
|
|
|
09-06-2005, 04:56 PM
|
#4
|
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
It should work, how are you logging as root? Are you using su? If you do, add a - at the end, like su -
That will load login files like bashrc.
|
|
|
|
09-06-2005, 05:36 PM
|
#5
|
|
Member
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266
Original Poster
Rep:
|
Im logging in as root by typing root then the root pass, not using su. When i do that shouldnt the .bashrc in the root folder be working? when logging in like that i cant use the alias "0ff" which is definately in the .bashrc in /root.
|
|
|
|
09-06-2005, 05:39 PM
|
#6
|
|
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145
Rep:
|
Create a file called ~/.bash_profile and put this:
Code:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
That should make bash always read .bashrc
.bashrc is called depending on how you run bash. You can find more info reading bash's man page.
|
|
|
|
09-06-2005, 07:22 PM
|
#7
|
|
Member
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266
Original Poster
Rep:
|
Sorry to be a pain but now when i log in as root i get "-bash: .~/.bashrc: No such file or directory". Ive tried it being called .bashrc, /.bashrc, ~/.bashrc and .~/.bashrc but get the same thing. I think ~/ means the home directory but tried all the strange names anyway. Had a look at the man for bash but couldnt see anything relevant. (  )
Are the .bashrc and .bashprofile in the wrong place (/root/) ?. Does my .bashrc have something wrong with it?
Code:
# .bashrc
# prompt
PS1="\u@\h:\w>"
export PS1
#aliases & color
eval `dircolors -b`
alias ls='ls --color=auto'
alias rm='rm -i'
alias 0ff='shutdown -h now'
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
# User Specific environment and startup programs
PATH=$PATH:/usr/sbin:/sbin
export PATH
unset USERNAME
Last edited by dave`2005; 09-06-2005 at 07:33 PM.
|
|
|
|
09-06-2005, 08:34 PM
|
#8
|
|
Member
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266
Original Poster
Rep:
|
Nevermind, i put them in /etc/profile.
Thanks gbonvehi for the help and patience 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:52 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|