Skip to content

Instantly share code, notes, and snippets.

View R3tr0BoiDX's full-sized avatar
🖨️
Low on cyan!

R3tr0BoiDX R3tr0BoiDX

🖨️
Low on cyan!
View GitHub Profile
@R3tr0BoiDX
R3tr0BoiDX / openDotDesktopFile.py
Last active December 11, 2021 11:41
Opens .desktop files in webbrowser. They are created by Cinnamon, when dropping a link from your webbrowser on the desktop. Windows (and often Cinnamon itself) can't open them. Open a .desktop file with this tool and it will open the URL in your default webbrowser.
import sys
import webbrowser
searchFor = "URL"
file = open(sys.argv[1])
for line in file:
if searchFor in line:
url = line[4:]