guyblade.com #/


PSN
Gamercard


2007 Jun 05 celes


Guy Blade Guy Blade---06:31:00


"Run Command" behavior like Windows
A little earlier, I commented that I was annoyed that I couldn't just "Run Command" a firefox window. After poking around a little bit, I realized that it was because the of the way mozilla-launcher handles URL parameters. For anyone that's interested, all you have to do is change the try_running function in the mozilla-launcher bash script. My ugly hack for fixing it is below. I've testing it approximately not at all (aside from the fact that it seems to do what I want it to do), so YMMV.





try_running() {

declare s retval=2 # default == can't find an instance



# Try mozilla-xremote-client on each candidate screen.

for s in "${candidates[@]}"; do

DISPLAY=$s $remote -a ${progname} "$@"

retval=$?

if [[ $retval -eq 0 ]]; then

candidates=("$s") # for future calls

return 0

fi

done

# OK, now try again and see if we should prepend http://

if [[ $retval -eq 3 ]]; then

for s in "${candidates[@]}"; do

loc=$(expr index "$@" "\(")

words=$@

DISPLAY=$s $remote -a ${progname} "openURL(http://${words:$loc}"

retval2=$?

if [[ $retval2 -eq 0 ]]; then

candidates=("$s") # for future calls

return 0

fi

done

fi





# Might as well do this error interpretation here

case $retval in

1) echo "Unable to connect to X server" >&2 ;;

2) echo "No running windows found" >&2 ;;

3) echo "Browser doesn't understand command" >&2 ;;

*) echo "Unknown error $retval from mozilla-xremote-client" >& ;;

esac



return $retval

}









Published by XPost


Permalink to this post     Com/0
Guy Blade Guy Blade---05:48:00


n800w Linux
So, I mentioned earlier this week that I installed Gentoo on my Rose laptop. Thus far, it has been going reasonably well. I'm getting the full 1600x1200 resolution; I have a working media player, needed IDEs, etc. Now, there only appear to be three problems left to solve.



Firstly, I haven't been able to get the official ATI drivers working for the video card. The main problem is that I can't use the hardware OpenGL acceleration. I haven't yet had anything that I really want to run in OpenGL, but that will likely change.



Secondly, the W200 network driver is very buggy. It has a tendency to randomly drop connection (especially after an extended on time). Worse yet, it occasionally causes hard locks when it is being initialized. This is especially problematic if I turn it off and back on again after one of the random connection drops.



Finally, I've yet to figure out how to spawn firefox to a webpage from the "Run Command" dialog. It seems that if firefox is already running, calling firefox again does nothing. I'll probably poke around for at it a bit more. Overall, I'm rather happy with the setup.



Published by XPost


Permalink to this post     Com/0

Archive
Copyright 2002-2024 Blade Libergnosis//Powered By Blogger