Originally Posted by
gokiwi
I am nearly (but not quite) 50 years old and have only ever used Windows products.
So am I, but I got onto Linux about 6 years ago. Still learning...
Can someone help please before I either throw this damn machine out of the window or
reformat it with Windows ?
NO, NO, DON'T DO IT!!!
Trying to install an application called OpenNMS
Are you following these instructions?
http://www.opennms.org/wiki/Installationebian
If not, you should be, but I think you are.
Oh this is where I have got stuck, not even got out of the starting blocks !
To set up APT to talk to the OpenNMS repository, you'll need to create a file called "opennms.list" within the "/etc/apt/sources.list.d" directory, with the following contents:
# contents of /etc/apt/sources.list.d/opennms.list deb
http://debian.opennms.org stable main deb-src
http://debian.opennms.org stable main
There is a GUI way to do this (i.e. using graphical tools rather than the command line) in Ubuntu.
Open the software centre. In the "edit" menu, choose "package sources". You will be asked for your password. Go to the tab "other software" and click on "add". Put the url from the instruction above in the box.
To do it from the command line.
You are wanting to create a file in a folder belonging to root, so you need to start the editor with root privileges. The syntax for creating a file with gedit is "gedit </path/to/filename>"
So you need to do
Code:
gksudo gedit /etc/apt/sources.list.d/opennms.list
which should open a new file in the editor that will be saved to the location you have specified when you opened it.
but need to edit files and add software etc but need to be able to login as root to get access to edit these files etc ,
You can't log in as root on Ubuntu. Linux does always have a root account, but it is disabled in Ubuntu. The mechanism that is used to carry out administrative tasks is sudo. If it is a command in the terminal that runs in the terminal, you put sudo in front of the command.
You will be asked for your password, but wont see what you type when you enter it. Type the password and hit enter.
If the command invokes a graphical application, you should use gksudo to avoid a small chance of messing up some file permissions.
http://www.psychocats.net/ubuntu/graphicalsudo
That site is, incidentally, worth browsing. There is some good stuff there.
Anyway, we were on gksudo. You will have noticed it is in the command above to open gedit to deal with files owned by root. Gksudo invokes the password box, the same as when you want to install via the software centre or whenever else the system needs root privileges to do something.
Another useful one is
to open an instance of the file manager as root. This allows you to use, for instance, graphical tools to change permissions on files that belong to root, or open a file belonging to root in the editor to be edited by clicking on it.
Actually, you normally should not be changing permission on files that belong to root, but occasionally one gets created with the wrong permissions, and only root can save the world. Be careful with the file manager with root permissions. Don't invoke it unless you specifically need it, and close it a soon as you have finished. You can do a lot of damage to your system in there, as you also can by invoking the editor gedit with root privileges. There are lots of good reasons why a linux system is not normally used as root.
Bookmarks