“Funcionalidade Drag'n'Drop-Execute” no KDE

2

No Windows, você pode arrastar e soltar um arquivo em um executável e o executável será iniciado com o arquivo como seu primeiro argumento.

Essa funcionalidade é possível no Linux?

Estou usando o OpenSUSE 12.1 com o KDE e o Konqueror como gerenciador de arquivos.

    
por Idan Arye 27.02.2012 / 10:37

1 resposta

2

De esta resposta em askubuntu.com que se refere para algumas freedesktop.org spec , eu entendo que o que você está procurando é possível criando um arquivo .desktop com uma entrada EXEC= . Suponho que os códigos de campo reconhecidos (por exemplo, %u ) sejam substituídos pelo URI / caminho do arquivo eliminado:

%f A single file name, even if multiple files are selected. The system reading the desktop entry should recognize that the program in question cannot handle multiple file arguments, and it should should probably spawn and execute multiple copies of a program for each selected file if the program is not able to handle additional file arguments. If files are not on the local file system (i.e. are on HTTP or FTP locations), the files will be copied to the local file system and %f will be expanded to point at the temporary file. Used for programs that do not understand the URL syntax.

%F A list of files. Use for apps that can open several local files at once. Each file is passed as a separate argument to the executable program.

%u A single URL. Local files may either be passed as file: URLs or as file path.

%U A list of URLs. Each URL is passed as a separate argument to the executable program. Local files may either be passed as file: URLs or as file path.

(... mas eu nunca tentei isso nem sei se ele é suportado pelo KDE, então alguém conhecendo bem seria bom.)

Pode haver outras formas, por meio dos widgets iniciais do Plasma, mas não tenho ideia.

    
por 27.02.2012 / 14:43