-
Senior Member
registered user
There are a number of ways to work as root without actually logging in as root. For terminal applications, use sudo and su. If you have done a Debian type install you will have to edit /etc/sudoers before you can use sudo. Here's my sudoers file:
Code:
# sudoers file.
root ALL=(ALL) ALL
# KNOPPIX WARNING: This allows the unprivileged knoppix user to start commands as root
# KNOPPIX WARNING: This is totally insecure and (almost) makes knoppix a second root account.
# KNOPPIX WARNING: Never allow external access to the knoppix user!!!
#knoppix ALL=NOPASSWD: ALL
crashedagain ALL=NOPASSWD: ALL
The comment about editing only with visudo at the beginning of the file is simply not true, BTW , you can use any text editor.
There are good text editors in linux which can be run directly as root (eg:sudo mc <filename> or sudo joe <filename>) but for gui applications you will get the error:
Xlib: connection to ":0.0" refused by server
The cure for this is to type 'xhost local:' as user before you attempt to do open kwrite or other X applications as root.
Another way is to use kdesu to open the application, eg'kdesu kate /etc/fstab' will open your file /etc/fstab using the text editor Kate as root (better editor than kwite, has built in terminal & other features). Kdesu needs a password so you may have to set one first with 'sudo passwd'.
For convenience, I have desktop icons for Konqueror-as-root & Kate-as-root. These were created by drag'n'drop copying the Kate & Konqueror menu items from the start menu to the desktop then editing the properties application to run to 'kdesu application' instead of just 'application'. These shortcut links will give an odd error 'kdesu unable to start application' after it has already started the application, the cure for this is to open the desktop link in a text editor and comment out the line 'X-DCOP-ServiceType=multi' by putting a # in front of it (eg: #X-DCOP-ServiceType=multi).
You will not be able to edit any of the setups for the root applications when running under kdesu so you may have to enable logging in as root by changing /etc/kde3/kdm/kdmrc AllowRootLogin=false to true if you want to change any settings, file associations, colors etc for your root applications. I set my color scheme for root to something distinctly different from the user setup so that if I do have konqueror running as root I will recognize it immediately.
Similar Threads
-
By Jameson in forum General Support
Replies: 2
Last Post: 01-19-2005, 05:27 AM
-
By darkstar2002 in forum Hdd Install / Debian / Apt
Replies: 7
Last Post: 05-14-2004, 03:51 AM
-
By Dark19 in forum General Support
Replies: 1
Last Post: 10-15-2003, 03:41 AM
-
By 1st_time in forum General Support
Replies: 4
Last Post: 07-17-2003, 04:57 AM
-
By Peterobe in forum Hdd Install / Debian / Apt
Replies: 4
Last Post: 07-09-2003, 05:53 PM
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

Apple Mac Pro 2019 1TB OEM SSD Kit-768GB +384GB - 656-0119/ 656-0120
$69.99

Samsung 2.5" 870 EVO SSD SATA III 250GB 500GB 1TB Internet Solid State Drive Lot
$155.00

Western Digital 1TB 3.5" SATA III 7200RPM Desktop Hard Drive
$34.99

Dell Latitude 14" Laptop Computer Intel i5 Up To 32GB RAM 1TB SSD Windows 11 Pro
$545.25

SAMSUNG T7 Portable SSD 1TB Indigo Blue USB 3.2 Gen2 External MU-PC1T0H/AM
$159.99

1TB Kingston DataTraveler Max DTMAX/1TB USB Type-C Flash Drive
$86.95

Acer Predator Helios Neo 16S AI 16" i9 275HX 2S RTX 5070 Ti 32GB 1TB SSD Refurb
$1746.47

Dell Latitude 14" Laptop Computer Intel i7 Up To 32GB RAM 1TB SSD Windows 11 Pro
$330.73

External SSD 1TB 2TB 4TB Portable Hard Drive USB 3.0 Type-C High Speed PC Mac
$19.99

1TB Portable External Hard Drive USB 3.0 Storage Backup for PC Mac Laptop
$29.99