How do I replicate WinXP shortcut-link folders?

Asked by Bruce MacAlister

How do I replicate WinXP shortcut-link folders? If I could attach a graphic to this query, I'd show you a WinXP folder for one of my projects, antenna simulations. It contains a set of files and directories and "shortcuts" (links) to three applications that I use for the simulations. Trying to do this with Ubuntu Unity or even Xubuntu requires a great deal of clicking, etc to assemble the items I need for the project. In Ubuntu it's very slow and inefficient. I asked a similar question (https://answers.launchpad.net/ubuntu/+source/unity/+question/206559) that recommended Xubuntu but that didn't get me any closer to a solution since I couldn't figure out how to build a similar model there. I have lots of projects and these directories with shortcut-links are very productive.

I really like Unity and would like to be able to drop Windows, especially with Win 8 coming along. I'm seeing lots of smart people in the Ubuntu community, so someone has to have solved this problem. Since I'm still learning Linux-Ubuntu-Unity-Xubuntu, examples would be helpful.

If there is no solution, just tell me and I'll know I need to keep at least one Windows machine running. If you think the developers of Ubuntu would heed this need, tell me that too and how to send in the need.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu unity Edit question
Assignee:
No assignee Edit question
Solved by:
Warren Hill
Solved:
Last query:
Last reply:
Revision history for this message
Thomas Krüger (thkrueger) said :
#1

You can create a so called symlink from one folder to the other.
To do so open the Terminal, use the cd command to change into the target directory and run:

ln -s /path/to/source/directory name

This will create a link called "name" in the directory you are in that points to /path/to/source/directory. You can omit the name to use the original name.

Revision history for this message
Bruce MacAlister (w4bru) said :
#2

Thanks. I'll experiment with it. Is there a way to also link an application into the folder? As I work this I'll keep this question going until I get as close to the solution.

Revision history for this message
Bruce MacAlister (w4bru) said :
#3

First step is going well. Thomas Krüger gave me a real lead. In Unity I right-clicked a directory and found a "make link" option. It built a directory with an arrow in its icon reminiscent of a Windows shortcut. I can right-click it, cut it, move to the directory I really want it in and paste it there.

So now I can gather files and directories into my project directory.

Next step; find a way to put links of applications (programs) into the project file. I'm hopeful that I can replicate that very useful Windows capability.

Revision history for this message
Warren Hill (warren-hill) said :
#4

The reason you can't make links to the applications is probably permissions. Nautilus won't let create a link because it would put that link in the same directory as the application initially and you are not allowed to write there.

Two solutions exist.

1. Make the link in a terminal (CTRL+ALT+T)
    Move to the directory where you want to put your link then use the "ln" command to create the link.
   Note: if you type "man ln" in the terminal (without the quotes you will get a detailed explanation of how to use the command. The same idea works with all system commands and many other programs too.

2. Temporarily promote your self to root. From the run menu (Alt-F2) or in a terminal Enter

gksu nautilus

Inside nautilus (the file manager) you are now a super user and have complete control. You can now change whatever you like. Create the link then put it where you want it. once you close the file manager you will be back to a normal user.

Note: If you go for option 2 be very careful. As root you have total control and could accidenatly move or delete important files and break your system.

Revision history for this message
Bruce MacAlister (w4bru) said :
#5

Thank you Warren Hill. I've done some reading on "ln" to understand it. What's not clear is how I find the "target." In Windows XP it's very clear. You go to the Programs directory, find the "exe" file and use that as the target for the shortcut-link. In Linix it's not so clear what I point to. I'm trying to link to the amateur radio digital app "fldigi". When I try to find what to link to I get this list (from a Search):

/usr/share/doc/fldigi
/usr/share/app-install/desktop/fldigi:flarq.desktop
/usr/bin/fldigi
/usr/share/menu/fldigi
/usr/share/man/man1/fldigi.1.gz
/var/lib/dpkg.backup/info/fldigi.list
/var/lib/dpkg/info/fldigi.list
/var/lib/dpkg.backup/info/fldigi.md5sums
/var/lib/dpkg/info/fldigi.md5sums
/usr/share/locale/es/LC_MESSAGES/fldigi.mo
/usr/share/locale/fr/LC_MESSAGES/fldigi.mo
/usr/share/locale/it/LC_MESSAGES/fldigi.mo
/usr/share/app-install/icons/fldigi.png
/var/lib/dpkg.backup/info/fldigi.postinst
/var/lib/dpkg/info/fldigi.postinst
/var/lib/dpkg.backup/info/fldigi.postrm
/var/lib/dpkg/info/fldigi.postrm
/usr/share/pixmaps/fldigi.xpm
/usr/share/app-install/desktop/fldigi:fldigi.desktop
/usr/share/applications/fldigi.desktop
/usr/bin/fldigi-shell
/usr/share/man/man1/fldigi-shell.1.gz
/usr/share/pixmaps/fldigi-small.xpm

Clearly Linux is much more complex. What do I point to in the "ln" command?

Revision history for this message
Best Warren Hill (warren-hill) said :
#6

OK if you know how to run a command from the command line then its easy.

Open a terminal and type which foo

Replace foo with the name of the application

this will return the target

so for example so I want a shortcut to nautilus

I enter

which nautilus

Response

/usr/bin/nautilus

Next I create a link and call it fm

sudo ln /usr/bin/nautilus fm

Enter my password

Now I can run it as follows

./fm

Done

Revision history for this message
Bruce MacAlister (w4bru) said :
#7

You closed he loop, thank you. I did "which" and then "ln" and got the link in my home directory. I copied it from there to my "project" directory and successfully executed it from there. So I can pretty much replicate the Windows "project" directory with files links and executable (program) links, with the equivalent of Windows shortcuts, albiet in a more complicated way. I plan to document it for me to use. I'll share it once I figure out how that's done for the Ubuntu community.

Revision history for this message
Bruce MacAlister (w4bru) said :
#8

Thanks Warren Hill, that solved my question.