• Home
  • SEM
    • PPC
    • SEO
    • How To
  • Bangladesh
  • School
    • HTTP
    • REP
    • Bots n’ htaccess
    • Source Code
    • Excel 2010
    • HTML XHTML Entities
    • Gmail Operators
    • HTML & ASCII
  • About
    • Privy
    • About This Blog
  • Contact
  • বাংলা

Saidul Hassan

Digital Marketing Evangelist

Home / Linux Mint / How to Open .URL files in Linux Mint/Ubuntu

How to Open .URL files in Linux Mint/Ubuntu

22 Oct, 2016 By Saidul Hassan · Filed Under: Linux Mint

how to open .url file in linux
.url files are Internet Explorer shortcut created on Windows desktops. Linux counterparts are .desktop files. No idea about Mac, yet. The solution below is suitable for you if double-clicking the .url opens in Firefox serves your purpose. I’m hardcore fan of Firefox despite its annoying and degrading performance each day.

.URL Windows shortcut file looks like this:
[InternetShortcut]
URL=https://saidulhassan.com/?p=1029

.DESKTOP linux shortcut files like this:
[Desktop Entry]
Encoding=UTF-8\nIcon=text-html
Type=Link
Name=RFI
URL=https://saidulhassan.com/?p=1029

Now, if you’re like me, recently moved from windows to linux (Mint 17.1 Cinnamon in my case) and now wondering how to directly open all those internet shortcuts without writing/using complex bash scripts or manually edit each files in text editors to match the conventions as shown above- there is an Easter egg solution!

Are you familiar with Thunar File Manager? My distro came with Nemo. Ubuntu comes with Nautilus. If you are using any ubuntu derivatives, simply install it sudo apt-get install thunar. Don’t worry, it’s just a one-off task which means you can uninstall Thunar once our purpose is done. But I use Thunar’s bulk renaming features and thats why I’m keeping it. Another good complementary tool for bach renaming is pyRenamer. They both have their unique features and I use both, but thats a different topic and I will share that in another post.

So here is the steps:

STEP 1: Open Thunar file browser >> Right-click a .url file >> Select: “Open With” >> “Open With Other Application” >> Select/Click on “Use a custom command”. A text entry field will appear.

STEP 2. Copy/paste the following custom command to the text entry field:

bash -c “cat %f | grep URL | cut -d’=’ -f2 | xargs firefox &”

STEP 3. Click the default checkbox, then press Open. Your URL will now open in Firefox.

To make .url files work in Nemo/Nautilus, do absolutely nothing. Thunar already did all the filetype association work, so Nemo/Nautilus should now open .url files in Firefox. No extra steps required!

You can now uninstall Thunar if you wish.

Source: Trogdor from www.xfce.org
Resources:
01. Long version using bash scripts, creating dektop shortcuts etc. most of which goes over my head. http://steronius.blogspot.com/2013/01/open-url-files-in-linux.html
02.Firefox addon that works on both Windows and linux to create internet shortcuts accordingly- SaveLink by prudnik https://addons.mozilla.org/en-us/firefox/addon/savelink/

Link to this post!
The following two tabs change content below.
  • Bio
  • Latest Posts
My Twitter profileMy Facebook profileMy Google+ profileMy LinkedIn profileMy Instagram profileMy Pinterest profile

Saidul Hassan

Managing Partner at Up Arrow Consulting
COO at Up Arrow Consulting, MCC manager, & Technical SEO consultant. Certified Google Partners and Microsoft Bing Ads Accredited Professional, Python enthusiast, wannabe SysAdmin. Graduated from School of Management & Business Administration (SOMBA), Khulna University.
My Twitter profileMy Facebook profileMy Google+ profileMy LinkedIn profileMy Instagram profileMy Pinterest profile

Latest posts by Saidul Hassan (see all)

  • Batch script to create directories & moving fixed number of files to those directories - 30 Apr, 2021
  • How to use PrismJS syntax highlighter on WordPress without plugin - 30 Mar, 2020
  • Download an Entire Website for Offline Viewing - 26 Nov, 2019

Share:

  • Twitter
  • Facebook
  • LinkedIn
  • Pinterest
  • Pocket
  • Email
  • Print

First published on 09 May, 2015 · Last updated 22 Oct, 2016 · Tagged With: .desktop, .url, Firefox, internet shortcuts, linux mint, nautilus, nemo, thunar, ubuntu

Batch script to create directories & moving fixed number of files to those directories

30 Apr, 2021 By Saidul Hassan

How to use PrismJS syntax highlighter on WordPress without plugin

30 Mar, 2020 By Saidul Hassan

Download an Entire Website for Offline Viewing

26 Nov, 2019 By Saidul Hassan

How to color highlight .htaccess files in Xed/Gedit

20 Aug, 2018 By Saidul Hassan

HMA Pro VPN Setup for Multiple Locations without User/Password Every time in Linux CLI

14 May, 2018 By Saidul Hassan

  • ♥ Bangladesh ♥
    Log in · Privacy Policy · Contact
    Copyright © 2011 Saidul Hassan

  • DMCA

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.