[kdepim-users] launching MS-Windows shortcuts from Konqueror

PaulFransen send.me at xs4all.nl
Sun Jul 20 09:56:03 BST 2008


I have a large number of MS-Windows internet shortcuts which I would like to 
keep on using from within Konqueror. It took me some time to figure this out 
so I am reporting here how it can be accomplished.

I have modified the script that can be found at
	http://ubuntuforums.org/showthread.php?t=324517
into a script which I named mswinurl-launch:

#! /bin/bash
#
# MSWindows .url files may have different levels of complexity. The web
# address searched for is always of the format: URL=http[and so on]
# tr filters out the end-of-line and carriage return characters.
# The caret makes grep search for a beginning of line.
# The quotes surrounding $1 are needed to accomodate url filenames
# containing spaces.
FFOPENURL=$(grep -a -G ^URL=* "$1" | tr '\r' '\n')
firefox ${FFOPENURL#*=}

Obviously, Firefox can be substituted by Konqueror for web browsing as well: 
replace the last line by: kfmclient openURL ${FFOPENURL#*=}



Then, the script should be associated with the .url file type:

1.	Open Konqueror, select Settings > Configure Konqueror
2.	Select File Associations and then url
3.	The url file type is listed as a text association, but aan application 
association is needed.
	3.1	Click on the button Add (the one under the pane displaying x-mswinurl).
	3.2	Enter x-mswinurl
	3.3	Select application as the Group.
	3.4	Click another Add button (the one under Filename Patterns) and add the 
extensions *.url and *.URL.
	3.5	Enter Internet shortcut in the field Description.
	3.6	Click another Add button (the one under Application Preference Order) and 
select the program [path to script]mswinurl-launch
	3.7	As the icon, select the shining blue globe.
	3.8	Press Apply
4.	Delete the text type association and press OK.


Best regards,

Paul.
_______________________________________________
KDE PIM users mailing list
kdepim-users at kde.org
https://mail.kde.org/mailman/listinfo/kdepim-users



More information about the kdepim-users mailing list