Re: CentOS 7 - Add a menu item.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sat, 2014-07-12 at 23:45 +0000, Doug Sommer wrote:
> I am kinda stuck. I want to add a menu item and like all previous versions
> of Centos I used Alacarte without issue. In C7, it will not allow you to put
> anything but a one name command. IE, firefox. You can not have something
> like java -jar /opt/PROG/NAME.jar. It grays out the OK button as soon as you
> put a space after java. 
> 
> Note if you edit a menu item that that has a space, it is also grayed out.
> 
> Any other way to add one>
> 
> Thanks - Doug  
> 

Hi,

Below is an example of how to do it under c7.

- Create file named as you wish with a '.desktop' extension.
- Insert the text below and edit to your needs.

[Desktop Entry]
Encoding=UTF-8
Name=My Java App
GenericName=My Java app
Exec=java -jar /path_to/my_java_app.jar
Terminal=false
Icon=/path_to/my_icon.png
Type=Application

- Save file.
- Copy file to:

  * '/home/<username>/.local/share/applications/'

     to be local to that user only.

  or

  * '/usr/share/applications'

    to be available system wide.

Your app will appear in a new menu group of 'Other'.

Note: The example is for a java gui app. If a terminal application,
change the 'Terminal' line rvalue to true.

Regards

Phil

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux