Results 1 to 7 of 7

Thread: How do I work with .URL files?

  1. #1
    Join Date
    Feb 2013
    Beans
    16

    How do I work with .URL files?

    I am a recent convert from the Windows 7 system. I am used to being able to click on a .URL file and it would load up into my FireFox application. I tried to associate these URL file types with Firefox now
    in Ubuntu and when I click on a file, the application just keeps opening tabs one after another. Is there a way I can simply get these files to work with firefox? Also I couldn't get Chrome to work with them either. Thanks.

  2. #2
    Join Date
    Jan 2007
    Location
    Location: Location:
    Beans
    1,246
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do I work with .URL files?

    http://ubuntugenius.wordpress.com/20...using-firefox/ <-- This is likely what you're looking for.
    clear && echo paste url and press enter; read paste; (youtube-dl $paste) | zenity --progress --title="" --text "Downloading, please wait" --auto-close --pulsate && ans=$(zenity --file-selection); gnome-terminal -x mplayer "$ans"

  3. #3
    Join Date
    Feb 2010
    Location
    WI USA
    Beans
    9,929
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How do I work with .URL files?

    Hi, johnu1960

    If I understand correctly open with another application in the right click context menu may help when you select the file/document . I don't know if you are referring to .html files or some thing else.
    Infinite diversity in infinite combination.

    Ubuntu Documentation Search: Popular Pages
    Ubuntu: Security Basics
    Ubuntu: Manual

  4. #4
    Join Date
    Jan 2007
    Location
    Location: Location:
    Beans
    1,246
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do I work with .URL files?

    Doing some more reading on this and it looks like the fix listed above stopped working around Lucid. I'll keep an eye out, sad that Microsoft felt the need to create this .url format, god forbid something standard was kept standard.
    clear && echo paste url and press enter; read paste; (youtube-dl $paste) | zenity --progress --title="" --text "Downloading, please wait" --auto-close --pulsate && ans=$(zenity --file-selection); gnome-terminal -x mplayer "$ans"

  5. #5
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,472
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do I work with .URL files?

    Isn't it just a couple of binary characters and then a URL? What's stopping you from opening the files in a text editor and just copying and pasting the URL into Firefox? Or creating a simple launcher using "xdg-open <url>"?
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

  6. #6
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    5,469
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How do I work with .URL files?

    Try creating a script like this (a text file containing two lines):
    Code:
    #!/bin/sh
    firefox $(grep -m1 'URL=.*' $1 | cut -d= -f2-)
    then make it executable (right click it end edit the properties)
    and then right-click a .url file and edit its properties so that it is always opened by the script you just made.

  7. #7
    Join Date
    Feb 2013
    Beans
    16

    Re: How do I work with .URL files?

    Thanks to everyone for your replies. I have been busy at work this week so I am just getting to this now.

    Cog, I created the text file you suggested and saved it in my home folder. The file is called URLopen and it has a type of shell script (application/x-shellscript). The permissions were set to allow executing file as program. But when I right click on a .url file, it does not list the newly created script, URLopen, as one of the options. How do I get the script to show up in Opens With?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •