Results 1 to 6 of 6

Thread: Main Menu

  1. #1
    Join Date
    2013-Jun
    Posts
    3

    Question Main Menu

    Application->System Tools->Preference->Main Menu

    Can't Move Item Up&Down or Uncheck Item

  2. #2
    Join Date
    2013-Jun
    Location
    Italy
    Posts
    4
    I have the same problem, only that I can uncheck, but not delete

  3. #3
    Join Date
    2013-Jun
    Posts
    3
    thank you for reply

    could you tell me how to change main menu layout manual?

    i try edit /etc/xdg/menus/gnome-applications.menu but nothing changed...

  4. #4
    Join Date
    2013-Jun
    Location
    Italy
    Posts
    4
    Sorry, but I have never gone into this thing. I used ubuntu and there always worked the menu

  5. #5
    Join Date
    2013-Jul
    Posts
    2
    Quote Originally Posted by acme View Post
    Sorry, but I have never gone into this thing. I used ubuntu and there always worked the menu
    Why commenting then?

  6. #6
    Join Date
    2013-Dec
    Location
    greece
    Posts
    14

    My Own Menus

    I just have created a script, that reads :
    ~/.local/share/directories ## add names & icons of custom directories here
    ~/.local/share/applications ## add your .desktop files here

    and insert them into Main menu, ( I use Gnome ) .

    Here is the code :
    Code:
    #!/bin/bash
    
    
    CUSTOM_CATEGORIES=""
    ORPHAN_FILES=""
    
    
    for d in ~/.local/share/desktop-directories/*.directory; do
    	CATEGORIE=`cat "$d"|grep "^Name=" | cut -d \= -f2`
    	CUSTOM_CATEGORIES="$CATEGORIE ${CUSTOM_CATEGORIES}"
    	
    	CFILE="$HOME/.config/menus/applications-merged/user-${CATEGORIE}.menu"
    	[ -f "$CFILE" ] && rm -f "$CFILE" 2>/dev/null
    
    	echo "[+] '$CATEGORIE' (($?)$CFILE)"
    	## xdg-desktop-menu uninstall --novendor --mode user "$d" "$f"
    	
    	for f in ~/.local/share/applications/*.desktop; do
    		F_CATEGORIE=`cat "$f"|grep "^Categories=" |grep "$CATEGORIE" `
    		[ -z "${F_CATEGORIE}" ] && continue	
    		xdg-desktop-menu install --novendor --mode user "$d" "$f"
    		echo "  [$?] $f"
    		done	
    	done
    
    echo ""
    
    if [ "x$1" = "x-v" ]; then	
    	echo "[!] (`echo $CUSTOM_CATEGORIES|wc -w`) Categories found :$CUSTOM_CATEGORIES"	
    	echo "[?] Orphan files:"	
    	for f in ~/.local/share/applications/*.desktop; do
    		F_CATEGORIE=''
    		for d in $CUSTOM_CATEGORIES; do 
    			[ -z "$F_CATEGORIE" ] && F_CATEGORIE=`cat "$f"|grep "^Categories=" |grep "$d"`; 
    			done
    		[ -n "${F_CATEGORIE}" ] && continue	
    		echo "  [?] `basename "$f" .desktop` (`cat "$f"|grep "^Categories="|cut -d \= -f2`)"
    		done	
    fi
    
    
    xdg-desktop-menu forceupdate --mode user || echo "[!] forceupdate error !"
    update-menus || echo "[!] update error !"
    exit $?

    Take care that :
    the 'category' field in your .desktop file,
    must be the same, as
    the 'Name' field, in your .directory file,

    and it'll work ....

Similar Threads

  1. Can't install main menu
    By Nukeplosion in forum General Archive
    Replies: 2
    Last Post: 2015-12-29, 13:13
  2. Replies: 2
    Last Post: 2015-12-11, 05:26
  3. Replies: 6
    Last Post: 2013-03-17, 15:49

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •