Announcement

Collapse
No announcement yet.

Kubuntu 22.04 Dolphin file manager and .desktop links help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [RESOLVED] Kubuntu 22.04 Dolphin file manager and .desktop links help

    Greetings Kubuntu community!

    Trying to get several 'filename.desktop' links working. Setup up several samba shares on another machine and attempting to create short cut link on desktop. Samba links work. The only issue I am having is if I mouse click on the 'filename.desktop' icon on my actual Desktop, it indicates 'Access Denied'.

    It is almost as if the Desktop links are not associated with any particular program. With that thought I did associate .desktop files with Dolphin but still gives me 'Access Denied'.

    Now, I can open Dolphin and go to my Desktop file and click on the .desktop file and it will open with no issue. I can also right click on the file on my actual Desktop, go to properties then the URL tab and click the small directory right of the link path and this works as well.

    Seems as if it's a small setting somewhere I seem to be missing. Thanks in advance for any feedback. -Mike​

    #2
    Try deleting ".desktop" from the icon's name - worked for me on another distro

    Comment


      #3
      Originally posted by hallergard View Post
      Try deleting ".desktop" from the icon's name - worked for me on another distro
      Thanks for the suggestion but that does not work.

      Comment


        #4
        How did you get the icons on the desktop?

        And, is your desktop layout set to "Desktop" or "Folder View"? IMO the latter pretends you are back in the 1990s on a Mac, or on Windows trying to look like that. The "Desktop" layout is more widget-oriented.

        If you are using Folder View, in a konsole if you go to the folder (by default it's "Desktop", IIRC) and run it with
        Code:
        kioclient exec ./[I]name[/I].desktop
        you might see what's going wrong (you might see a bunch of warnings too).

        .desktop files are ordinary text files that are mostly easy to understand, you might look in them to see what they're trying run.
        Regards, John Little

        Comment


          #5
          Originally posted by jlittle View Post
          How did you get the icons on the desktop?

          And, is your desktop layout set to "Desktop" or "Folder View"? IMO the latter pretends you are back in the 1990s on a Mac, or on Windows trying to look like that. The "Desktop" layout is more widget-oriented.

          If you are using Folder View, in a konsole if you go to the folder (by default it's "Desktop", IIRC) and run it with
          Code:
          kioclient exec ./[I]name[/I].desktop
          you might see what's going wrong (you might see a bunch of warnings too).

          .desktop files are ordinary text files that are mostly easy to understand, you might look in them to see what they're trying run.
          Thanks for your response John. Below is the results of kioclient command

          Code:
          user@linuxbox:~/Desktop$ kioclient exec ./dj.music.desktop  
          kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found
          ​
          I am in Folder View. Is this a file association issue? As I mentioned before a samba share is where the .desktop link points. It works when I go to the Desktop directory in Dolphin, it works when I right click on .desktop files > properties > URL tab > folder icon right of the url. Also after I access this samba share from any one of the ways just mentioned and enter my samba user/password the .desktop link then begins work. Call me stubborn, but I want to turn on my machine and access the samba share from .desktop link, I don't want to add another step to get this working.

          Thank you for your time in helping me troubleshoot. -vcandy

          Comment


            #6
            Originally posted by vcandy50 View Post
            Below is the results of kioclient command
            Code:
            kf.service.services: KApplicationTrader: mimeType "x-scheme-handler/file" not found
            I get that too, that idea didn't help. Does it work, though?
            Originally posted by vcandy50 View Post
            ​ As I mentioned before a samba share is where the .desktop link points. It works when I go to the Desktop directory in Dolphin, it works when I right click on .desktop files > properties > URL tab > folder icon right of the url. Also after I access this samba share from any one of the ways just mentioned and enter my samba user/password the .desktop link then begins work.
            I didn't understand that Samba stuff. I think it's the samba mount dialogue that doesn't work. If I make sure a Samba share is unmounted, then use kioclient, I get a pop-up with the title "Error -- KIO Client" saying "The file or folder /home/jlittle/smb4k/DELILAH/Public does not exist."

            So this is a Samba question, and I'm a noob there. I think you want to be able to click on a desktop icon that mounts a share if not already mounted, and then opens it.

            I think you'll need a widget, or a plasmoid, or a .desktop file that runs a script that gets the password and mounts the share. There ought to be something that will do the job, but I couldn't find anything. I suggest installing smb4k if you haven't already; it's aimed at users of KDE plasma that use samba.

            (My knowledge of samba and smb4k is a lot more than it was, though that knowledge is mostly knowing better what I don't know. I only use samba to share files with a windows VM.)
            Regards, John Little

            Comment


              #7
              Samba is a pita sometimes.
              I see two choices, and both are somewhat similar.
              Smb4k might be useful, as it can actually mount the share, which I think bypases the while kio client pseudo-filesystem wizardry that an application needs to support (well)
              Mounting the share remove that need. it becomes like any other directory/drive.

              Which leads to the other options, which is to add the share to the fstab so it is mounted at boot automatically.
              A little more work up front perhaps but usually once-and-done

              There are probably a few ways to skin this cat
              https://timlehr.com/auto-mount-samba...stab-on-linux/
              https://linuxhint.com/mount-smb-shares-on-ubuntu/
              https://medium.com/@Josh_Rollins/mou...x-57d6c2fb18e3

              But I *think* Smb4k can do this sort of thing itself in the user's local directories, and run as an autostart application. It won't be done in a 'standard' way blah blah, but it probably should work well for the desired task.

              Having said that, I can't get Smb4k to find my NAS and the test samba share I created that I can see in Dolphin

              Comment


                #8
                Ok... so the file association is the issue, most certainly. I can right click on the desktop on any one of the .desktop files I have created and indicate 'Open With' and by selecting 'Dolphin' my URL's pop up with no problem. The problem is, I can NOT simply click on the .desktop file and get the same results - says, 'Access Denied' to my URL link.

                When I right click on the file and indicate 'Open With > System > Dolphin' I have the option to check box 'Remember application association for all files of type' (application/x-desktop). It does not remember this however. So I then place (application/x-desktop=myfile.desktop) in the mimeapps.list as suggested among 100 sites I have looked at and does nothing.

                Is there anybody out there that can tell me this.
                What mime type, scheme handler, or whatever you want to call it, is the dolphin manager. I assume it is 'application/x-desktop', but maybe not.
                If this defines the application I want to open my files with, where do I place this setting?, There are umpteen different mimeapps.list in both my local directories and global directories. Why are there so many?? And in what directory do I define this??

                Anybody have any clue as to how to configure what appears to be such an elementary setting, where everything works except an accurate and consistent file association, where I want Dolphin to open on the first click a .desktop file that is a link to a URL?

                I don't understand why the gui doesn't hold the setting and why there is no clear instruction, for at least what I have looked at, as to where to properly place the scheme handler...

                Thanks and sorry I sound so frustrated. Me and Linux have a love hate relationship.

                Comment


                  #9
                  So issue has been solved. If I go to SystemSetting>NetworkSettings>WindowsShares the setting asks for 'Default' user and password for network browsing. By adding my samba user/password in these fields, I have access by way of a link or .desktop created file to my samba shares.

                  Me thinks this requires some further investigation however. It seems strange that I can access my samba shares any other way and in the way I designed, meaning click on share and be prompted to access by username/password. The only way this would not work is if I created a .desktop link/url on my actual Desktop, the behavior was that the link to the samba share would indicate 'Access Denied' without prompting for username and password.

                  Comment


                    #10
                    I have similar issue, I made desktop links to XLS files on a samba share (NAS)...

                    double clicking the shortcut yields error message

                    Unable to run the command specified. The file or folder /home/rockandroller/Desktop/2022-Budget.ods does not exist.

                    the actual location is smb://qnap-511/NASDATA/DOCS/__RR/ (a network share that is automatically mounted on boot)



                    ...and I get "file doesn't exist" when I right click and "open with" LibreOffice.

                    BUT,

                    Right click the shortcut, "properties" and click on the >. symbol, the folder opens and I can then open the file by simply double clicking it

                    Comment

                    Working...
                    X