Moving from Windows: Q1 - Desktop links to devices

BACKGROUND:
I loved Windows7, I could handle Windows10, but I refuse to move to WIndows11. So my choices are to either take a clone of my OS Drive when support ends or try moving to a Windows-friendly version of Linux. Which is why I purchased a copy of Zorin Pro and am trying it out. But I have some questions which I could not find the answers to, so I will be asking them on this Forum one at a time. Hopefully I will end up with an OS that can replace Windows.

Question 1:
I installed Zorin Pro, added SMB so that I could specify which Workgroup the other Windows devices belong to (not WORKGROUP) and started looking at the network.

I have several other devices on my home network: a few Windows10 PCs and laptops, and a handful of QNAP NAS devices. This question will be about the NAS boxes and the volumes on them.

As an example, one of my NAS (call it NAS1) has several volumes on it such as eBooks, Install (for my installation files), Pictures (for my photos), etc. In Windows, I can create a link to NAS1 (the device) on my desktop and when I click on it it would bring up File Manager which would list the volumes I could access. In Zorin, I cannot seem to create a desktop link to the devices. Instead I have to go into Files, open browse the network to open the device and then the individual volumes (having previously saved the user ID/password to access it). At which point (if I configured the desktop that way) the mounted volume would appear on the desktop. This approach would end up generating a lot of icons on the desktop, and I would have to either add each and every one of the volumes in fstab or re-mount them as necessary each time I reboot. Not ideal.

Is there a way to create a link on the Zorin desktop to each DEVICE (not mounted volume) so that I can double-click the device icon to open the list of volumes on that device (and then open the relevant volume)?

Thank you.

Since no one has answered yet, but I'm not familiar with it either, I'll link a thread on this topic. Perhaps it will help you.

1 Like

Hi and welcome.
I'm no expert either. This from Bravec A.I. search engine via mojeek (used Ubuntu 22.04 in search as Zorin 17 is a fork of it):

Create Desktop Links to QNAP

To create desktop links to a QNAP NAS device and its volumes on Ubuntu 22.04, you can follow these steps:

  1. Access Shared Folders : Use the NFS or Samba protocols to access shared folders on your QNAP device. For example, using Samba, you can mount a shared folder with the format smb://username@device_ip_address/ .

  2. Create a Desktop Shortcut : Once you have mounted the shared folders, you can create a desktop shortcut to access them easily. Here’s how you can do it:

  • Right-click on the desktop and select "Create Launcher".
  • In the "Name" field, enter a name for the shortcut, such as "QNAP Shared Folder".
  • In the "Command" field, enter the path to the mounted folder. For example, if your shared folder is mounted at /mnt/qnap , you can use nautilus /mnt/qnap where nautilus is the file manager for GNOME desktop environments.
  • Optionally, you can choose an icon for the shortcut by clicking on the "Browse" button and selecting an icon file.Alternatively, you can create a .desktop file manually. Here’s an example of a .desktop file for a QNAP shared folder:
[Desktop Entry]
Name=QNAP Shared Folder
Comment=Access QNAP Shared Folder
Exec=nautilus /mnt/qnap
Icon=folder
Terminal=false
Type=Application
Categories=Utility;

Save this file with a .desktop extension, for example, qnap_shared_folder.desktop , and place it in ~/.local/share/applications/ or /usr/share/applications/ to make it available system-wide.

  1. Mounting the Shared Folder at Startup : To ensure that the shared folder is mounted automatically at startup, you can add an entry to the /etc/fstab file. For example, using NFS, you can add a line like this:
#       192.x.x.x:/path/in/qnap /mnt/qnap nfs defaults 0 0

Replace 192.x.x.x with the IP address of your QNAP device and /path/in/qnap with the path to the shared folder on the QNAP device. After adding the line, run sudo mount -a to mount the folder immediately or reboot the system for the changes to take effect.

By following these steps, you can create desktop links to your QNAP NAS device and its volumes on Ubuntu 22.04, making it easy to access your shared folders directly from the desktop.

AI-generated answer. Please verify critical facts."
[/quote]

I'm no expert either. This from Bravec A.I. search engine via mojeek (used Ubuntu 22.04 in search as Zorin 17 is a fork of it):

Create Desktop Links to QNAP

To create desktop links to a QNAP NAS device and its volumes on Ubuntu 22.04, you can follow these steps:

  1. Access Shared Folders : Use the NFS or Samba protocols to access shared folders on your QNAP device. For example, using Samba, you can mount a shared folder with the format smb://username@device_ip_address/ .

  2. Create a Desktop Shortcut : Once you have mounted the shared folders, you can create a desktop shortcut to access them easily. Here’s how you can do it:

  • Right-click on the desktop and select "Create Launcher".
  • In the "Name" field, enter a name for the shortcut, such as "QNAP Shared Folder".
  • In the "Command" field, enter the path to the mounted folder. For example, if your shared folder is mounted at /mnt/qnap , you can use nautilus /mnt/qnap where nautilus is the file manager for GNOME desktop environments.
  • Optionally, you can choose an icon for the shortcut by clicking on the "Browse" button and selecting an icon file.Alternatively, you can create a .desktop file manually. Here’s an example of a .desktop file for a QNAP shared folder:
[Desktop Entry]
Name=QNAP Shared Folder
Comment=Access QNAP Shared Folder
Exec=nautilus /mnt/qnap
Icon=folder
Terminal=false
Type=Application
Categories=Utility;

Save this file with a .desktop extension, for example, qnap_shared_folder.desktop , and place it in ~/.local/share/applications/ or /usr/share/applications/ to make it available system-wide.

  1. Mounting the Shared Folder at Startup : To ensure that the shared folder is mounted automatically at startup, you can add an entry to the /etc/fstab file. For example, using NFS, you can add a line like this:
#       192.x.x.x:/path/in/qnap /mnt/qnap nfs defaults 0 0

Replace 192.x.x.x with the IP address of your QNAP device and /path/in/qnap with the path to the shared folder on the QNAP device. After adding the line, run sudo mount -a to mount the folder immediately or reboot the system for the changes to take effect.

By following these steps, you can create desktop links to your QNAP NAS device and its volumes on Ubuntu 22.04, making it easy to access your shared folders directly from the desktop.

AI-generated answer. Please verify critical facts."

Donct forget to download the unofficial manual for Zorin 17:

Thank you for the replies, but this does not address my initial query: all the answers were for adding folders/mounts to the desktop when I want to add devices to the desktop.

To recap -
Now that I have entered the userid/password in Files and told it to remember them, I can access the contents of my NAS by doing the following:
(1) Click on the "Home" icon on my desktop. This opens the File Manager.
(2) At the bottom of the left-hand list is "+Other Locations". When I click on this I am presented with a list of devices which I can access. (e.g. "Computer", "NAS-001", etc...)
(3) When I click on "NAS-001", I am presented with a list of the mounts/volumes available on that device. (e.g. "Backup", "Media", "Public", etc...)
(4) When I click on one of the volumes, (say "Backup") I then see the list of folders in that volume (e.g. "Documents", "eBooks", etc).

What I want to do is create a "NAS-001" desktop item which, when clicked, will take me straight to step #3 (i.e. a file manager window with a list of Volumes for the relevant device). NOT step #4 (list of folders for a volume).

It's easy to do in Windows, but it appears impossible in Linux (or at least in Zorin).

When your NAS01 is mounted, can you right-click in the filemanager on your device NAS01 and send it to the desktop?
Do you have enabled the gnome extensions "Zorin icons on desktop" or "Add to desktop" so that you can put links on the desktop?

1 Like

When your NAS01 is mounted, can you right-click in the filemanager on your device NAS01 and send it to the desktop?
Do you have enabled the gnome extensions "Zorin icons on desktop" or "Add to desktop" so that you can put links on the desktop?

Hi Forpli,
When I right-click the NAS, I do not get a "send to desktop" option in the menu.
As for the gnome extension, considering I have no idea what you are describing I will assume I have not enabled these items. However, I can drag-and-drop URLs from Firefox or Chrome and it creates items on the desktop.

When you can create icons on the desktop, then you have enabled it. Usually it should be enabled by default in Zorin.
I am sorry that the suggestion does not work. I can't try it out because I don't have a network.
The only other idea I can think of is to link the volumes individually to the desktop and then create a folder on the desktop called NAS001 and move them there.

If you access through the file manager, Nautilus, you'll have to go through the remote host first and then select which folder you want to access. You can create a bookmark for that location after the fact and pin it to the sidebar, but you'll be somewhat limited to use the file manager instead of a shortcut elsewhere in your computer.

You can set it up manually as per this post:

Before you attempt those steps, give it a quick test running these commands manually yourself and see if it works as expected (you will find "Terminal" in the applications menu), just make sure to replace the relevant details to your own:

sudo mount -t cifs "//192.168.1.10/Backup" /home/zenzen/Desktop/my_folder -o username=admin,password=admin

For instance, you need to specify the correct IP address of your NAS and the location you want to access. Then, you need to specify the location you want to mount it. In this example I'm using a folder called "my_folder" inside my Desktop. Make sure that the folder already exists as it won't create it automatically for you. And, of course, use the appropriate username and password.

Welcome to the Forum..... :smiley:

Again, I want to create a shortcut to the DEVICE, not to the VOLUMES.
I sometime change the volumes on a device, adding or deleting. I do not want to have to re-mount all of these when, in Windows, I can just double-click a link on my descktop which takes me to the device directly.

If by "device" you mean the top level directory, that itself contains all other sub-directories, you could try to simply specify that as a single forward slash (/), which is the canonical way of representing the root of a file system.

The command would be the same, but omitting the specific directory:

- sudo mount -t cifs "//192.168.1.10/Backup" /home/zenzen/Desktop/my_folder -o username=admin,password=admin
+ sudo mount -t cifs "//192.168.1.10/" /home/zenzen/Desktop/my_folder -o username=admin,password=admin
                                    ^ just the root

I've just tried this with an NFS share on my computer and it works, but it's just showing regular folders, not device information. This is what I would expect; not sure if it's what you're after.

More annoyingly, though, it's making a mess in the file manager's sidebar for some reason:

On the left-hand side, the connection at the bottom is the one that originates from Nautilus itself. Above there are three other shortcuts, one for each level of nesting.

So, I'm going to guess this isn't very practical, at least with the current version of Gnome. The next iterations are supposed to have much better integration for network devices.

Just tried the above as:

sudo mount -t cifs "//192.168.0.211/" /home/neoculture/Desktop/NAS-003 -o username=neoculture,password=abc

and got:

mount error(22): Invalid argument

And all I need to do in Windows is right-click the NAS icon in File Explorer. I find it hard to believe that Windows has a better handle on network devices than Linux. :frowning:

The folder where you want to mount the drive, in this case "NAS-003", needs to exist already. Did you create it in advance?

But it's also quite possible that you can't mount the root of the shared like you can with NFS. I'm not that familiar with SMB shares.

There's probably some more details about the error in the logs. Try running the mount command again and if there's still an error after ensuring the target folder exists, run:

sudo tail -n 100 /var/log/kern.log

To see the last 100 messages (should be more than enough to capture any logs produced by this error).

The SMB protocol is developed by Microsoft.

Add NAS Shortcuts in Ubuntu 22.04

To add different NAS device shortcuts that become active when a device is added and automounts in Ubuntu 22.04, you can configure the system to automatically mount the NAS devices at startup and create shortcuts for them. Here are the steps:

  1. Configure Automounting : Use the /etc/fstab file to automatically mount NAS devices at startup. Add an entry for each NAS device in the format:
    0 0

For example, to mount an NFS share, you can use:

192.168.1.5:/nfs /media/nfs nfs rw,suid,dev,exec,user,sync,_netdev,user=1000,x-systemd.after=network-online.target,x-systemd.device-timeout=5s,x-systemd.automount 0 0

This entry ensures that the NFS share is mounted after the network is online and with a timeout of 5 seconds.6

  1. Create Shortcuts : After mounting the NAS devices, you can create shortcuts for them. One way to do this is by creating .desktop files for each NAS device. Place these files in ~/.local/share/applications/ or /usr/share/applications/ to make them accessible.For example, to create a shortcut for the NFS share mounted at /media/nfs , you can create a file named nfs_share.desktop with the following content:
[Desktop Entry]
Name=NFS Share
Comment=Shortcut to the NFS Share
Exec=nautilus /media/nfs
Icon=network-drive
Terminal=false
Type=Application
Categories=Utility;Network;

Save the file and make it executable:

chmod +x ~/.local/share/applications/nfs_share.desktop
  1. Automatically Create Shortcuts : To automatically create shortcuts when a NAS device is added, you can use a script that runs on device addition. This script can check for mounted devices and create shortcuts accordingly. Place the script in a location that is executed when a device is added, such as /etc/udev/rules.d/ .For example, you can create a script named create_shortcuts.sh that runs on device addition:
#!/bin/bash
for mount_point in $(findmnt --output TARGET --noheadings); do
    if [ -d "$mount_point" ]; then
        # Create a .desktop file for the mount point
        desktop_file="$HOME/.local/share/applications/$(basename $mount_point).desktop"
        echo "[Desktop Entry]" > "$desktop_file"
        echo "Name=$(basename $mount_point)" >> "$desktop_file"
        echo "Comment=Shortcut to the $(basename $mount_point)" >> "$desktop_file"
        echo "Exec=nautilus $mount_point" >> "$desktop_file"
        echo "Icon=network-drive" >> "$desktop_file"
        echo "Terminal=false" >> "$desktop_file"
        echo "Type=Application" >> "$desktop_file"
        echo "Categories=Utility;Network;" >> "$desktop_file"
        chmod +x "$desktop_file"
    fi
done

Save the script and make it executable:

chmod +x /path/to/create_shortcuts.sh

Then, create a udev rule to run the script when a device is added:

ACTION=="add", RUN+="/path/to/create_shortcuts.sh"

Save the rule in /etc/udev/rules.d/99-nas-shortcuts.rules .

By following these steps, you can ensure that NAS devices are automatically mounted and shortcuts are created for them when they are added to the system.56

AI-generated answer. Please verify critical facts."

I thank everyone for their replies, but you are ALL giving me advice for the wrong question.

Once again: I am not looking at creating a link to a SHARE or a VOLUME, I am looking to create it to a DEVICE. A MACHINE on my network.

NAS-003 is (surprise) a NAS. It contains volumes, shares, etc as AFP, SMB and NFS shares. The shares and volumes sometime change as my requirements change. I do not want an icon on my desktop that point to those shares which I need to mount individually (manually or automatically), I want an icon that points to the DEVICE.

I'll repeat my original request once again:
In windows, I can go to my Network Device, right-click on the NAS-003 device and "send" it to my desktop. This means that on my desktop I have an Icon which, when open, which show me whatever shares or volumes I currently happen to have on the NAS device. Same as if I had done this the long way via File-Exporer -> Network Devices -> NAS-003.

Now Zorin (and I asume most Linux installs) allows me to do the same "File -> Network Device -> NAS-003" to see whatever available shares/volumes are on the NAS. What I want is an icon on the desktop that takes me to that point automatically. NOT to a specific mount/share/volume.

Please, I do not need to know how to mount individual shares/volumes - I already know how to do that. I just want a shortcut to the device itself.

I thank you for your reply and will attempt this solution as soon as I get back from the office.

Many thanks.

OK. Had to do a quick

sudo apt install nfs-kernel-server

first as nfs wasn't installed for some reason. Add the following line to /etc/fstab

192.168.0.211:/nfs /media/nfs nfs rw,suid,dev,exec,user,sync,_netdev,user=1000,x-systemd.after=network-online.target,x-systemd.device-timeout=5s,x-systemd.automount 0 0

Finally, do a

sudo mount /media/nfs

to end up with

mount.nfs: access denied by server while mounting 192.168.0.211:/nfs

I tried using

192.168.0.211:/ /media/nfs ....

and even

192.168.0.211 /media/nfs ....

with the same results, although that last one gave me

mount.nfs: remote share not in 'host:dir' format

instead

While I had success with:

/192.168.0.211/Media /media/cifs cifs rw,suid,dev,exec,user,sync,_netdev,username=........

this again links to a specific share/folder/volume on the device.

No file sharing applications are installed by default, (that includes Samba). I came across NFS using Plasma, as it was easier to setup than Samba. That said I think I was pushing my expectations too far when trying to backup my good ladies ancient machine's /home to my /home on a PC in a different room - the transfer kept crashing. In the end I had to resort to piggy-backing her drive in my machine and copying across before restoring by piggy-back once more having loaded Q4OS to replace MX-Linux xfce!

I do not understand: if the File Manager (either Files or Thunar) can display the list of volumes on a device without having to first mount the volumes/shares, why can't I have a link or shortcut on my desktop that takes me to that same point?

At this time, with Zorin failing to provide my initial requirement, it looks like I'll have to go back to Win10 and do an "upgrade" to Win11 (which I really didn't want to do) in order to keep this functionality.