Results 1 to 7 of 7

Thread: Editing System files as 'root'

  1. #1
    Junior Member
    Join Date
    Feb 2005
    Posts
    3

    Editing System files as 'root'

    Hello,
    I'm a totaly Linux- newbie and new in this forum, so please have mercy!
    I just installed Knoppix 3.7 yesterday, because I found it pretty good. I put it on a separate HDD, cause I wanted to avoid any risks for my two NTFS-partitions.
    Lilo installed, XP was still running, everything seems to work.
    Today I wanted to edit some .conf files, because my epson scanner needs to be activated this way.
    I realized, that I had to do this with root-access. For an old DOS-Nerd this is something completely new, so I spent several hours with searching for the right commands.
    The .conf-file is owned by root so
    This is what I tried:
    I open the shell ("DOS-Box")
    I type SU and the admins password
    I try to start kwrite to navigate to the file and edit it
    This is what appears:
    pit@Peter:~$ su
    Password:
    root@Peter:/home/pit# kwrite /etc/sane.d/epson.conf
    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified
    kwrite: cannot connect to X server :0.0
    root@Peter:/home/pit#[/color]

    I hope it's just me being too silly for that, so please tell me what to do.

    PIT

  2. #2
    Member registered user
    Join Date
    Jan 2005
    Posts
    71
    well, your problem is, that the way you opened the root shell, you don't have the right to open any window manager programs ; but fortunatly there are several options how to go on:

    * open another console window and issue a "xhost +localhost" command. You can now connect from the root console.
    * open a root console from the KNOPPIX menu - it has the right to open window manager programs.
    * from a console window connect via "ssh root@localhost" to your computer - this should enable a X11 tunnel, so that you
    can use X11 programs. Works also for remote computers.
    * use a text editor (such as vi, joe, emacs, ...) to edit the conf file.

    Ciao,
    Thomas

  3. #3
    Junior Member
    Join Date
    Feb 2005
    Posts
    3
    Hi Thomas,
    thanks a lot, you made it!
    After this I was able to edit everything.

    Doesn't mean I know what I'm doing....but now I can learn from my mistakes ;-D

    Many thanks
    PIT

  4. #4
    Senior Member registered user
    Join Date
    Jan 2005
    Posts
    200
    You don't need an x11 session to edit a conf file. You can simply su, then edit the file by typing 'vi filename'
    It's that simple. It will give you an error message on exit, but the file will still be written correctly.

  5. #5
    Senior Member registered user
    Join Date
    Oct 2004
    Location
    london town
    Posts
    220
    you can open the file manager as a super user.

    click the k then system, more programs. it should be there if its not either do it in the console or look for it

  6. #6
    Junior Member
    Join Date
    Feb 2005
    Posts
    3
    Hello again,
    I just made my first scan, almost everything works fine.....unfortunately not really anything!
    Infocenter detected my scanner (epson 2480), but kooka didn't!!!! No scan-prog did!!!

    Then I remebered my first problem and I remebered what Tom said: "start console from the knoppix-menu..."
    "sane-find-scanner" found the damn thing while the same command didn't from the "ordinary-console".
    So I started kooka from root-console....and it finaly worked!!!

    My problem is: this could never be the right way to get these things started, could ist?
    Is there's something wrong with my boot-sequence? What have I done to deserve this....

    Please set me back on track again.

    PIT

  7. #7
    Senior Member registered user
    Join Date
    May 2003
    Posts
    981
    Using a terminal editor such as vi will work but you may find terminal editors (especially vi) unfamiliar & prefer an X based editor. IMHO the best is 'Kate'.

    There are a couple of ways to run X applications as root:

    The first (as mentioned above) is first type 'xhost localhost' as user, you can then start x apps from root console.

    You can also use kdesu from a terminal (logged in as user): eg 'kdesu konqueror' will start konqueror as root. To use kdesu you must first set a password for root, 'sudo passwd' will do that.

    I have desktop start icons for konqueror-as-root & kate-as-root. These I just drag'n'drop copied the icons from the start menu to the desktop then edited the properties application to run to be 'kdesu kate' instead of just 'kate'.

Similar Threads

  1. Video Editing System
    By armoredcars in forum MS Windows & New to Linux
    Replies: 4
    Last Post: 10-02-2006, 04:33 AM
  2. Editing files on HDA....
    By photosoupguru in forum General Support
    Replies: 3
    Last Post: 01-11-2005, 05:26 AM
  3. terminal as root for editing-no good
    By pgk3734 in forum General Support
    Replies: 4
    Last Post: 06-27-2004, 07:51 PM
  4. how do I log in as root? (to enable me to edit system files)
    By purplehaze in forum General Support
    Replies: 4
    Last Post: 06-25-2003, 06:54 PM
  5. Editing boot.img help files
    By rdmelin in forum Customising & Remastering
    Replies: 0
    Last Post: 06-25-2003, 01:01 AM

Posting Permissions

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


Cisco SFP-10/25G-CSR-S 10/25GBASE-CSR SFP28, 850nm, 100m, LC,  picture

Cisco SFP-10/25G-CSR-S 10/25GBASE-CSR SFP28, 850nm, 100m, LC,

$54.00



Cisco SFP-10G-T-X 10GBASE-T SFP+, 80m@Cat6a/Cat7, Copper, RJ45 picture

Cisco SFP-10G-T-X 10GBASE-T SFP+, 80m@Cat6a/Cat7, Copper, RJ45

$83.99



1m (3ft) Cisco QSFP-H40G-CU1M Compatible 40G QSFP+ Passive Direct Attach Copper  picture

1m (3ft) Cisco QSFP-H40G-CU1M Compatible 40G QSFP+ Passive Direct Attach Copper

$57.00



Cisco SFP-25G-SR-S 25GBASE-SR SFP28, 850nm, 100m, LC, MMF picture

Cisco SFP-25G-SR-S 25GBASE-SR SFP28, 850nm, 100m, LC, MMF

$54.00



Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module 10-2415-03  picture

Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module 10-2415-03

$8.00



NEW Sealed Cisco SFP-10G-LR 10GBASE-LR SFP+ 1310nm 10km *US Shipping* picture

NEW Sealed Cisco SFP-10G-LR 10GBASE-LR SFP+ 1310nm 10km *US Shipping*

$18.00



Brand New Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Module 1310nm 10km SMF LC picture

Brand New Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Module 1310nm 10km SMF LC

$13.89



Genuine Cisco GLC-TE 30-1475-01 V01 1000BASE-T SFP COPPER RJ-45 100M TRANSCEIVER picture

Genuine Cisco GLC-TE 30-1475-01 V01 1000BASE-T SFP COPPER RJ-45 100M TRANSCEIVER

$11.90



LOT OF 20 Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module picture

LOT OF 20 Genuine Cisco SFP-10G-SR V03 10GBASE-SR SFP+ Transceiver Module

$89.00



10 PCS Cisco GLC-LH-SMD 10-2625-01 1310nm SFP Transceiver Module picture

10 PCS Cisco GLC-LH-SMD 10-2625-01 1310nm SFP Transceiver Module

$85.00