-
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
-
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
-
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
-
Senior Member
registered user
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.
-
Senior Member
registered user
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
-
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.... ![Wink](images/smilies/icon_wink.gif)
Please set me back on track again.
PIT
-
Senior Member
registered user
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
-
By armoredcars in forum MS Windows & New to Linux
Replies: 4
Last Post: 10-02-2006, 04:33 AM
-
By photosoupguru in forum General Support
Replies: 3
Last Post: 01-11-2005, 05:26 AM
-
By pgk3734 in forum General Support
Replies: 4
Last Post: 06-27-2004, 07:51 PM
-
By purplehaze in forum General Support
Replies: 4
Last Post: 06-25-2003, 06:54 PM
-
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
-
Forum Rules
![Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot picture](/store/img/pB0AAOSwrbRkIWhk/s-l225//Fanxiang-4TB-2TB-1TB-SSD-550MB-s-2-5-SATA-III-Inte.jpg)
Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot
$219.99
![WD_BLACK 1TB SN850 NVMe Internal Gaming SSD Solid State Drive picture](/store/img/FPQAAOSwYNRjBSBt/s-l225//WD-BLACK-1TB-SN850-NVMe-Internal-Gaming-SSD-Solid-.jpg)
WD_BLACK 1TB SN850 NVMe Internal Gaming SSD Solid State Drive
$64.95
![Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive picture](/store/img/VfAAAOSwdAxmn3FW/s-l225//Fanxiang-SSD-4TB-2TB-1TB-PS5-SSD-M-2-NVME-SSD-7300.jpg)
Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive
$253.79
![Fanxiang 4TB 2TB 1TB SSD 2.5'' SATA III 560MB/s Internal Solid State Drive lot picture](/store/img/0dMAAOSw99Zl7sby/s-l225//Fanxiang-4TB-2TB-1TB-SSD-2-5-SATA-III-560MB-s-Inte.jpg)
Fanxiang 4TB 2TB 1TB SSD 2.5'' SATA III 560MB/s Internal Solid State Drive lot
$188.09
![Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5](/store/img/RzIAAOSwSZNlN-zB/s-l225//Patriot-P210-128GB-256GB-512GB-1TB-2TB-2-5-SATA-3-.jpg)
Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot
$19.99
![Samsung 850 EVO 500GB 2.5](/store/img/LLYAAOSwCl1moBgn/s-l225//Samsung-850-EVO-500GB-2-5-SATA-SSD-Solid-State-MZ-.jpg)
Samsung 850 EVO 500GB 2.5" SATA SSD Solid State MZ-75E500
$24.95
![4TB Ssd 870 Internal Solid State Drive Hard Disk 2.5 Inch Sata Iii 2TB Ssd picture](/store/img/c34AAOSwjjZmjLNC/s-l225//4TB-Ssd-870-Internal-Solid-State-Drive-Hard-Disk-2.jpg)
4TB Ssd 870 Internal Solid State Drive Hard Disk 2.5 Inch Sata Iii 2TB Ssd
$34.99
![Micron 1100 MTFDDAK256TBN 256 GB SATA III 2.5 in Solid State Drive picture](/store/img/ACgAAOSwLZVmnswW/s-l225//Micron-1100-MTFDDAK256TBN-256-GB-SATA-III-2-5-in-S.jpg)
Micron 1100 MTFDDAK256TBN 256 GB SATA III 2.5 in Solid State Drive
$14.50
![4TB Ssd 870evo Internal Solid State Drive Hard Disk 2.5 Inch For Laptop SSD picture](/store/img/ftAAAOSwRuxmjLMQ/s-l225//4TB-Ssd-870evo-Internal-Solid-State-Drive-Hard-Dis.jpg)
4TB Ssd 870evo Internal Solid State Drive Hard Disk 2.5 Inch For Laptop SSD
$45.17
![4tb 870 EVO Solid Hard Drive Disk SSD for Ps5 Internal State 2.5inch SATA USA picture](/store/img/NfMAAOSwM4Rmni2f/s-l225//4tb-870-EVO-Solid-Hard-Drive-Disk-SSD-for-Ps5-Inte.jpg)
4tb 870 EVO Solid Hard Drive Disk SSD for Ps5 Internal State 2.5inch SATA USA
$37.88