Find the answer to your Linux question:
Results 1 to 6 of 6
Hi Guys I've created a symbolic link by doing the following: ln -s /home/oz/rute/index.html /usr/bin/rute However if I type rute I get the following bash: /usr/bin/rute: Permission denied ANy ideas ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Posts
    41

    symbollic link


    Hi Guys

    I've created a symbolic link by doing the following:
    ln -s /home/oz/rute/index.html /usr/bin/rute

    However if I type rute I get the following
    bash: /usr/bin/rute: Permission denied

    ANy ideas how I can get my html page to launch???

    Thanks

  2. #2
    Linux Engineer
    Join Date
    Aug 2004
    Posts
    826
    HTML pages aren't executable. An easy way to open up that page is to setup an alias. In your ~/.bashrc file put something along the lines of
    Code:
    alias rute="/path/to/html/browser /home/oz/rute/index.html"
    If you want to make it system-wide look for the bashrc file in /etc. I think most browsers should know what to do with that alias.

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    Posts
    41
    Follow up.

    I've never created an alias before. Where in bashrc do i put this.

    The following is the contents of the current file:

    Code:
    # /etc/bashrc
    
    # System wide functions and aliases
    # Environment stuff goes in /etc/profile
    
    # by default, we want this to get set.
    # Even for non-interactive, non-login shells.
    if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
    	umask 002
    else
    	umask 022
    fi
    
    # are we an interactive shell?
    if [ "$PS1" ]; then
        case $TERM in
    	xterm*)
    	    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
    	    ;;
    	*)
    	    ;;
        esac
        [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "
        
        if [ -z "$loginsh" ]; then # We're not a login shell
            for i in /etc/profile.d/*.sh; do
    	    if [ -x $i ]; then
    	        . $i
    	    fi
    	done
        fi
    fi
    
    unset loginsh

  4. #4
    Linux Engineer
    Join Date
    Aug 2004
    Posts
    826
    Well, it's probably best not to modify the system-wide bashrc, but if you're sure you're okay with this, just add the alias line to the end.

  5. #5
    Just Joined!
    Join Date
    Mar 2005
    Posts
    41
    OK not to put this in the system bashrc.

    Last thing -do you always put alias at the end of the file.

    Heres my .bashrc file

    Code:
    # .bashrc
    
    PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
    ENV=$HOME/.bashrc
    USERNAME="root"
    export USERNAME ENV PATH
    
    # Source global definitions
    if [ -f /etc/bashrc ]; then
    	. /etc/bashrc
    fi
    
    # enable programmable completion features
    if [ -f /etc/bash_completion ]; then
    	. /etc/bash_completion
    fi
    Thanks for feedback

  6. #6
    Linux Engineer
    Join Date
    Aug 2004
    Posts
    826
    That looks like root's ~/.bashrc. You want to put it in your regular user's ~/.bashrc. And you can add the alias line to the beginning or end, or even in between other lines so long as it doesn't interefere with anything, but just put it at the end to be safe.

Posting Permissions

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