nautilus

Escape whitespace in paths using nautilus script

十年热恋 提交于 2019-12-04 16:21:31
I didn't think this would be as tricky as it turned out to be, but here I am. I'm trying to write a Nautilus script in Python to upload one or more images to Imgur just by selecting and right clicking them. It works well enough with both single images and multiple images - as long as they don't contain any whitespace. In fact, you can upload a single image containing whitespace, just not multiple ones. The problem is that NAUTILUS_SCRIPT_SELECTED_FILE_PATHS returns all the selected files and directories as a space separated string. So for example, it could look like this: print os.environment[

How to create nautilus C extensions

风流意气都作罢 提交于 2019-12-03 12:29:36
问题 I'm trying to create a Nautilus extension in C, but there are just Python examples and helps. Almost no documentation and literally no examples, but just some complete extensions which are long and hard to understand for a beginner. I need just a simple sample code that creates a new column in Nautilus's list view. How to write and compile it. The code I've tried is: #include <libnautilus-extension/nautilus-column-provider.h> typedef struct _FooExtension FooExtension; typedef struct

Put Java application into file manager's context menu

倾然丶 夕夏残阳落幕 提交于 2019-12-02 08:53:45
I'm using Eclipse IDE on Ubuntu. My app offers encryption services and I want to integrate it into the client OS. My question is: Is there a way to put my app programmatically into the context menu (right-click options) of the file manager, irrespective of the file manager a person is using? I would also like to know if there is any way I could do this on Windows explorer as well. But my guess is that it involves adding values to the registry and can be easily achieved. So, is there a general solution to adding context-menu support on linux file managers, and also please correct me if I'm

How to change icon/emblem of a directory from bash

懵懂的女人 提交于 2019-11-30 14:01:15
I'm playing around with get_iplayer (fantastic) it's running every few hours to grab any new episodes of whatever.... After it has finished grabbing anything new i'd like to change the emblem of ~/Videos to add a plus or star (nautilus emblem preferably) Do i go about this via nautilus? Do i need to change something in gnome-config? I'm sure this can't be FS level? Cheers for any links and advice. gvfs-set-attribute ~/Videos -t stringv metadata::emblems new urgent gvfs-set-attribute -t string $FOLDER metadata::custom-icon file:///home/user/path/to/icon.jpg There's a package called libnautilus

How to change icon/emblem of a directory from bash

时光毁灭记忆、已成空白 提交于 2019-11-29 19:53:02
问题 I'm playing around with get_iplayer (fantastic) it's running every few hours to grab any new episodes of whatever.... After it has finished grabbing anything new i'd like to change the emblem of ~/Videos to add a plus or star (nautilus emblem preferably) Do i go about this via nautilus? Do i need to change something in gnome-config? I'm sure this can't be FS level? Cheers for any links and advice. 回答1: gvfs-set-attribute ~/Videos -t stringv metadata::emblems new urgent gvfs-set-attribute -t