VectorLinux
October 24, 2014, 10:49:59 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: xfce - installed programs NOT on menu! [SOLVED]  (Read 3787 times)
Hiero2
Member
*
Posts: 57


« on: August 03, 2009, 07:20:13 am »

I've installed wine, and a couple other progs - and I keep having menu issues. I checked the forums, read the previous posts, edited the desktop files - and got inconsistent results. Per another posting,  I looked in the xfce menu under "Settings" for a menu editor, and there isn't one there.     HuhTongue    VL6, xfce 4.6.

On one of the programs (xsane), I added a desktop file - as per this thread:     "Sane Scanner Launcher ? VL 6.0" That worked.
My Oracle XE installation shows the Oracle menu items under category "Other". I opened the desktop and edited to change this to "Oracle". That did NOT work, but it did when I changed the category to "Office". Must be category limitations somewhere. Anybody know where?

And the Wine desktop file just flat out doesn't work. I've edited it every which way - changing category, adding lines from other working files, taking stuff out, checking permissions. No wine in the menu. BUT I did finally get it in the right-click menu when I right click on an "exe" file. It isn't in the right click "Open with" other app menu tho.

So, how do I get Wine on the menu? How do I find the "official" "Menu Editor" in xfce 4.6? And how can I add or change menu categories for xfce?

Thanks for your attention.
Mark
« Last Edit: August 16, 2009, 12:02:00 pm by Hiero2 » Logged
rbistolfi
Packager
Vectorian
****
Posts: 2288


« Reply #1 on: August 03, 2009, 07:31:09 am »

Xfce follows the XDG standard and only programs following the standard will appear in the menu.
http://standards.freedesktop.org/menu-spec/latest/

A list of the available Categories is here:
http://standards.freedesktop.org/menu-spec/latest/apa.html

AFAIK, there is no menu-editor in 4.6, but this guy seems to have it figured out:
http://ubuntuforums.org/showthread.php?p=7240572
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
Hiero2
Member
*
Posts: 57


« Reply #2 on: August 04, 2009, 05:17:15 am »

Thank you. That does answer the questions! The menu editing is not an easy answer, but at least it is an answer.

Cheers,  Smiley
Mark
Logged
Hiero2
Member
*
Posts: 57


« Reply #3 on: August 04, 2009, 06:43:09 pm »

Ok - I tried the technique from the Ubuntu forum - and it did NOT work - or it worked about 50%. It didn't help resolve any of the issues I hadn't already found answers for. I'm going to post the text here - with corrections, since in VL the paths are different. But if somebody else does get this to work - then I missed something.

===============Original post==========================
Re: Menu editor in XFCE (4.6 in 9.04)
Ok ... I figured out how to do it ...
There is still no menu editor that works, as far as I can tell, but here is how I went about creating my customized menu.

Step 1, customize the main menu.

    * $ cp /etc/xdg/xubuntu/menus/xfce-applications.menu ~/.config/menus/
  * $ cp /etc/xfce/xdg/menus/xfce-applications.menu ~/.config/menus/
    * edit ~/.config/menus/xfce-applications.menu, adding/removing/editing items as required for the layout you desire
{NOTE: the file pre-existing in ~/.config/menus on my machine was applications.menu, not xfce-applications.menu. I renamed it, and copied the xfce-* file first to the same name, and when that didn't work, I renamed it to app*, which also didn't work.}
    * the Layout section describes the high-level menu layout
    * if you want a new menu, add a Menu section, modeled after one of the others
    * simply including a category makes it a lot easier to add new items to a menu without having to change other files
    * for example, I changed the Layout and added a Favorites menu
      Code:

          <Layout>
              <Menuname>Favorites</Menuname>
              <Separator/>
              <Menuname>Settings</Menuname>
              <Separator/>
              <Merge type="all"/>
              <Separator/>
             {NOTE: The filename entries (following) are different in VL. Seem to be located in /usr/share/desktop-directories}
              <Filename>gnome-app-install-xfce.desktop</Filename>
              <Filename>xubuntu-help.desktop</Filename>
              <Filename>xfce4-about-xfce.desktop</Filename>
              <Filename>xfce4-logout.desktop</Filename>
          </Layout>

          <Menu>
              <Name>Favorites</Name>
              <Directory>favorites.directory</Directory>
              <Include>
                  <Category>Favorites</Category>
              </Include>
          </Menu>
{IMHO, This should work. But it didn't. This may be because of the next step (2). In VL the directory he mentions does not exist on my machine, and adding it, along with the requisite new files for the new category, did not work. HOWEVER, this may be because VL looks in a different location for these files (anybody know anything?), like maybe ~/Desktop/.directory?}
Step 2, add necessary menu specifications to ~/.local/share/desktop-directories for any new menus you added that don't have existing menu specifications in /usr/share/desktop-directories/. The menu specification provides the name and icon for your memory. Here's an example:
Code:

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Directory
Icon[en_US]=emblem-favorite
Name[en_US]=Favorites
Name=Favorites
Icon=emblem-favorite

{The next step alters individual menu entries. My success here was better, but far from complete. Editing of some desktop files failed to make them appear, or to change categories. I can send examples, but this is already long, so I'll wait for interest.}
Step 3, add/change/remove menu items. The easiest way to change or remove an item is to copy the .desktop files from /usr/share/applications/ for items that you want to modify, and then edit your copy of the file. In my example, where I wanted to create a favorites menu, I copied all the .desktop files over for the apps that I want to show up as favorites, and then added the string "Favorites;" to the end of each Categories line, so that the entries stay where they were _and_ show up in my favorities menu. If you want a menu item to disappear, add the line "Hidden=true" to the file. If you want to add a new menu item, copy an existing .desktop file and modify it to meet your needs.


Maybe someone else will point us at an easier method. In the mean time, this information about how to do it the hard way might be helpful to others.

===============End Original post==========================

So, there ya go. One file I attempted to put on the menu used the following desktop file to configure wine to run a win exe. It gives me a fine button, but wine doesn't follow the command. If somebody who knows syntax could give me the correct EXEC line, I think it would be a go. This syntax works on the command line.

[Desktop Entry]
Name=Wine Loading TreePadBIZ
Exec=wine /home/hiero/.wine/drive_c/Program\ Files/TreePadBIZ/treepadBIZ.exe
Icon=/home/hiero/.wine/icon_tpp16.gif
#Type=Application
Terminal=false
Type=Application
Categories=Accessories;
MimeType=application/x-ms-dos-executable;application/x-msi;
#NoDisplay=False
StartupNotify=true

Thanks;
Mark
Logged
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #4 on: August 04, 2009, 07:43:21 pm »

Try this...

Exec=env WINEPREFIX="/home/hiero/.wine" wine "C:\\Program Files\\TreePadBIZ\\TreepadBiz.exe"

I went to Treepad and downloaded what I figured was the Biz edition and set up my own desktop launcher, just to make sure it would work, but I must have downloaded a different one and there is several.

The Exec I ended up with is this...
[Desktop Entry]
Name=TreePadBiz
Exec=env WINEPREFIX="/home/ken/.wine" wine "C:\\Program Files\\TreePadBIZ_7\\TreepadBiz.exe"

Just thought I would point it out because the containing file is different.
Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
Hiero2
Member
*
Posts: 57


« Reply #5 on: August 05, 2009, 09:46:53 am »

~~~~~~~Bingo!~~~~~~~~~~~Bingo!~~~~~~~~~~~Bingo!~~~
Give the man a bucket of suds and a bag of popcorn!
One more issue down.

I always wondered why xfce was a "medium weight" desktop. I'm beginning to learn why. Faster action, smaller footprint, but it needs some cowboy duty to rope it in.

Thank you!
Logged
Hiero2
Member
*
Posts: 57


« Reply #6 on: August 07, 2009, 11:42:48 am »

I'm going to close this thread with this link to the xfce pages. There you will find the xfce instructions on editing their menu system. I haven't tried them yet, but they built it, so they should know, ya?

http://wiki.xfce.org/howto/customize-menu
Logged
OU812
Vectorite
***
Posts: 156



« Reply #7 on: August 09, 2009, 01:26:29 pm »

Hello.

1. Typically, if an app does not show up in the xfce menu, then there is a problem with the .desktop file; it is either missing or there is a problem with one of the entries such as an incorrect icon path or an incorrect executable statement.

2. I have written a very quick and dirty script for creating .desktop files. It asks for things such as menu name, menu icon, exec command, etc. Just the basic facts. I can post it here today or tomorrow (if I can figure out how to upload) or you can pm me your email account. To use the script, you will need to have zenity and gtkdialog installed. And run it as root.

john
Logged
Hiero2
Member
*
Posts: 57


« Reply #8 on: August 10, 2009, 05:16:53 am »

John- how right u are about the desktop file. The thing was, xfce 4.4 had a gui menu editor. It went away! And, being a newb - it was all very frustrating. I've been very rapidly learning tho. Also, for some strange reason, a lot of my panel icons and menu items changed or disappeared in one of the updates. Aaarrgh.

I would appreciate the script - that could be useful. I think you should post it here so others could use it if they wished. If you are using xfce, you will find the link I posted in a previous post to their website very useful as per menus. It pretty much sets out the ground rules for xfce 4.6.

Mark
Logged
OU812
Vectorite
***
Posts: 156



« Reply #9 on: August 12, 2009, 08:48:56 pm »

Here is the script.

1. Make sure you make it executable. I forgot the command since I just use pcmanfm to set the permissions. In thunar, I think you would you right-click and look for properties  - there should be a "make executable" option. Use that.

2. Copy, as root, to perhaps /usr/bin (we use /usr/local/bin in antix, but I don't think it matters).

3. Run it as root. In antix we use "gksu adddesktop.sh". I don't remember how slackware launches gui apps from a terminal.

That's it. It works, but it's not feature rich. Should be easy to use. Just read the options carefully and you should be OK.

john
Logged
Hiero2
Member
*
Posts: 57


« Reply #10 on: August 13, 2009, 10:58:27 am »

 Smiley
Thanks. I'll give it a try when I get a little time!

« Last Edit: August 16, 2009, 12:01:10 pm by Hiero2 » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!