0

I´m trying to install Backtrack on Ubuntu (with Unity).

I´m stuck trying to modify applications.menu file, because it´s readme only. And I can´t change that using the GUI because it´s greyed out.

How may I make that file read/write from the command line, or access it with gedit as root?

Rosamunda
  • 771
  • 4
  • 17
  • 37

3 Answers3

1

You can use nano

sudo nano path/to/file

You can also use gedit

gksudo gedit path/to/file
guntbert
  • 12,914
  • 37
  • 45
  • 86
Aatish Sai
  • 827
  • 7
  • 17
  • Thanks for your reply! How may I use gedit in that way? typing first sudo nano gedit? I´ve tried but it won´t open the gedit application... – Rosamunda Oct 27 '13 at 18:11
1

The best way wold be:

  • Use the following command in terminal:

    sudo -i
    

    to get a shell where you have root privileges.

  • Then use the following command:

     xdg-open /usr/share/app-install/desktop/applications.menu
    

    to open applications.menu file in your favorite text editor.

Radu Rădeanu
  • 166,822
  • 48
  • 327
  • 400
0

I haven't got enough reputation to answer Rosamunda Rosamunda's comment so I'll just answer here.

Instead of using sudo nano gedit use sudo gedit [path].

sudo gives you root priviliges

gedit means you want to start the program gedit.

and then the path. Example:

sudo gedit /usr/share/app-install/desktop/applications.menu

Just a general Linux tip: you are starting a program every time you type a word in the terminal.

[program name] [arguments for the program]

so the next line means start the program gedit and the /usr/share/....... argument tells gedit that it have to open that file.

gedit /usr/share/app-install/desktop/applications.menu

when putting sudo infront of the command tells linux that the command should be run with root priviliges.

sudo gedit /usr/share/app-install/desktop/applications.menu
Seth
  • 57,282
  • 43
  • 144
  • 200
user69969
  • 101
  • 2