Editing the program menu

From Internet Tablet Talk

Without root access, you will only be able to edit the Extras menu. To obtain root access, refer to the Wiki entries for How Do I Become Root? and if using Windows XP, Setting up Windows XP to Use the Flasher (For Root Access, USB Host Mode, etc.).

Requirements:

Root access

770 XTerm


Step by Step Instructions:

1.) Run XTerm.

2.) Become root by entering the following:

 sudo gainroot
 su -

3.) Go to the directory containing the menu files/directories: (Tip: You can type the first few letters of a file/directory and tap the tab key for auto-completion.)

 cd /etc/others-menu

4.) List the current menu items by typing:

 ls

5.) Observe the structure format.

  • The number prefix on each of these directories is for sorting. It is not required/displayed, but is useful if you don't want your menu items appearing in alphabetical order.
  • To insert additional spaces, use underscores; '_'. For example: 2100_My_Games
  • Some items have 'tana_fi' in their names. This means the name can be localized, so that tana_fi_games might show up as "Games" in english but "Spiele" in german. Known values are tana_fi_contact, tana_fi_extras, tana_fi_games, tana_fi_home, tana_fi_tools, tana_fi_utilities, and tana_fi_web.
  • If you create a directory and don't place any menu items in it, it will not appear when browsing the menu.
  • Separator bars may be added by copying one of the existing entries. This may be prefixed by a number to set where the separator appears. These files appear to be empty.

6.) Before an example, some basic UNIX/Linux commands must be learned.

  • mkdir

Syntax: mkdir <directory name>

'mkdir', or 'make directory' makes directories.

Example:

 mkdir My_E-Books 

(This will make a directory called My_E-Books under the directory you're currently in.)


  • rmdir

Syntax: rmdir <directory name>

'rmdir', or 'remove directory' removes directories.

Example:

 rmdir My_E-Books 

(This will remove a directory called My_E-Books under the directory you're currently in.)


  • cp

Syntax: cp <source filename> <destination location>

'cp', or 'copy' copies files.

Example:

 cp Nokia770.pdf /tmp 

(with /tmp being the destination location)


  • mv

Syntax: mv <source filename> <destination location>

'mv', or 'move' moves files.

Example:

 mv Nokia770.pdf /tmp 

(with /tmp being the destination location)


  • rm

Syntax: rm <filename>

'rm', or 'remove' removes files.

Example:

 rm Nokia770.pdf 


  • ls

Syntax: rm <filename>

'ls', or 'list' lists contents of the current directory.

Example:

 ls


  • cd

Syntax: cd <directory name>

'cd', or 'change directory' changes the current directory.

Example:

 cd /etc/others-menu

The following is a quick exercise in creating two folders, copying an item into both of them, removing one item, moving the remaining item to another folder, removing the remaining item, and removing the two folders

Creating new menu folders

7.) While in /etc/others-menu, type the following:

 mkdir 9800_Test1
 mkdir 9850_Test2


8.) As mentioned before, clicking on the menu will not show these two folders as they are empty. Enter the games directory:

 cd /etc/others-menu/2100_tana_fi_games

9.) List the contents:

 ls

10.) Copy Chess into the 9800_Test1 directory:

 cp 0100_chess_startup.desktop /etc/others-menu/

9800_Test1 will now appear in the menu and will contain Chess.

11.) Copy Chess into the 9850_Test2 directory:

 cp 0100_chess_startup.desktop /etc/others-menu/

9850_Test2 will now appear in the menu and will contain Chess.

12.) Go to the Test1 directory:

 cd /etc/others-menu/9800_Test1

13.) Remove the copy of Chess:

 rm 0100_chess_startup.desktop

14.) Verify that 9800_Test1 no longer exists in the menu (because it is now empty). Go to the 9850_Test2 directory:

 cd /etc/others-menu/Test2

15.) Move the copy of Chess in this directory to the 9800_Test1 directory

 mv 0100_chess_startup.desktop /etc/others-menu/9800_Test1

16.) Verify that Test1 has reappeared with Chess in it, and that 9850_Test2 has now disappeared.

14.) Go back to the others-menu directory so that we may remove the 9850_Test2 directory:

 cd /etc/others-menu

15.) Remove the Test2 directory:

 rmdir /etc/others-menu/9850_Test2

16.) Enter the Test1 directory;

 cd /etc/others-menu/9800_Test1

17.) Remove the copy of Chess:

 rm 0100_chess_startup.desktop

18.) Go back to the others-menu directory so that we may remove the 9800_Test1 directory:

 cd /etc/others-menu

19.) Remove the 9800_Test1 directory:

 rmdir /etc/others-menu/9800_Test1

20.) Add a separator to the end of the main menu:

 cp 1000_separator /etc/others-menu/9999_separator

(Note that the menu now has a separator at the very bottom)

21.) Remove the additional separator

 rm 9999_separator

22.) When done:

 exit

(Keep typing this until Xterm closes)


Steps 7 through 21 utilize all the commands one would need for rearranging the default menu. They have been simplified such that people with limited linux experience will be able to use them.


All times are GMT -4. The time now is 05:37 PM.