LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 09-05-2005, 08:01 PM   #1
dave`2005
Member
 
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266

Rep: Reputation: 30
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 08:05 PM.
 
Old 09-06-2005, 01:04 PM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
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.
 
Old 09-06-2005, 03:37 PM   #3
dave`2005
Member
 
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266

Original Poster
Rep: Reputation: 30
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?
 
Old 09-06-2005, 05:56 PM   #4
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
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.
 
Old 09-06-2005, 06:36 PM   #5
dave`2005
Member
 
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266

Original Poster
Rep: Reputation: 30
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.
 
Old 09-06-2005, 06:39 PM   #6
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
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.
 
Old 09-06-2005, 08:22 PM   #7
dave`2005
Member
 
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266

Original Poster
Rep: Reputation: 30
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 08:33 PM.
 
Old 09-06-2005, 09:34 PM   #8
dave`2005
Member
 
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 266

Original Poster
Rep: Reputation: 30
Nevermind, i put them in /etc/profile.

Thanks gbonvehi for the help and patience
 
  


Reply


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
files deleted and wont uninstall bob_man_uk Red Hat 4 11-06-2005 02:51 PM
KPackage command wont work dave`2005 Linux - Software 2 08-15-2005 08:52 PM
Okay to use Kpackage? MikeZila Slackware 2 10-02-2004 12:21 AM
RealPlayer wont uninstall ckupris Linux - Newbie 2 06-27-2003 02:02 PM
help me with kpackage please Eightball Linux - Software 6 02-19-2003 12:57 PM


All times are GMT -5. The time now is 08:05 AM.

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