how to quickly create a symbolic link to the file open in a open window

Asked by Brian Z

I'm running Ubuntu 11.04. Let's say I have a presentation file open in LibreOffice, or a PDF open in document viewer, and that it is buried somewhere deep in my hard drive, maybe on a separate partition from my root file system.

I want to make a symbolic link to this file on my Desktop, without moving the actual file. What is the quickest and easiest way to do this?

Normally what I would do now is either... a) open Nautilus, click around to find my way to the file wherever it is, right click the file itself to make the link, and then drag it to my desktop. Or...b) go directly to the desktop, right click "create launcher", and then again go hunting. Both options can be tedious.

I wish there was something like a "Save as symbolic link..." in the standard File menu. Is there at least a quick way to get the location of the file in an open window to my clipboard to then paste in Terminal?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu ubuntu-meta Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

cd ~/Desktop
ln -s /path/to/file

It will now be on the desktop?

Revision history for this message
Brian Z (brian-zbr) said :
#2

That would work if there is a way to get "path/to/file" automatically to my clipboard or something. My problem is that it is too long and complicated and I don't want to type it out.

Revision history for this message
marcus aurelius (adbiz) said :
#3

no pain no gain. i'm sure you've heard that saying.
no one has invented a machine that will do work for you by reading your mind.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

You can use nautilus scripts, ubuntu-tweak will help this and you can make the menu item using that, using the CLI will teach you but if you want the lazy way and learn nothing then use the scripts.

Can you help with this problem?

Provide an answer of your own, or ask Brian Z for more information if necessary.

To post a message you must log in.