Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-11-10 18:36:53

marsdenf
Member
Registered: 2014-10-25
Posts: 10

[SOLVED] Deleted menu file, possible to re-create it?

Using Xubuntu 14.04 with xfce4 4.10.  I accidentally deleted both copies of the applications menu, I thought they would be automatically re-created. (I have done this before and it worked.)  Is there any way to get it back?

Last edited by marsdenf (2016-11-10 23:47:24)

Offline

#2 2016-11-10 20:36:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [SOLVED] Deleted menu file, possible to re-create it?

Which "both copies"? The one in ~/.config/menus and the one in /etc/xdg/xdg-xubuntu/menus? If so, re-install the xubuntu-default-settings package - it will restore /etc/xdg/xdg-xubuntu/menus/xfce-applications.menu.

Or, grab it from here and manually recreate it in the correct location.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2016-11-10 22:27:56

marsdenf
Member
Registered: 2014-10-25
Posts: 10

Re: [SOLVED] Deleted menu file, possible to re-create it?

I tried reinstalling xubuntu-default-settings and then rebooting, twice using terminal and synaptic.  Didn't work.  I downloaded the .tar.gz file you linked to, but I don't know what to do with it.  Where should it be extracted to?

Offline

#4 2016-11-10 23:08:44

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [SOLVED] Deleted menu file, possible to re-create it?

Perhaps the issue isn't what I thought it was. Which copies of the menu file did you delete? What file(s) are you talking about? From which directories?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2016-11-10 23:16:07

marsdenf
Member
Registered: 2014-10-25
Posts: 10

Re: [SOLVED] Deleted menu file, possible to re-create it?

If I remember correctly, deleted xfce-applications.menu from both .config and /xdg...  Perhaps I should uninstall xubuntu-default-settings before (re)installing?

Offline

#6 2016-11-10 23:24:58

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [SOLVED] Deleted menu file, possible to re-create it?

You could also just manually re-create the /etc/xdg/xdg-xubuntu/menus/xfce-applications.menu file with the following content:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
  "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">

<Menu>
    <Name>Xfce</Name>

    <DefaultAppDirs/>
    <DefaultDirectoryDirs/>

    <Include>
        <Filename>exo-web-browser.desktop</Filename>
        <Filename>exo-mail-reader.desktop</Filename>
        <Filename>ubuntu-software-center.desktop</Filename>
        <Filename>xfhelp4.desktop</Filename>
        <Filename>xubuntu-website.desktop</Filename>
        <Filename>xubuntu-contribute.desktop</Filename>
        <Filename>xfce4-about.desktop</Filename>
        <Filename>xfce4-session-logout.desktop</Filename>
    </Include>

    <Layout>
        <Filename>exo-web-browser.desktop</Filename>
        <Filename>exo-mail-reader.desktop</Filename>
        <Separator/>
        <Merge type="all"/>
        <Separator/>
        <Filename>ubuntu-software-center.desktop</Filename>
        <Separator/>
        <Filename>xfhelp4.desktop</Filename>
        <Filename>xubuntu-website.desktop</Filename>
        <Filename>xubuntu-contribute.desktop</Filename>
        <Filename>xfce4-about.desktop</Filename>
        <Filename>xfce4-session-logout.desktop</Filename>
    </Layout>

    <Menu>
        <Name>Accessories</Name>
        <Directory>xfce-accessories.directory</Directory>
        <Include>
            <Or>
                <Category>Accessibility</Category>
                <Category>Core</Category>
                <Category>Legacy</Category>
                <Category>Utility</Category>
            </Or>
        </Include>
        <Exclude>
            <Or>
                <Filename>xfce4-about.desktop</Filename>
                <Category>Settings</Category>
                <Category>System</Category>
            </Or>
        </Exclude>

        <Layout>
            <Filename>xfce4-run.desktop</Filename>
            <Filename>xfce4-appfinder.desktop</Filename>
            <Separator/>
            <Merge type="all"/>
        </Layout>
    </Menu>

    <Menu>
        <Name>Development</Name>
        <Directory>xfce-development.directory</Directory>
        <Include>
            <Category>Development</Category>
        </Include>
    </Menu>

    <Menu>
        <Name>Education</Name>
        <Directory>xfce-education.directory</Directory>
        <Include>
            <Category>Education</Category>
        </Include>
    </Menu>

    <Menu>
        <Name>Games</Name>
        <Directory>xfce-games.directory</Directory>
        <Include>
            <Category>Game</Category>
        </Include>
    </Menu>

    <Menu>
        <Name>Graphics</Name>
        <Directory>xfce-graphics.directory</Directory>
        <Include>
            <Category>Graphics</Category>
        </Include>
    </Menu>

    <Menu>
        <Name>Multimedia</Name>
        <Directory>xfce-multimedia.directory</Directory>
        <Include>
            <Category>Audio</Category>
            <Category>Video</Category>
            <Category>AudioVideo</Category>
        </Include>
    </Menu>

    <Menu>
        <Name>Network</Name>
        <Directory>xfce-network.directory</Directory>
        <Include>
            <Category>Network</Category>
        </Include>
        <Exclude>
            <Or>
                <Filename>exo-mail-reader.desktop</Filename>
                <Filename>exo-web-browser.desktop</Filename>
            </Or>
        </Exclude>
    </Menu>

    <Menu>
        <Name>Office</Name>
        <Directory>xfce-office.directory</Directory>
        <Include>
            <Category>Office</Category>
        </Include>
    </Menu>

    <Menu>
        <Name>Settings</Name>
        <Directory>xfce-settings.directory</Directory>
        <Include>
            <Category>Settings</Category>
        </Include>
        <Exclude>
            <Or>
                <Filename>exo-mail-reader.desktop</Filename>
                <Filename>exo-web-browser.desktop</Filename>
            </Or>
        </Exclude>

        <Layout>
            <Filename>xfce-settings-manager.desktop</Filename>
            <Separator/>
            <Merge type="all"/>
        </Layout>
    </Menu>

    <Menu>
        <Name>System</Name>
        <Directory>xfce-system.directory</Directory>
        <Include>
            <Or>
                <Category>Emulator</Category>
                <Category>System</Category>
            </Or>
        </Include>
        <Exclude>
            <And>
                <Category>Settings</Category>
                <Not><Category>PackageManager</Category></Not>
            </And>
            <Or>
                <Filename>xfce4-session-logout.desktop</Filename>
                <Filename>ubuntu-software-center.desktop</Filename>
            </Or>
        </Exclude>
    </Menu>

    <Menu>
        <Name>Other</Name>
        <Directory>xfce-other.directory</Directory>
        <OnlyUnallocated/>
        <Include>
            <All/>
        </Include>
        <Exclude>
            <Category>Settings</Category>
            <Category>Screensaver</Category>
            <Category>X-Xfce-Toplevel</Category>
        </Exclude>
    </Menu>
    <DefaultMergeDirs/>

</Menu>

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2016-11-10 23:40:08

marsdenf
Member
Registered: 2014-10-25
Posts: 10

Re: [SOLVED] Deleted menu file, possible to re-create it?

Thank you.  I created the file with the content you posted and put it in /etc/xdg/... and rebooted, and now everything is back to normal.  I deleted the files because I wanted the application menu to be in alphabetical order, some entries were out of place.  Never again will I delete a file using shift+delete, from now on I will send it to the recycle bin first.  Is there now an automatic way to mark this thread as solved, or should I manually edit post title?

Offline

#8 2016-11-10 23:43:42

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [SOLVED] Deleted menu file, possible to re-create it?

Glad it worked.
Edit the first post and prepend [SOLVED] to the subject field.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2017-03-23 05:45:47

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [SOLVED] Deleted menu file, possible to re-create it?

Thanx, Toz!  I'm running Fedora 25 with Xfce.  I just had to reinstall, saving /home and I was trying to tidy up the menu a tad with Alacarte, but something went wrong.  When I right-clicked on the desktop, the Applications Menu didn't show up, just a tiny white rectangle, and it didn't show up at all when I clicked on the menu button on the panel.  I reinstalled xfce4-settings, logged out and back in, and everything is back.  Now, on a side note, could I make a copy of the menu file in ~/.config and restore it if things go bad, or are there reasons not to do that?


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#10 2017-03-23 12:08:38

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [SOLVED] Deleted menu file, possible to re-create it?

Sideburns wrote:

Now, on a side note, could I make a copy of the menu file in ~/.config and restore it if things go bad, or are there reasons not to do that?

Yes you could. I would backup all the files in the ~/.config/menu folder (and subfolders if they exist).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2017-04-30 23:49:49

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [SOLVED] Deleted menu file, possible to re-create it?

I tried another menu editor with the same results.  Now, reinstalling xfce4-settings doesn't help.  Reconstructing the .xml in /etc/xdg does nothing and doing both together is no help.  I've completely lost my Settings and Administration menus and can't even get them back from a backup because I never backed that specific folder up.  I do have a working version of Fedora 25 with Xfce on a thumb drive and can try transferring that version over, but if that fails, what else can I try?


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#12 2017-04-30 23:59:07

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [SOLVED] Deleted menu file, possible to re-create it?

No, that didn't work because the folder ~/.config/menu doesn't exist on that system.  Weird.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#13 2017-05-01 02:17:47

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: [SOLVED] Deleted menu file, possible to re-create it?

The default xfce menu files are packaged in garcon and they sit in /etc/xdg/menus. However, some distros like to create their menu defaults. For example, Xubuntu puts theirs in /etc/xdg/xdg-xubuntu. I'm not sure if fedora creates it's own versions of the Xfce files or not.

If you know the name of the menu file that you are trying to restore, I believe you can do something like:

yum whatprovides <name_of_file>

...and it will tell you what package the file came from. You can then re-install that package (or download the package source and extract it).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#14 2017-05-01 03:11:28

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [SOLVED] Deleted menu file, possible to re-create it?

I have no way of knowing which menu file I need restored, just that my Administration menu has only one, unnamed item on it and the Settings menu isn't showing up.  And, BTW, Fedora hasn't used yum for at least two years; it's been replaced by dnf, largely because of the (not always accurate) belief that new must be better.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

#15 2017-05-01 03:34:33

Sideburns
Member
From: Trinidad, CO
Registered: 2011-03-30
Posts: 467
Website

Re: [SOLVED] Deleted menu file, possible to re-create it?

After posting, I logged out, switched to a text terminal and reinstalled xfce4-settings again.  (This isn't an example of classic insanity, as it has worked in the past.)  Then I logged back in, and things were back where they should be.  I'm planning to back up tomorrow, so I'll add ~/.config to the list of things backed up so I have more than one way to recover from this.  I just wish that I could find a menu editor that actually worked and didn't leave things in such an inconvenient state.


Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.

Offline

Board footer

Powered by FluxBB