LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   XFCE menus in AWN, solution! (https://www.linuxquestions.org/questions/linux-newbie-8/xfce-menus-in-awn-solution-924472/)

MogaMoga 01-18-2012 02:06 PM

XFCE menus in AWN, solution!
 
When installing Avant Window Navigator with XFCE (in my case on a LMDE Linux Mint install), the gnome menus, settings etc pop up when you use for example Cairo Menu Applet. I couldn't find a way to get the proper XFCE menus to work - googled but found nothing - so here's a solution. It's quite a lot of terminal typing, maybe someone has a better solution, but here goes:

(newbie tip - ctrl-c the command in your browser, then paste it in the terminal with ctrl-shift-v)

First, the applications entries in the menu:

1) Make the gnome menu files unreachable:

cd /etc/xdg/menus
sudo mv gnome-applications.menu original.gnome-applications.menu
sudo mv gnome-settings.menu original.gnome-settings.menu
sudo mv gnomecc.menu original.gnomecc.menu


2) make AWN think that your local XFCE menu file is the Gnome menu file:

cd ~/.config/menus
ln -s xfce-applications.menu gnome-applications.menu


Then the settings entry in the menu, a bit more complicated:

3) copy the settings entries into your local folder so you can modify them:

cd /usr/share/applications
cp *.desktop ~/.local/share/applications


4) Make the XFCE settings menu entries show up in AWN:

cd ~/.local/share/applications
find -type f -exec sed -i 's/OnlyShowIn=XFCE;//g' {} \;


5) Hide the Gnome-specific settings (the ones I could think of anyway)


find at-properties.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find default-applications.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find display-properties.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find gnome-about-me.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find gnome-appearance-properties.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find gnome-network-properties.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find gnome-settings-mouse.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find gnome-theme-installer.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find gnomecc.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find keybinding.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find keyboard.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find window-properties.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find gnome-user-share-properties.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find session-properties.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find gnome-power-preferences.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
find gnome-power-statistics.desktop -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
echo 'OnlyShowIn=OPENBOX;' >> gnome-font-viewer.desktop


6) restart AWN:

killall avant-window-navigator

7) press Alt-F2 and run avant-window-navigator again

8) done!

EricTRA 01-23-2012 12:45 AM

Hello,

Thank you for sharing your solution. May I suggest you mark your thread as solved indicating your post includes a solution? Off the Zero Reply List.

Kind regards,

Eric

MogaMoga 01-23-2012 06:25 AM

Yeah, marked as solved now.

Easier step 5, with only 2 lines (didnt try it since i'm on a winxp computer now, but should work)

find -type f -exec sed -i 's/OnlyShowIn=GNOME;/OnlyShowIn=OPENBOX;/g' {} \;
echo 'OnlyShowIn=OPENBOX;' >> gnome-font-viewer.desktop


Cheers


All times are GMT -5. The time now is 10:01 PM.