2017-12-09 jj5 – TODO: document this on my blog…
On Debian GNU/Linux 9.1 (stretch) when I try to open an *.desktop (application/x-desktop) link in a browser I get:
A folder named ~/.cache/kioexec/krun/13821_0/ already exists.
A folder named kioexec krun already exists
turned up diddly squat.
I solved the issue (for me) by changing:
System Settings -> Personalization -> Applications -> Default Application s-> Web Browser
Open http and https URLs in an application based on the contents of the URL
Open http and https URLs in the following browser: firefox
RequestHeader unset Authorization
here. Wanted to keep a note of those settings.
this article which said:
Open about:config and disable browser.urlbar.trimURLs. Easy peasy!
Today I read
What is the Meta Refresh Tag? about the HTML Meta Refresh facility, basically:
<meta http-equiv="refresh" content="0;url=https://www.jj5.net/">
rewrite ^/store/view/product/(.*) /store/view.jsp?product=$1 permanent;
Today I needed to figure out how to read some data from a URL that required HTTP Basic Auth. The solution was pretty simple, use
file_get_contents and pass in a configured stream context. I found the following code on the stream_context_create documentation:
$cred = sprintf( 'Authorization: Basic %s',
base64_encode( 'username:password' )
$opts = array(
'http' => array(
'method' => 'GET',
'header' => $cred
$ctx = stream_context_create( $opts );
$data = file_get_contents( $url, false, $ctx );
Today I learned about
headers_list and http_response_code… yay! :)
To download a file from the web and send its contents to standard out, try this:
wget -O - -o /dev/null https://www.unconfusable.com