Find the answer to your Linux question:
Results 1 to 5 of 5
I am trying to edit the sources.list file to install I am getting this error debian:/home/sp# sudo gedit sources.list Xlib: connection to ":0.0" refused by server Xlib: No protocol specified ...
  1. #1
    Just Joined! nyblueguy's Avatar
    Join Date
    May 2006
    Posts
    48

    cannot open sources.list

    I am trying to edit the sources.list file to install

    I am getting this error
    debian:/home/sp# sudo gedit sources.list
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified


    (gedit:6734): Gtk-WARNING **: cannot open display:
    debian:/home/sp# apt-get install gedi

    anyone know what this is about?

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,562
    Not really sure but there is always the option of opening it from a command line editor. There are several to choose from. I use "joe" mostly but there's also Pico, Nano, Vi and others. Chances are you have Vi. As root:
    Code:
    vi /etc/apt/sources.lst
    Use the arrow keys to get around. Press the "insert" key before editing. To save and close press
    Code:
    Esc [then] :x
    ...and Enter.
    For more on vi see here.
    Linux Mint + IceWM Registered:#371367 New Members: click here

  3. #3
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    From the hash mark (#) in your prompt, it looks like you're calling that command as root. I'm guessing you opened a terminal as a regular user, then did su to change to root. That would explain the X server refusing to connect. To do X-related stuff with root privileges from a terminal, your best option is to use sudo as a regular user. Or if you prefer to switch to root, you can use sux instead of su (you'll have to apt-get install sux first, because it's not included).

    But I'd go with Dapper Dan's suggestion of a good CLI editor. Nano comes with Ubuntu, and is plenty easy to use.
    Stand up and be counted as a Linux user!

  4. #4
    Just Joined! nyblueguy's Avatar
    Join Date
    May 2006
    Posts
    48

    got it

    I got it to work. added my user to the visudo file. is this bad? not sure. I was getting the error that my user was not a memeber of the sudo group. I have been doing some updates trying to get kde working right with etch. so far so good.

  5. #5
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    that's not bad at all, excellent tinkering in a minor way...keep reading them man pages and playing with all aspect of your system...its YOUR system
    Operating System: GNU Emacs

Posting Permissions

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