I know how to create a symbolic link to a folder. However, when you access the target folder (e.g. from a symbolic link on the Desktop), it appears as if the target folder is a child of the Desktop folder. I'd like it to work as in Windows where you actually get to the folder and can see it in its real context.
I've come across similar questions, one of which suggests creating a launcher. I believe this is meant for GNOME/Unity Ubuntu and I'm not sure what the equivalent on KDE would be.
How can I achieve this on Kubuntu 19.10 with KDE Plasma?
Suppose you want a link in
~/Desktop/
to this folder:You can do this with
dolphin
like so:Navigate Dolphin to
~/Desktop
.Right-click → "Create New" → "Link to Location (URL)..."
In the "File name" field, enter "my-project.desktop"
In the "Enter link to location (URL)" field, click the folder icon ("Open file dialog") and navigate to
~/Documents/my-project
, then click "Open".Click "OK".
This will create a link to the folder on the desktop that looks like this:
Double-clicking it will open Dolphin to this path:
You can also move this desktop file to any other directory and it will work just the same.
The contents of the text file are:
This is an example of a Link-type desktop file, which is part of a FreeDesktop standard. If you want to ensure it works the same on other desktops, open it in a text editor and add a
Name
field and change theURL
field to a standardfile://
URL:This works for me in Kubuntu 19.10:
Create the following file in your Desktop folder:
And save it as template.txt.
Now, each time you want to create a folder shortcut on your desktop, edit template.txt and change each occurrence of
---
to whatever is appropriate and save the file with the appropriate prefix with.desktop
as the suffix.Two examples:
Example 1
This will open your
$HOME/Videos
folder:Note: I've changed
Icon=system-file-manager
toIcon=smtube
. You can give the folders distinctive icons by right-clicking on the icon on your desktop, opening Properties and then, in the window that appears, clicking on the icon itself: doing so will allow you to select an icon.Example 2
This will open
/var/log/apt
:And this is how the
.desktop
files in ~/Desktop looks like in konsole:Of course, there are other ways to open specific folders in Dolphin directly.
One way is to specify keyboard shortcuts to open a specific folder. For example, I've set Ctrl+Meta+N to open my Downloads folder.
Another way is to use Rofi. In the image below, I typed
12
. Pressing Enter now would open~/.local/share
in Dolphin. Similarly, I could open~/bin
,~/.config
,~/Downloads
, etc. The same screen also lets me launch certain scripts (that don't need to be run from a terminal), and to open documents.I'm not using kde, but this working with xfce, and you should be able to Create launcher in kde too with
kd-open <full-dir-path>
or
xdg-open <full-dir-path>
for the command and then, use Desktop for the working dir.
BUT if that doesn't work try..
Once opened you can drag anything you want into that dir.
If you're not familiar with the basic file management commands I highly recommend learning the basics.
One other thing that came to mind that may be of use to you is creating an alias in the
.bash_aliases
file.Use
alias <command-name>='xdg-open <full-dir-path>'
or
alias <command-name>='kd-open <full-dir-path>'
and then, source it with
source .bash_aliases
and you will be able to use the alias as a command to open the gui from anywhere i the terminal.
Ctrl+Alt+T should open a terminal emulator.