GoldBuggie
December 2nd, 2005, 06:51 AM
With KDE3.5 a ioslave called system:/ is used instead of /home/$USER.
Double-clicking on non-kde application files will not open the application. For example double-click on an openoffice file and you will not get past the startup picture. Same goes for .mp3 files if you have them linked to xmmm(xmmm will open but not play the files).
The error is not in kde it lies within the configuration of the .desktop files. In the .desktop files there is a line for execution.
example:
Exec=ooffice2 -writer %U
The thing that needs to change is the %U. You need to change it to %f.
corrected example:
Exec=ooffice2 -writer %f When changing this you will also have to add the line(thanks itmon)
X-KDE-Protocols=http;ftp;smb;This is to make sure that these three protocols still handle it with %U.
Now comes the part of knowing which files to change. I will give some short help below(good if you want to change several files).
The most important files lie in /usr/share/applications/. To know which files you need to edit do the following in konsole.
grep -H %[Uu] $(ls /usr/share/applications/*.desktop)
This will give you which files contain the problem. For me it gives
/usr/share/applications/firefox.desktop:Exec=firefox %u
/usr/share/applications/gftp.desktop:Exec=gftp %u
/usr/share/applications/gimp-2.2.desktop:Exec=gimp-remote-2.2 %U
/usr/share/applications/ooo2-base.desktop:Exec=ooffice2 -base %U
/usr/share/applications/ooo2-draw.desktop:Exec=ooffice2 -draw %U
/usr/share/applications/ooo2-impress.desktop:Exec=ooffice2 -impress %U
/usr/share/applications/ooo2-math.desktop:Exec=ooffice2 -math %U
/usr/share/applications/ooo2-writer.desktop:Exec=ooffice2 -writer %U
/usr/share/applications/template.desktop:Exec=oofromtemplate2 %U
/usr/share/applications/XMMS.desktop:Exec=xmms %U
Now if we decide to correct a file we can use the following command:
sudo sed -e 's/%[Uu]/%f/' -e '$a\X-KDE-Protocols=http;ftp;smb;' -i <file(s)> or to change every file in that directory
sudo sed -e 's/%[Uu]/%f/' -e '$a\X-KDE-Protocols=http;ftp;smb;' -i `grep -l %[Uu] /usr/share/applications/*.desktop`
There are more .desktop files in the system that contains %U but not sure if those need changine. If you want to see all files that contain %U run the below script
#!/bin/bash
locate *.desktop > result.tmp
for desktopFile in $(cat result.tmp)
do
output=$(grep -H Exec $desktopFile | grep %[Uu])
if [ -n "$output" ]
then
echo $output
fi
done
rm result.tmp
NOTE! The correction with %f was something that was mentioned on bugs.kde.org
Double-clicking on non-kde application files will not open the application. For example double-click on an openoffice file and you will not get past the startup picture. Same goes for .mp3 files if you have them linked to xmmm(xmmm will open but not play the files).
The error is not in kde it lies within the configuration of the .desktop files. In the .desktop files there is a line for execution.
example:
Exec=ooffice2 -writer %U
The thing that needs to change is the %U. You need to change it to %f.
corrected example:
Exec=ooffice2 -writer %f When changing this you will also have to add the line(thanks itmon)
X-KDE-Protocols=http;ftp;smb;This is to make sure that these three protocols still handle it with %U.
Now comes the part of knowing which files to change. I will give some short help below(good if you want to change several files).
The most important files lie in /usr/share/applications/. To know which files you need to edit do the following in konsole.
grep -H %[Uu] $(ls /usr/share/applications/*.desktop)
This will give you which files contain the problem. For me it gives
/usr/share/applications/firefox.desktop:Exec=firefox %u
/usr/share/applications/gftp.desktop:Exec=gftp %u
/usr/share/applications/gimp-2.2.desktop:Exec=gimp-remote-2.2 %U
/usr/share/applications/ooo2-base.desktop:Exec=ooffice2 -base %U
/usr/share/applications/ooo2-draw.desktop:Exec=ooffice2 -draw %U
/usr/share/applications/ooo2-impress.desktop:Exec=ooffice2 -impress %U
/usr/share/applications/ooo2-math.desktop:Exec=ooffice2 -math %U
/usr/share/applications/ooo2-writer.desktop:Exec=ooffice2 -writer %U
/usr/share/applications/template.desktop:Exec=oofromtemplate2 %U
/usr/share/applications/XMMS.desktop:Exec=xmms %U
Now if we decide to correct a file we can use the following command:
sudo sed -e 's/%[Uu]/%f/' -e '$a\X-KDE-Protocols=http;ftp;smb;' -i <file(s)> or to change every file in that directory
sudo sed -e 's/%[Uu]/%f/' -e '$a\X-KDE-Protocols=http;ftp;smb;' -i `grep -l %[Uu] /usr/share/applications/*.desktop`
There are more .desktop files in the system that contains %U but not sure if those need changine. If you want to see all files that contain %U run the below script
#!/bin/bash
locate *.desktop > result.tmp
for desktopFile in $(cat result.tmp)
do
output=$(grep -H Exec $desktopFile | grep %[Uu])
if [ -n "$output" ]
then
echo $output
fi
done
rm result.tmp
NOTE! The correction with %f was something that was mentioned on bugs.kde.org