Archive for September 1st, 2008

Chrome

So Google’s launching a new browser called Chrome. It’s based off WebKit which is Apple’s re-do of KHTML which is the HTML rendering engine created for Konqueror, the KDE browser.

If the post is to be believed, it promises to be extremely cool, especially for people with multiple CPUs. The sand-boxing and new javascript engine also sound like big improvements. Too bad it’s windows only for now and hopefully it won’t be one of the many “pay no attention to the evil behind the curtain” Google offerings. The fact that its open source, doesn’t mean that they’ll accept anything from the community, either. We’ll see, I guess.

I also wonder how well a new browser will fare. Opera’s had arguably the best browser out there for years, but no one really cares (including me) even now that it’s free. In one way I’m surprised at Safari’s success, but then it’s less surprising considering the “do what you’re told” mindset of the cult of mac. IIRC, there’s a windows version of Safari, but I don’t know of anyone who uses it nor how well it’s doing.

The competition will hopefully spur innovation and help the browser that I’ve come to like even if I don’t end up using Chrome.

Tags: ,

Be yourself, even when you’re root

Ever run a command only to realize you’re not root but need to be? Of course you have. What if that command was long and painful to create? There’s no reason, Dude, to not have access to your bash history even after becoming root vi ’su’.

function su () {
    local SUUSER=root
    local ORIGU=$USER
    local ORIGG=`groups | awk '{print $1}'`
    if [[ $# -gt 0 ]] ; then
        local char=`echo $1 | cut -c 1`
        if [[ "$char" == '-' ]] ; then
            /bin/su $*
            return $?
        else
            local SUUSER=$1
        fi
    fi
    #append recent history to the history file
    history -a
    /bin/su ${SUUSER} -c "env USER=${SUUSER} HOME=${HOME} ${SHELL}; \
          [ -f ${HOME}/.ICEauthority ] \
          && chown $ORIGU:$ORIGG ${HOME}/.ICEauthority ${HOME}/.viminfo"
    # Clear the history list by deleting all the entries.
    history -c
    # Read the contents of the history file and use them as the current history.
    history -r
}

This function honors the ’su -’ syntax in case you need it. If you have special permissions on your ~/.ICEauthority or ~/.viminfo, you’ll need to make adjustments obviously. Remember that the backslashes need to be the last characters on the line. They’re only there to make it more readable, so feel free to ditch them in favor of a longer line.

Now when you ’su’ or even ’su someotheruser’ you’ll get to keep your own history.

Tags:

Privatized Free Speech

For your information, lady the Supreme Court has roundly rejected prior restraint!

What does the Supreme Court have to do with it, now that it’s privatized?

Tags: