This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE applications fail to open target path (URI)

Tags: None
(comma "," separated)
User avatar
MountainX
Registered Member
Posts
56
Karma
0
OS
I'm running Kubuntu 12.04 with KDE 4.11.1. With this KDE update I am seeing a new issue I'll describe below:

I first saw the problem with Dolphin and Kate. Then I noticed it with KSnapshot. I'll describe both because I think it is the same issue.

Kate and Dolphin:

I opened Dolphin as root (using the rootactions service menu) then clicked on a text file. I got a "Sorry" dialog with the message:

KDEInit could not launch /usr/bin/kate

Kate is the default handler for text files.
So I opened a terminal and issued this command as root:

# /usr/bin/kate

That worked and Kate opened as expected.

Furthermore, while I could not open a file with Kate from root Dolphin by clicking on the file, I could open a file with KWrite using the "open with..." context menu selection. But "open with..." Kate failed the same was as clicking the file.

Ksnapshot and Gwenview:

I took a snapshot and saved it to disk. Then I clicked the "Send To..." button and selected Gwenview. Gwenview opens with the following error in a reddish color box:

Loading 'myrealfilename.png failed'
Could not open file
/path/to/myrealfilename.png

However, the file exists and if I click "File > reload" in Gwenview the thumbnail bar shows the image. But clicking on it does not open it. However, if I close Gwenview and then open Gwenview and manually browse to this image, Gwenview will open it correctly.

The same problem exists when I choose "Send to..." imagur from Ksnapshot. I have to ignore/remove the image "sent" automatically (it fails to upload) and I have to manually browse to the image and add it to the imagur dialog. Then I can send it.
User avatar
google01103
Manager
Posts
6668
Karma
25

Sun Sep 22, 2013 5:15 pm
Kate:
Can not duplicate
- as root run: kbuildsycoca4 --noincremental 2> /dev/null

Ksnapshot:
I can duplicate it BUT the name Gwenview is attempting to open is not the name I used to save but that name appended with a 1
-- ex: saved temp.jpg but tries to sendto temp1.jpg and this is for all apps listed
What I'm guessing is happening here is that Ksnapshot is incrementing the automatic name generated because it assumes that a new snapshot was generated after the save operation. If you send to before saving there is no issue. I'd think this is a bug (the dev might disagree) and you should see if it's already posted and if not open a report


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
MountainX
Registered Member
Posts
56
Karma
0
OS

Re:

Sun Sep 22, 2013 6:12 pm
google01103 wrote:Kate:
Can not duplicate
- as root run: kbuildsycoca4 --noincremental 2> /dev/null

I did and there was no visible output in the terminal.
What should I try next?
I still have the issue.

google01103 wrote:Ksnapshot:
I can duplicate it BUT the name Gwenview is attempting to open is not the name I used to save but that name appended with a 1
-- ex: saved temp.jpg but tries to sendto temp1.jpg and this is for all apps listed
What I'm guessing is happening here is that Ksnapshot is incrementing the automatic name generated because it assumes that a new snapshot was generated after the save operation. If you send to before saving there is no issue. I'd think this is a bug (the dev might disagree) and you should see if it's already posted and if not open a report


I'm not good at opening new bug reports. Would you consider opening a bug report? (I have given up on trying after a couple years of frustration. I'd be happy to donate $1 via PayPal to anyone who opens the bug report. And I'll do this for any bug report related to any of my posts.)
User avatar
MountainX
Registered Member
Posts
56
Karma
0
OS

Re:

Sun Sep 22, 2013 6:16 pm
google01103 wrote:Kate:
Can not duplicate
- as root run: kbuildsycoca4 --noincremental 2> /dev/null


I think you may have meant to run the command without redirecting std error...
Code: Select all
# kbuildsycoca4 --noincremental
kbuildsycoca4 running...
Error: "/var/tmp/kdecache-myuser" is owned by uid 1000 instead of uid 0.
kbuildsycoca4(11505)/kdecore (services) KServicePrivate::parseActions: The desktop file "ServiceMenus/show_exif_information.desktop" references the action "" but doesn't define it
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry MimeType in "ServiceMenus/audiofrommovie4.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Actions in "ServiceMenus/audiofrommovie4.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Actions in "ServiceMenus/audioconvert4.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Actions in "ServiceMenus/kim_compressandresize.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Actions in "ServiceMenus/kim_convertandrotate.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Keywords in "k3bsetup.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Categories in "/usr/local/share/applications/BSAMIG-KubiosHRV.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Categories in "/usr/share/applications/kde4/bluedevil-network-dun.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Categories in "/usr/share/applications/kde4/bluedevil-network-panu.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry MimeType in "/usr/share/applications/treeline.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Categories in "/usr/share/applications/im-switch.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry MimeType in "/usr/NX/share/applnk/x-nxclient/nxclient.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Keywords in "/usr/share/applications/firefox.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Categories in "/home/myuser/.local/share/applications/netbeans-7.1.1.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(11505) KConfigGroup::readXdgListEntry: List entry Categories in "/home/myuser/.local/share/applications/netbeans-7.3.desktop" is not compliant with XDG standard (missing trailing semicolon). 
kbuildsycoca4(11505) parseLayoutNode: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
kbuildsycoca4(11505) parseLayoutNode: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
User avatar
MountainX
Registered Member
Posts
56
Karma
0
OS
any ideas about this Kate issue? I would love to troubleshoot the Kate issue further -- I just need some ideas where to start. thanks.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
"Error: "/var/tmp/kdecache-myuser" is owned by uid 1000 instead of uid 0."
That looks bad, I'd fix that. Such things tend to be plausible explanations for all kinds of weird issues...


I'm working on the KDevelop IDE.
User avatar
MountainX
Registered Member
Posts
56
Karma
0
OS
scummos wrote:"Error: "/var/tmp/kdecache-myuser" is owned by uid 1000 instead of uid 0."
That looks bad, I'd fix that. Such things tend to be plausible explanations for all kinds of weird issues...


Thanks! I noticed that and I have searched google for a fix but I cannot find one. You can't just change permissions on tmp files.

Therefore, I think this error is simply a side effect of running that specific command as root instead of as my user. For example, see here: http://ubuntu.5.x6.nabble.com/File-owne ... 94110.html
I don't think it is related to the issue or even important in this specific case. But tell me if I am wrong, please.

BTW, the Python support for KDevelop sounds like a great project!
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS
Hmm, all quite strange. Can you try if you can reproduce the issue as a new user?


I'm working on the KDevelop IDE.
User avatar
MountainX
Registered Member
Posts
56
Karma
0
OS
scummos wrote:Hmm, all quite strange. Can you try if you can reproduce the issue as a new user?


Here is what I learned so far. If I remove the text/plain file association for Kate (using System Settings) and leave KWrite and any others, then restart, the normal Dolphin instance works as expected. Plain text files are opened by KWrite. I noticed that the root Dolphin file associations are not modified. Kate is still the primary text/plain file association in the root Dolphin instance. Furthermore, now it works! The original problem goes away.

But if I then add a new plain text file association for Kate (using System Settings), text files in the normal Dolphin window now open with Kate as expected. This is what I want. But the root Dolphin instance once again gives the original error ("KDEInit could not launch /usr/bin/kate").

fwiw:
$ ls -la /usr/bin/kate
-rwxr-xr-x 1 root root 6176 Sep 8 09:51 /usr/bin/kate

So I have two questions:

1. does this information give a clue about what the problem is and how to fix it?

2. where and how are root file associations changed? I'd like to try a few experiments by changing those.
User avatar
MountainX
Registered Member
Posts
56
Karma
0
OS
It looks like I resolved it by deleting both my user's mimeapps.list and the root user's mimeapps.list. Most of those associations got added unintentionally anyway, so I was glad to clean that stuff out.

In my first test, the Kate issue is resolved. (If it isn't fully resolved, I'll report back.)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
With regards to the output from kbuildsycoca4 - that is harmless and normal, apart from the uid 0 / 1000 issue.
For all KDE applications, including CLI commands such as kbuildsycoca4, they should always be run from independent, full session terminals - which sudo does not provide.

If you need to run any KDE commands as root, please run "sudo su -" and then run the given KDE commands.
Alternately, you can use "kdesu" or "kdesudo" which both will perform the correct changes to prevent the issue.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
MountainX
Registered Member
Posts
56
Karma
0
OS
bcooksley wrote:With regards to the output from kbuildsycoca4 - that is harmless and normal, apart from the uid 0 / 1000 issue.
For all KDE applications, including CLI commands such as kbuildsycoca4, they should always be run from independent, full session terminals - which sudo does not provide.

If you need to run any KDE commands as root, please run "sudo su -" and then run the given KDE commands.
Alternately, you can use "kdesu" or "kdesudo" which both will perform the correct changes to prevent the issue.


Thanks for that info. It is very helpful!
User avatar
MountainX
Registered Member
Posts
56
Karma
0
OS
MountainX wrote:It looks like I resolved it by deleting both my user's mimeapps.list and the root user's mimeapps.list. Most of those associations got added unintentionally anyway, so I was glad to clean that stuff out.

In my first test, the Kate issue is resolved. (If it isn't fully resolved, I'll report back.)


The Kate problem came back after a reboot. Now I have no idea how to fix it. The problem is:

I open Dolphin as root (using the rootactions service menu) then clicked on a text file. This results in a "Sorry" dialog with the message:

KDEInit could not launch /usr/bin/kate
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
As Kate is a unique application it is likely it is relying upon certain session infrastructure which is not available when a single KDE application is launched as root - in this case, kdeinit4. Launching it directly bypasses this to a certain extent, which is why that works.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
wolfi323
Registered Member
Posts
1129
Karma
11
OS
Try to run dolphin with:
Code: Select all
kdesu dbus-launch dolphin

That's the way openSUSE's "Dolphin (Super-user mode)" menu entry does it, and I can launch Kate fine from within that.
(And I vaguely remember a bug report about Kate not starting in "Dolphin (Super-user mode)" before they changed that entry)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot], Yahoo [Bot]