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

How do I disable the gwenview importer device action in kde4

Tags: None
(comma "," separated)
User avatar
josephj
Registered Member
Posts
35
Karma
0
OS
I just installed kubuntu lucid on my notebook. Every time I plug in a thumb drive, the device actions popup gives me two options - load in file manager and use gwenview importer.

I want to get rid of the gwenview importer option.

I went into System Settings->Advanced->Device Actions and found the entry for Download photos with gwenview. It can't be deleted (at least as a regular user). I tried modifying it and then deleting it, but the gwenview entry was still there afterward.

Any ideas would be appreciated.

Joe

kubuntu lucid x86 kde 4.4.5
lueck
Mentor
Posts
225
Karma
2
The Help for Device Actions says:
"You can only discard changes to system wide actions, if there are no changes then these actions cannot be deleted."

So this behavior is intended, and apparently actions can't be deleted/disabled even as root via the kcm module.

As root you can remove gwenview_importer_camera.desktop + gwenview_importer.desktop from the subfolder solid/actions/ in the some of the folders `kde-config --path data`.

Apparently you found a bug here, at least each user should be able to remove/hide unwanted device actions via the systemsettings module for his account.
Please report at bugs.kde.org.
User avatar
josephj
Registered Member
Posts
35
Karma
0
OS
Thanks. I'll try to file a bug report.

Can you elaborate a bit on deleting the gwenview _importer... files above? Will that make the unwanted choice go away? Will it break anything else?

Joe
User avatar
josephj
Registered Member
Posts
35
Karma
0
OS
Just filed the bug report

https://bugs.kde.org/show_bug.cgi?id=276016

Please vote for it if you want it fixed.
lueck
Mentor
Posts
225
Karma
2
> Can you elaborate a bit on deleting the gwenview _importer... files above?

There is nothing special with the gwenview*desktop files. At login or when you launch 'kbuildsycocy4 --noincremental' the kde system reads a lot of desktop files, for the menu, solid actions etc.

> Will that make the unwanted choice go away?

Yes, to get the choices back, you have to readd the gwenview*desktop files.

> Will it break anything else?

No.
User avatar
josephj
Registered Member
Posts
35
Karma
0
OS
Thanks! (and thanks for posting a supportive comment on my bug report.)

I deleted gwenview_importer.desktop from /usr/share/kde4/apps/solid/actions and it worked like a charm. I kept a copy under my user account in case I ever want to put it back.

I started to modify it to create a mount-only action, but don't know quite enough to get it to work properly. Any suggestions on where would be a good place to post questions about that?

Joe
lueck
Mentor
Posts
225
Karma
2
What do you want to achieve?

Mount a plugged in device manually?
Click on the icon right to the device name in the device notifier to mount it.

Automounting without a notifier popup?
User avatar
josephj
Registered Member
Posts
35
Karma
0
OS
Right now, I'd like to mount the device manually by clicking in the device notifier.

I'd also like to know how to do it automatically. I know how to do it for devices that are permanently attached using an fstab entry, but that causes boot errors when an external device isn't attached at boot time.

Here's what I started to code:

Code: Select all
[Desktop Entry]
X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND StorageVolume.usage == 'FileSystem' ]
Type=Service
Actions=open;

[Desktop Action open]
# %f gives StorageAccess.filePath, %d gives Block.device, %i gives UDI
## I don't know how to write mymount yet
## ls -l /dev/disk/by-label | grep %f | something (awk) that retrieves everything
## after the last slash on the line and loads it in a variable DEV
## touch /media/%f;mount /dev/"${DEV}" /media/%f

Exec=mymount %f
Icon=???
Name=Mount Partition
X-Ubuntu-Gettext-Domain=desktop_kdegraphics ????
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You can use the command "solid-hardware mount %i" to mount the device if it is mountable.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
josephj
Registered Member
Posts
35
Karma
0
OS
Thanks. Where do I find documentation on what I fill in for all the other fields? And where is the best place to post questions like this?

Joe
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Icon should be set to the freedesktop.org name for an icon.

The simplest way to do this is to run "kdialog --geticon solid" then browse through the icons available. Make sure to change the icon sources as you look around.

Once you have made your selection the name of the icon will be printed to your terminal when it exits.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
josephj
Registered Member
Posts
35
Karma
0
OS
With help from all of you, I now have a mount-only action in my device notifier and the gwenview nuisance is gone! Thanks a lot.

Joe

Code: Select all
[Desktop Entry]
X-KDE-Solid-Predicate=[ StorageVolume.ignored == false AND StorageVolume.usage == 'FileSystem' ]
Type=Service
Actions=open;

[Desktop Action open]
# %f gives StorageAccess.filePath, %d gives Block.device, %i gives UDI

Exec=solid-hardware mount %i
Icon=hdd_mount
Name=Mount Partition
X-Ubuntu-Gettext-Domain=desktop_kdebase
T. Warner
Registered Member
Posts
4
Karma
0
lueck wrote:As root you can remove gwenview_importer_camera.desktop + gwenview_importer.desktop from the subfolder solid/actions/ in the some of the folders `kde-config --path data`.

Where is that folder? My output from `kde-config --path data` is:
Code: Select all
/home/twarner/.kde/share/apps/:/usr/share/apps/

and neither of these has a "solid" subdirectory.
lueck
Mentor
Posts
225
Karma
2
T. Warner wrote:
lueck wrote:As root you can remove gwenview_importer_camera.desktop + gwenview_importer.desktop from the subfolder solid/actions/ in the some of the folders `kde-config --path data`.

Where is that folder? My output from `kde-config --path data` is:
Code: Select all
/home/twarner/.kde/share/apps/:/usr/share/apps/

and neither of these has a "solid" subdirectory.


Sorry typo, should be `kde4-config --path data`/solid/actions

Or use locate gwenview_importer_camera.desktop


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]