Author Topic: How do you edit the LXDE Main Menu?  (Read 5969 times)

cuscotravelservices

  • Sr. Member
  • ****
  • Posts: 104
    • View Profile
    • Cusco Travel Services
How do you edit the LXDE Main Menu?
« on: August 02, 2014, 03:43:28 AM »
Hi Biff et al,

How do you edit the LXDE Main Menu?

Thanks, Michael.

PCNetSpec

  • Guest
Re: How do you edit the LXDE Main Menu?
« Reply #1 on: August 02, 2014, 04:00:12 PM »
Normally you'd manually create/edit the applications .desktop file .. alacarte (menu editor) works in Lubuntu, and *theoretically" should work in any LXDE environment that follows the freedesktop.org specifications.

Whilst I'd expect this to include Debian (maybe even more so than Lubuntu), I can't guarantee it, so alacarte must be considered "attempt at your own risk" ;)

What exactly are you trying to edit ? .. and maybe someone can show you the manual method by example.

cuscotravelservices

  • Sr. Member
  • ****
  • Posts: 104
    • View Profile
    • Cusco Travel Services
Re: How do you edit the LXDE Main Menu?
« Reply #2 on: August 02, 2014, 08:21:21 PM »
Well, I had installed SpaceFM because it has multiple panes and the available version of PCManFM didn't.

When I noticed that SpaceFM wasn't added, anywhere, to the Main Menu, I thought that I should be able to right-click the menu somewhere and add it in a similar fashion to adding applications to a Launcher added to a Panel.

However, when I right-clicked on the Menu Button and then clicked on the Menu Settings option, only a dialogue window, for selecting an icon image, appeared.

Could this be an issue with the Live environment?

I need a suitable graphical interface because the Users will be people who are nowhere near as knowledgeable about computers as you or I.

wattOS R8 LXDE is very high on my list of candidates because of its small footprint and speed.

Thanks, Michael.

PCNetSpec

  • Guest
Re: How do you edit the LXDE Main Menu?
« Reply #3 on: August 02, 2014, 09:23:57 PM »
Is alacarte not in the repos ?

cuscotravelservices

  • Sr. Member
  • ****
  • Posts: 104
    • View Profile
    • Cusco Travel Services
Re: How do you edit the LXDE Main Menu?
« Reply #4 on: August 03, 2014, 09:42:46 PM »
Is alacarte not in the repos ?

alacarte is in the repos but it required over 120 MB of packages, to be downloaded (via Synaptic), most of which didn't appear to be needed.

So, initially, I just downloaded to a location on the Hard Drive and then I installed via GDebi after installing libgnome-menu-3-0 and gir1.2-gmenu-3.0.

All this I did in the Live USB environment.

I used the Run option, of the Main Menu, to activate it. However, I couldn't make any modifications. Not even the Properties button opened any dialogue window.

I then opened LXTerminal to use sudo to open alacarte which produced the following output in the Terminal window.

Code: [Select]
Traceback (most recent call last):
  File "/usr/bin/alacarte", line 37, in <module>
    main()
  File "/usr/bin/alacarte", line 33, in main
    app = MainWindow(datadir, version)
  File "/usr/share/alacarte/Alacarte/MainWindow.py", line 43, in __init__
    self.editor = MenuEditor()
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 33, in __init__
    self.load()
  File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 46, in load
    if not self.tree.load_sync():
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
gi._glib.GError: Failed to look up menu_file for "gnome-applications.menu"

If I run alacarte from LXTerminal, without using sudo and then click on the New Item button the following is output.

Code: [Select]
Traceback (most recent call last):
  File "/usr/share/alacarte/Alacarte/MainWindow.py", line 278, in on_new_item_button_clicked
    process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

If I click on the Properties button the following is output.

Code: [Select]
Traceback (most recent call last):
  File "/usr/share/alacarte/Alacarte/MainWindow.py", line 470, in on_properties_button_clicked
    self.on_edit_properties_activate(None)
  File "/usr/share/alacarte/Alacarte/MainWindow.py", line 339, in on_edit_properties_activate
    process = subprocess.Popen(['gnome-desktop-item-edit', file_path], env=os.environ)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Thanks, Michael.

biffster

  • wattOS - head nerd
  • Administrator
  • Sr. Member
  • *****
  • Posts: 237
    • View Profile
Re: How do you edit the LXDE Main Menu?
« Reply #5 on: August 04, 2014, 12:10:23 AM »
Well, I had installed SpaceFM because it has multiple panes and the available version of PCManFM didn't.

When I noticed that SpaceFM wasn't added, anywhere, to the Main Menu, I thought that I should be able to right-click the menu somewhere and add it in a similar fashion to adding applications to a Launcher added to a Panel.

However, when I right-clicked on the Menu Button and then clicked on the Menu Settings option, only a dialogue window, for selecting an icon image, appeared.

Could this be an issue with the Live environment?

I need a suitable graphical interface because the Users will be people who are nowhere near as knowledgeable about computers as you or I.

wattOS R8 LXDE is very high on my list of candidates because of its small footprint and speed.

Thanks, Michael.

- Hi there...missed this previously. you can add a launcher by right clicking the white space on the bar to the right of the menu button, or other launchers. right clicking the menu button only gives you the icon option as you mentioned.

cuscotravelservices

  • Sr. Member
  • ****
  • Posts: 104
    • View Profile
    • Cusco Travel Services
Re: How do you edit the LXDE Main Menu?
« Reply #6 on: August 04, 2014, 12:13:30 AM »
- Hi there...missed this previously. you can add a launcher by right clicking the white space on the bar to the right of the menu button, or other launchers. right clicking the menu button only gives you the icon option as you mentioned.

Hi Biff,

I want to modify the Items available via the Main Menu.

Thanks, Michael

biffster

  • wattOS - head nerd
  • Administrator
  • Sr. Member
  • *****
  • Posts: 237
    • View Profile
Re: How do you edit the LXDE Main Menu?
« Reply #7 on: August 04, 2014, 12:17:24 AM »
To further clarify...I think what you are saying here is you want it to be in the menu, not a launcher on the bar...in that case, I think someone mentioned that you need to look in the applications folder for the spacefm .desktop file.

Its probably there, but not visible in the menu because it has some option that makes it only visible when running a certain desktop environment

go to /usr/share/applications to see all the /desktop files and see if spacefm is in there. If not, you can copy one of the ones in there, and make one for it, and it will show up in the menu.

cuscotravelservices

  • Sr. Member
  • ****
  • Posts: 104
    • View Profile
    • Cusco Travel Services
Re: How do you edit the LXDE Main Menu?
« Reply #8 on: August 04, 2014, 12:47:25 AM »
To further clarify...I think what you are saying here is you want it to be in the menu, not a launcher on the bar...in that case, I think someone mentioned that you need to look in the applications folder for the spacefm .desktop file.

Its probably there, but not visible in the menu because it has some option that makes it only visible when running a certain desktop environment

go to /usr/share/applications to see all the /desktop files and see if spacefm is in there. If not, you can copy one of the ones in there, and make one for it, and it will show up in the menu.

Hi Biff,

As I mentioned in post No. 3,
Quote
I need a suitable graphical interface because the Users will be people who are nowhere near as knowledgeable about computers as you or I.

If they want to download and install applications which then don't appear automatically in the Main Menu, they will need a graphical interface that makes it easy for them to add Categories and Items to the menu.

I'm going to give alacarte a go in the MATE version but is there some relatively simple fix to make alacarte function as expected in the LXDE version?

I also started this topic that I'm waiting for a reply to.

Thanks, Michael.

PCNetSpec

  • Guest
Re: How do you edit the LXDE Main Menu?
« Reply #9 on: August 04, 2014, 10:31:41 AM »
OK, let's create the menu item manually

as root
Code: [Select]
leafpad /usr/share/applications/custom-spacefm.desktop
when a BLANK file opens, make it read:-
Code: [Select]
[Desktop Entry]
Type=Application
Icon=system-file-manager
Name=File Manager SpaceFM
Comment=Browse the file system and manage the files
Categories=FileManager;Utility;Core;GTK;
Exec=spacefm %U
StartupNotify=true
Terminal=false
MimeType=inode/directory;
SAVE the file.

Is SpaceFM now in the menu ?

Be Aware - If spacefm isn't in your $PATH, you'll have to put the FULL path to the binary executable on the "Exec=" line of the .desktop file above.

cuscotravelservices

  • Sr. Member
  • ****
  • Posts: 104
    • View Profile
    • Cusco Travel Services
Re: How do you edit the LXDE Main Menu?
« Reply #10 on: August 05, 2014, 03:13:00 AM »
OK, let's create the menu item manually

Is SpaceFM now in the menu ?

I installed SpaceFM again in the Live USB environment. The installation process creates a Desktop Configuration file named spacefm.desktop which contains the following Configuration entries.

Code: [Select]
[Desktop Entry]
Version=1.0
Name=SpaceFM
Name[cs]=SpaceFM
Name[de]=SpaceFM
Name[el]=SpaceFM
Name[es]=SpaceFM
Name[fr]=SpaceFM
Name[it]=SpaceFM
Name[nl]=SpaceFM
Name[pl]=SpaceFM
Name[pt]=SpaceFM
Name[pt_BR]=SpaceFM
Name[ru]=SpaceFM
Name[sr]=SpaceFM
Name[sr@latin]=SpaceFM
Name[sv]=SpaceFM
Name[zh_CN]=SpaceFM
Categories=System;FileTools;Utility;Core;GTK;FileManager;
Exec=spacefm %F
Icon=spacefm
StartupNotify=true
Type=Application
Terminal=false
MimeType=inode/directory;inode/mount-point;x-scheme-handler/ssh;x-scheme-handler/smb;x-scheme-handler/nfs;x-scheme-handler/ftp;
GenericName=File Manager
GenericName[cs]=Správce souborů
GenericName[de]=Dateiverwaltung
GenericName[el]=Διαχειριστής αρχείων
GenericName[es]=Gestor de archivos
GenericName[fr]=Gestionnaire de fichiers
GenericName[it]=Gestore File
GenericName[nl]=Bestandsbeheerder
GenericName[pl]=Menadżer plików
GenericName[pt]=Gestor de ficheiros
GenericName[pt_BR]=Gerenciador de arquivos
GenericName[ru]=Файловый менеджер SpaceFM
GenericName[sr]=Управљач датотека
GenericName[sr@latin]=Fajl menadžer
GenericName[sv]=Filhanterare
GenericName[zh_CN]=文件管理器
Comment=Browse the file system
Comment[cs]=Procházet systém souborů
Comment[de]=Im Dateisystem navigieren
Comment[el]=Περιήγηση του συστήματος αρχείων
Comment[es]=Explorar el sistema de archivos
Comment[fr]=Parcourir le système de fichiers
Comment[it]=Mostra il file system
Comment[nl]=Door bestandssysteem bladeren
Comment[pl]=Przeglądaj system plików
Comment[pt]=Explorar sistema de ficheiros
Comment[pt_BR]=Localizar o sistema de arquivos
Comment[ru]=Просмотр файловой системы
Comment[sr]=Разгледај систем датотека
Comment[sr@latin]=Pregledaj fajl sistem
Comment[sv]=Bläddra i filsystemet
Comment[zh_CN]=浏览文件系统
Keywords=file;manager;file-manager;

I entered "$PATH" (minus the quotes) into LXTerminal which gave me the following output.

Code: [Select]
bash: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games: No such file or directory
I opened Leafpad from the Run option, of the Main Menu, using sudo (i.e. sudo leafpad).

I created the custom-spacefm.desktop file that you suggested but SpaceFM didn't appear anywhere in the Main Menu.

I modified the Exec entry to include the full path for spacefm (/usr/bin/spacefm %U) but SpaceFM still didn't appear anywhere in the Main Menu.

Ah, HUH!!  ::)

I just tried Logout/Logout and Logged In again and Bingo all Menu entries, created via the installation process and the one I manually created, for SpaceFM appeared. (I shall have to try Logging Out and In in the MATE version to see if the changes made by Mozo appear in the Menus.)

So, now, I have another question because of some things I observed in the Desktop Configuration files.

Utility is the First Category listed for SpaceFM File Search which appears in the Accessories Sub-menu. Similarly, Network is the First Category listed for Iceweasel which appears in the Internet Sub-menu. How are Utility and Network correlated to Accessories and Internet respectively?

Thanks, Michael.

cuscotravelservices

  • Sr. Member
  • ****
  • Posts: 104
    • View Profile
    • Cusco Travel Services
Re: How do you edit the LXDE Main Menu?
« Reply #11 on: August 06, 2014, 02:35:19 AM »
Well, I installed alacarte again and this time I Logged Off and On again and the Main Menu item appeared in the Accessories menu.

Clicking on the Main Menu item opened alacarte but I still couldn't make any changes.  :'(

Opening alacarte from the Terminal produced the following.

Code: [Select]
(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:57:14: Theming engine 'unico' not found

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:608:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:621:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:635:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:690:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:696:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:895:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:902:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:995:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1096:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1106:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1430:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1830:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1856:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1966:24: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1972:24: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:1990:24: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2070:0: unknown @ rule

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2155:97: 'currentColor' is not a valid color name

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2163:32: Junk at end of value

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2169:13: 'animation' is not a valid property name

(alacarte:5979): Gtk-WARNING **: Theme parsing error: menu_frame.css:111:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: menu_frame.css:121:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: menu_frame.css:143:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: menu_frame.css:147:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: menu_frame.css:158:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: menu_frame.css:174:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: menu_frame.css:187:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: sidebar.css:17:17: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: sidebar.css:33:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gtk-widgets-assets.css:30:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gnome-panel.css:86:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: tabs.css:75:15: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gnome-applications-light.css:23:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gnome-applications-light.css:95:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gnome-applications-light.css:102:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gnome-applications-light.css:112:18: Horizontal and vertical offsets are required

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gnome-applications-light.css:205:23: 'px' is not a valid color name

(alacarte:5979): Gtk-WARNING **: Theme parsing error: gnome-applications-light.css:209:23: 'px' is not a valid color name


Opening alacarte as sudo from the Terminal produced the same result as before.

Can mozo be used in the LXDE environment?

Thanks, Michael.

blaze

  • wattOS Veteran
  • Sr. Member
  • ****
  • Posts: 441
  • blazing away
    • View Profile
Re: How do you edit the LXDE Main Menu?
« Reply #12 on: August 06, 2014, 08:26:10 PM »
Installed SpaceFM to WattLXDE, it ended up under System Tools in the menu. SpaceFM file search ended up under Accessories.
How To Ask Questions The Smart Way; http://www.catb.org/~esr/faqs/smart-questions.html

... and when SOLVED, please edit thread title in first post! :)