Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-22-2005, 07:38 PM   #1
LQ Newbie
Registered: Sep 2005
Distribution: Debian Sarge
Posts: 8

Rep: Reputation: 0
editing /etc/apt/sources.list in the GUI

Hello all,

Iíve just completed my first Linux install-Debian Sarge. Iíve been reading voraciously about linux for the last week trying to learn. Anyway, my question isóI have a NVIDIA GeForce 5700 256 mb agp card and I wanted to change the driver from the stock ďnvĒ driver to the NVIDIA driver from their website. Iíve read the readme for that driver and the howto (h**p:// so I got to the point were I was supposed to edit the file /etc/apt/sources.list and the editor window indicated that the file is read only. I tried logging on the GUI as root but I received that message that this user cannot log on from this screen. Is their anyway to edit this file using the GUI? As Iíve only been using linux about a week now Iím not very comfortable with the command line (although I hope to get there). Thanks for the help

Old 09-22-2005, 07:57 PM   #2
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Log onto the GUI as a normal user (non-root, as you always should), open a terminal window, then type "su" and your root password (when prompted) to become root. Then type "pico /etc/apt/sources.list" or "nano /etc/apt/sources.list" to edit the file. When you're done, save the file, and type "exit" in the terminal to return to being your normal user.
Old 09-22-2005, 08:01 PM   #3
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Yes, there is. First, I assume you are logged in as user, not as root.

First thing to do is find the GUI editor executable you want to use.
Example: let's assume you are working in the KDE environment, and you want to use kwrite to edit the file.

We will start getting you some command-line experience, gently. Open a terminal window (the computer screen icon in the tray, with the scallop shell superimposed). Just click on it. When the screen is up, enter this command: which kwrite, and press enter. It should show you the path to the kwrite executable (by the way, you can do this for any application).

Now. You need to be able to edit a file which, normally, only the root (sysadmin) has permission to use. But, you can't do it in a GUI unless you give another command-line command first. Ready? Here it is. As user, give this command: xhost +localhost, and press enter.

Now su to root (that means, enter the su command and press enter, then enter the root password, and press enter again.

Now, you are root. Enter the entire path to the executable for the GUI editor you want to use, and when it opens, you are using it as root, not user. Click on File in the menubar, then Open, then browse to the file you want to edit as root. Save when done editing.

For safety sake, close and exit the application when you're done, and when the prompt returns in the term window, type 'exit' and press enter. That will return you to the user prompt, and you don't risk doing something disastrous as root, inadvertantly.
Old 09-22-2005, 08:33 PM   #4
Senior Member
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86

kwrite /etc/apt/sources.list

gedit /etc/apt/sources.list
Old 09-22-2005, 09:34 PM   #5
Senior Member
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
Uh if you are logged in as root the su command will give you an error.

If you are using KDE the command is kdesu kwrite
Gnome gksu gedit

Most apps that need a GUI will give an error when trying to use the "su" command.

You can also install an app called grun. It popups up an open dialog , from there you can search for whatever app you want to run.

If you are in the USA the sources.list in my sig is a good one. The only thing I don't have is a NVidia driver repo listed.
Old 09-22-2005, 11:40 PM   #6
LQ Newbie
Registered: Sep 2005
Distribution: Debian Sarge
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for the help you guys. That was much easier than I thought it would be.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Recommendation for Debian Etch sources.list ( /etc/apt/sources.list ) forgox Debian 6 05-05-2007 02:57 PM
apt sources.list TranceDude Linux - Software 11 08-13-2005 02:22 PM
apt-get update errors since Debian released ( bad /etc/apt/sources.list ?) forgox Debian 10 06-13-2005 01:28 PM
apt-get sources.list utw-mephisto Debian 5 05-18-2005 12:36 AM
APT sources.list pen^2 Fedora 2 09-09-2004 08:43 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration