SOLVED! Edit menu default entries

Forum rules
Before you post please read this

SOLVED! Edit menu default entries

Postby ccc on Sat Mar 03, 2012 10:27 pm

Hi

Where are default entries from panel menu stored?
Last edited by ccc on Mon Mar 05, 2012 5:00 pm, edited 1 time in total.
ccc
Level 2
Level 2
 
Posts: 98
Joined: Sat Jul 23, 2011 7:40 pm

Linux Mint is funded by ads and donations.
 

Re: Edit menu default entries

Postby seppalta on Sat Mar 03, 2012 11:54 pm

Not sure what you are asking. Main menu items are coordinated with .desktop files, the main menu categories are /etc/xdg/menus, and the taskbar (panels) controls can be brought up by right clicking the panel. See for http://douwil7.100webspace.net/linux/Tuning.html for more information and details.
seppalta
Level 4
Level 4
 
Posts: 390
Joined: Wed Jun 08, 2011 12:08 pm

Re: Edit menu default entries

Postby ccc on Sun Mar 04, 2012 6:20 pm

I'd like to change & find out where the "Logout" button from the main menu is.
It is not /etc/xdg/menus and not in /usr/share/applications.
ccc
Level 2
Level 2
 
Posts: 98
Joined: Sat Jul 23, 2011 7:40 pm

Re: Edit menu default entries

Postby baptiste on Sun Mar 04, 2012 6:45 pm

found it in ~/.config/lxpanel/LXDE

in the config file for the panel, you have this entry for the "start menu".
this looks easy and plain, I guess we can add an icon for the run box dialog :)

Code: Select all
Plugin {
    type = menu
    Config {
        image=/usr/share/lxde/images/lxde-icon.png
        system {
        }
        separator {
        }
        item {
            command=run
        }
        separator {
        }
        item {
            image=gnome-logout
            command=logout
        }
    }
}


lxpanel may overwrite it so it may be best to refrain from right-clicking, or making the file read-only and see how much it likes that.
baptiste
Level 2
Level 2
 
Posts: 95
Joined: Sun Jan 22, 2012 12:25 am

Re: Edit menu default entries

Postby baptiste on Sun Mar 04, 2012 6:48 pm

and the other config file is that, which contains what is run if you hit the button, less useful but you could do something crazy like a command that logs you out right now with no warning.

Code: Select all
[Command]
FileManager=pcmanfm %s
Terminal=x-terminal-emulator
Logout=lxde-logout


everything else, that deals with .desktop files and maybe /etc/xdg/this_and_that, is what is called by "system {" in the file.
lxmed deals brilliantly with that (if you hadn't installed it yet)
baptiste
Level 2
Level 2
 
Posts: 95
Joined: Sun Jan 22, 2012 12:25 am

Re: Edit menu default entries

Postby ccc on Sun Mar 04, 2012 7:40 pm

What I really need, if I press on "Logout" button from the main menu, the machine should shutdown immediately, without a pop-up or asking anything.
Do you know howto configure?
ccc
Level 2
Level 2
 
Posts: 98
Joined: Sat Jul 23, 2011 7:40 pm

Re: Edit menu default entries

Postby ccc on Sun Mar 04, 2012 7:56 pm

Thx a lot for the excellent support it works well now!

Below howto change "Logout" instead of session logout to the system shutdown:

I've changed in /.config/lxpanel/LXDE/config:
Code: Select all
[Command]
FileManager=pcmanfm %s
Terminal=x-terminal-emulator
[b]Logout=/usr/bin/lxde-session-shutdown.sh[/b]


I've changed /usr/share/applications/lxde-logout.desktop:
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Logout
Name[de]=Abmelden
Name[fi]=Kirjaudu ulos
Name[pt]=Terminar sessão
Name[zh_TW]=登出
Comment=shutdown
Comment[de]=Abmelden, herunterfahren oder neu starten
Comment[fi]=Kirjaudu ulos, sammuta tai käynnistä tietokone uudelleen
Comment[pt]=Terminar sessão, desligar ou reiniciar
Comment[zh_TW]=登出、關機、或重新開機
Icon=gnome-logout
Exec=/usr/bin/lxde-session-shutdown.sh
NoDisplay=true


and I've created this shutdown script /usr/bin/lxde-session-shutdown.sh:
Code: Select all
#! /bin/sh
sudo /sbin/shutdown -h now $*
ccc
Level 2
Level 2
 
Posts: 98
Joined: Sat Jul 23, 2011 7:40 pm

Linux Mint is funded by ads and donations.
 

Return to Others

Who is online

Users browsing this forum: No registered users and 0 guests