LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   14.1, xfce4-appfinder cannot run KDE *.desktop files with "caption" (http://www.linuxquestions.org/questions/slackware-14/14-1-xfce4-appfinder-cannot-run-kde-%2A-desktop-files-with-caption-4175490454/)

atelszewski 01-07-2014 03:14 PM

14.1, xfce4-appfinder cannot run KDE *.desktop files with "caption"
 
Hi,

I have an odd problem with xfce4-appfinder when I want to run some KDE applications, using the application chooser window (e.g. the one that allows you to select the application using the categories on the left and items on the right side). For example, I'm able to run kate but not kcalc nor ktouch.

For the test, I've started the xfce4-appfinder from console and I've noticed the following when trying to run the kcalc:
Code:

kcalc: '<caption>' missing.
Further investigation showed that the *.desktop file for the kate has the following:
Code:

Exec=kate -b %U
and the *.desktop file for kcalc has the following:
Code:

Exec=kcalc -caption %c
It seems like in the case of kcalc the executable is run with the -caption switch, but the caption string is empty and so the application complains and does not want to start.

On the other hand, when running the kcalc *.desktop file using xdg-open or exo-open, that is:
Code:

exo-open /usr/share/applications/kde4/kcalc.desktop
the kcalc starts without any problem.


Any ideas what might be happening?

--
Best regards,
Andrzej Telszewski

Spect73 01-08-2014 08:29 PM

Using 14.1 32 bit here, it works. Can even launch kcalc and kate from the command line. And they work once launched either way. Thanks for the topic though, I've learned new ways of starting up kcalc and kate.

atelszewski 01-09-2014 01:57 AM

Hi,

I just forgot to tell that I'm using AlienBOB's ktown KDE (4.11.5).

After a bit of investigation I know more less what is the problem. On one of my PCs I have KDE 4.10.2 and the desktop file for the kcalc has the following:
Code:

Exec=kcalc -caption "%c"
On the other hand, in KDE 4.11.5 the desktop file for the kcalc has the following:
Code:

Exec=kcalc -caption %c
So the omission of the quotation marks makes the xfce4-appfinder fail to execute the desktop file, because the kcalc executable is given the -caption switch but without the string. In the 4.10.2 it was given an empty string and so it was not complaining. I think it is a bug in the xfce4-appfinder, because exo-open works just fine.

Any ideas?

--
Best regards,
Andrzej Telszewski

atelszewski 01-18-2014 02:34 PM

Hi,

I think the problem lays both in xfce4-appfinder and KDE.
The problem with xfce4-appfinder is that it does not correctly execute the *.desktop file, whereas the exo-open has no problems.
The problem with KDE is that, the *.desktop files are not consistent: some of them quote the %c and some don't. What is more, some of the *.desktop files have the execute permission bit set, which I belive should not be set. Please keep in mind that I'm talking about AlienBOB's KDE and not the stock one (don't think AlienBOB has something to do with it, the problem comes directly from KDE sources).

I solved the problem with:
Code:

$ cd /usr/share/applications/kde4
$ sed 's/ %c/ "%c"/g' -i *.desktop

It's temporary solution, but will work untill Xfce/KDE teams have the things correct;)

--
Best regards,
Andrzej Telszewski

avalonit 07-14-2014 01:10 PM

@atelszewski, it would help to file bugs against respective projects, otherwise hope for a fix has much less chance... just saying

atelszewski 07-15-2014 10:43 AM

Quote:

it would help to file bugs against respective projects, otherwise hope for a fix has much less chance... just saying
That makes sense;) I'll try to do it.

--
Best regards,
Andrzej Telszewski


All times are GMT -5. The time now is 03:32 PM.