Find the answer to your Linux question:
Results 1 to 9 of 9
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@mycomputername:/home/myuser>. I was ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! dave`2005's Avatar
    Join Date
    Aug 2005
    Posts
    45

    kpackage and .bashrc


    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@mycomputername:/home/myuser>.

    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.

  2. #2
    Linux Enthusiast
    Join Date
    Jun 2005
    Posts
    668
    The off alias is in YOUR bash profile

    not roots


    I use sudo to shutdown 'sudo halt'

    I have setup a /etc/sudoers so only the user 'kernow' can execute the shutdown command, apart from root that is .

    http://slackwiki.org/Sudo


    "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."

    any reason?

  3. #3
    Just Joined! dave`2005's Avatar
    Join Date
    Aug 2005
    Posts
    45
    The 0ff alias is in my .bashrc and also the one in /root/.bashrc

    logged in as root "0ff" says its not a command, but if i type "source .bashrc" then "0ff" it works, any way to get around this?

    "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."

    any reason?
    Not too sure what you mean, do you mean what did he add to his .bash_profile? (he added the
    Code:
    rm='rm -i'
    alias and
    Code:
    # User Specific environment and startup programs
    PATH=$PATH:/usr/sbin:/sbin
    export PATH
    Or do you mean why didnt i add it to .bash_profile (i couldnt find one and dont know if making one works)

  4. #4
    Linux Enthusiast
    Join Date
    Jun 2005
    Posts
    668
    put it in .bash_profile , make one if it doesnt exist

    if you su ever, use su -

  5. #5
    Just Joined! dave`2005's Avatar
    Join Date
    Aug 2005
    Posts
    45
    thank you

    Any idea why kde isnt working properly?

  6. #6
    Linux Enthusiast
    Join Date
    Jun 2005
    Posts
    668
    no idea, I dont use KDE

    I use installpkg/removepkg/upgradepkg from the command line.

  7. #7
    Just Joined! dave`2005's Avatar
    Join Date
    Aug 2005
    Posts
    45
    I see.

    Thanks for the help

  8. #8
    bin
    bin is offline
    Just Joined!
    Join Date
    Sep 2005
    Posts
    4
    ;hey i am not sure following why you are setting your path when in the profile but you shouldn't really have to. /bin /sbin should already be in your path. anyways slack is a little different and doesn't have a bashrc or bash_profile , that is unless you create them (to answer your first question) try editing /etc/profile. I was just thinking that maybe kpackage might not be in the path you are setting. try
    $whereis kpackage
    and just make sure it is in your path.
    hope this helps

  9. #9
    Just Joined! dave`2005's Avatar
    Join Date
    Aug 2005
    Posts
    45
    whereis kpackage gives me "/opt/kde/bin/kpackage" so /opt/kde/bin/ needs to be added to the path in .bash_profile?

    One other thing, i added konsole to the desktop manually, just using the command "konsole", i noticed that adding it as a shortcut through the menu uses "konsole --ls" need to find out what the --ls is coz it made the stuff in .bashrc and .bash_profile work how i want it to

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •