MW

Tag bash - page 2

Recent Posts

Reinstall Nvidia Driver (February 09, 2008)

For those of you, who use the original NVIDIA display driver and have to reinstall it with every kernel update: Here is a little bashscript for your convenience.

    #!/bin/bash
    sudo /etc/init.d/kdm stop
    sudo chvt 1
    sudo sh ~/Downloads/NVIDIA-Linux-x86-*.run --ui='none' -aNq
    sudo /etc/init.d/kdm start
    sudo chvt 7

Save it e.g. as ~/.bin/nv_reinst.sh, make it executable (chmod +x ~/.bin/nv_reinst.sh). Then put your NVIDIA driver (only the newest version please) into ~/Downloads/ (or change the path above). Now run your script.

Attention: Save all your work, since kdm will be stopped! You’ll lose all unsaved work!

continue reading...

open URL a in variable browser (July 22, 2007)

I was recently annoyed by how URLs were started in KDE: I used an antiquated firefox command to run an URL in a new tab (firefox-remote "OpenURL(%u, new-window)") which does the job quite well. But: If you have no running firefox instance this command will simply do nothing. Right - nothing! You’ll have to start firefox manually and click once again on the link (in konversation, kopete or wherever).

But the newer firefox versions (I don’t know when this feature was added) support the firefox -newtab %u command. This is all you need if you only use firefox. Configure KDE via kcontrol to use this command as a standard webbrowser.

This was still not enough for me though, as I regularly switch to konqueror or opera, because firefox is sometimes to slow for a quick browse. This is what I came up with:

open_url script

what it does

Via open_url it is possible to use one of the currently open browsers. If you for example have a running konqueror instance but no firefox it is more likely (in my point of view) to open a new URL in konqueror instead of launching a new firefox instance (which would take a long time).

continue reading...

open URL a in variable browser (July 22, 2007)

I was recently annoyed by how URLs were started in KDE: I used an antiquated firefox command to run an URL in a new tab (firefox-remote "OpenURL(%u, new-window)") which does the job quite well. But: If you have no running firefox instance this command will simply do nothing. Right - nothing! You’ll have to start firefox manually and click once again on the link (in konversation, kopete or wherever).

But the newer firefox versions (I don’t know when this feature was added) support the firefox -newtab %u command. This is all you need if you only use firefox. Configure KDE via kcontrol to use this command as a standard webbrowser.

This was still not enough for me though, as I regularly switch to konqueror or opera, because firefox is sometimes to slow for a quick browse. This is what I came up with:

open_url script

what it does

Via open_url it is possible to use one of the currently open browsers. If you for example have a running konqueror instance but no firefox it is more likely (in my point of view) to open a new URL in konqueror instead of launching a new firefox instance (which would take a long time).

continue reading...