Linux/GTK+ Application

[.desktop] desktop file

구씨언니 2020. 4. 28. 12:04
반응형

Gnome 어플리케이션을 실행 시키기 위해서, 사용자는 데스크톱의 아이콘을 클릭하거나 메뉴에서 실행할 어플리케이션의 아이콘을 선택해야한다. Desktop file은 어플리케이션을 데스크탑 메뉴에 넣는 역할을 한다. 

 

따라서 어플리케이션을 메뉴 엔트리에 넣고싶다면 desktop file을 생성해야 한다. 

Desktop entry file들은 .desktop 확장자를 가져야한다. 

 

/*Sample file*/

[Desktop Entry]
Name=FooCorp Painter Pro
Exec=foocorp-painter-pro
Icon=foocorp-painter-pro
Type=Application
Categories=GTK;GNOME;Utility;

 

/*Line Description*/
[Desktop Entry] The first line of every desktop file and the section header to identify the block of key value pairs associated with the desktop. Necessary for the desktop to recognize the file correctly.


Type=Application Tells the desktop that this desktop file pertains to an application. Other valid values for this key are Link and Directory.

Encoding=UTF-8 Describes the encoding of the entries in this desktop file.

Name=Sample Application Name Names of your application for the main menu and any launchers.

Comment=A sample application Describes the application. Used as a tooltip.

Exec=application The command that starts this application from a shell. It can have arguments.

Icon=application.png The icon name associated with this application.

Terminal=false Describes whether application should run in a terminal.

 

반응형

'Linux > GTK+ Application' 카테고리의 다른 글

GTK warning : 'height' is not a valid property name  (0) 2021.06.02