Well , i am in the "Scripts" Section , and know i see "Super Crate Box" , and i try to install it from the webpage , and
my internet browser , dont have idea , of that protocol called "playonlinux://" , well i remember in the 2014 i make an script for Ace Of Spade , and i make the mime type asociation for the protocol , Here The Script
Well looking my old script , i make this , for make the asociaciotion , with the playonlinux protocol , and why dont put a button in the next version of PlayOnLinux for "Make protocol Asociations" ???
Here i wrote a script for this ( need : locale , grep , sed , rm , playonlinux ) :
#!/bin/bash
Autor ----------------> Inukaze ( Venezuela )
Sitio ----------------> inukaze.wordpress.com
Correo-E -------------> inukaze.otaku@gmail.com
Licensia -------------> GPL 2
#Variables :
MIMESA="$HOME/.local/share/applications/mimeapps.list"
MIMESL=$(cat $HOME/.local/share/applications/mimeapps.list | grep "x-scheme-handler/playonlinux=urlpol.desktop")
MIMESC="$HOME/.local/share/mime"
MIMEPF="$HOME/.local/share/applications/urlpol.desktop"
POLUHS=$(locate playonlinux-url_handler | grep -i "playonlinux-url_handler" | cut -d " " -f02 | head -n 1)
# Configure :
# First Add The Mime Type
if [ -z "$MIMESL" ]; then
sed -i '/\[Default Applications\]/a x-scheme-handler/playonlinux=urlpol.desktop' "$MIMESA"
else
echo "Nothing to do"
fi
# Second check the Desktop File
# For Open File with this protocol exist
# If exist , delete it , else , create it
if [ -e "$MIMEPF" ]; then
rm -rf "$MIMEPF"
else
echo "Not exist the file $MIMEPF , creating . . ."
fi
# Creating The File to Open The Protocol :
echo '[Desktop Entry]
Name=PlayOnLinux
Exec='$POLUHS' '"%u"'
Icon=/usr/share/playonlinux/etc/playonlinux.png
Type=Application
Terminal=false'|tee "$HOME/.local/share/applications/urlpol.desktop" &> /dev/null
# Give permisson of execution
chmod a+o+x "$HOME/.local/share/applications/urlpol.desktop"
# Update the mime database , for appear in the asociations of mime files
update-mime-database $MIMESC
Well , i dont know why this dont work :
$ /usr/share/playonlinux/bash/playonlinux-url_handler playonlinux://www.playonlinux.com/repository/download.php?id=2542
and this wont work too :
$ /usr/share/playonlinux/playonlinux-url_handler playonlinux://www.playonlinux.com/repository/download.php?id=2542 File "/usr/share/playonlinux/python/wrapper.py", line 28
print "ERROR ! Please define POL_OS environment var first."
^
SyntaxError: Missing parentheses in call to 'print'
and well , how i can make the "playonlinux" protocol works for install scripts from the website ???
i think need a better script for "playonlinux-url_handler" , because its not working for me
if someone found a solution for this , please write me :D , via Private Message or Email , please.
Edité par inukaze