LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 07-17-2004, 07:43 PM   #1
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Rep: Reputation: 30
Simple question - how to edit config file in Suse 9.1?


Just trying to do a simple thing, as usual falling at the first hurdle...

I want to edit a root-privileged config file.

- Logging in as 'root' just brings up YAST, and not the desktop. What is going on? I can't use the Kate text editor to edit the files unless I am logged in as root...

- Using the 'edit' command in Konsole doesn't bring up the file specified, for some reason. What is the correct command for editing files at the command line? (I am correctly logged on as root using the 'su' command, so it's not this.)

Thanks for any advice. One day soon I will achieve my single but strangely challenging goal of getting Suse to see the internet. This is just the first, small step!
 
Old 07-17-2004, 07:53 PM   #2
rgiggs
Member
 
Registered: Apr 2004
Location: berkeley, ca
Distribution: slk10, winxp
Posts: 313

Rep: Reputation: 30
you can use emacs or pico.

emacs <path to the file> or pico <path to the file>

when you're done:

* in emacs, press control + x + s to save, then control + x + c to exit emacs.
* in pico, press control + o, then it will ask you what file to write, you can just press enter, then press control + x to exit pico.

while pico might not be installed, emacs should be by default. you can use other editors of course.
 
Old 07-18-2004, 01:18 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you want to edit a file as root, you could preface the command with the 'kdesu' command.

For example, entering 'kdesu kedit' and then entering the root password when prompted will start up the kedit program as root.

The edit command in konsole will enable you to copy highlighted text for example. But since konsole isn't an editor, you need to run an editor program to edit a file.

There is another way to start a program as root. Let's say that you dragged an icon from the menu to the taskbar. Right click on the task bar icon and select properties. Click on the Application tab. Click the Advanced Options... button. Select Run as a different user, and enter the username of root. Click OK to exit.

Then when you want to edit a system configuration file, just click on the taskbar icon and enter the root password.
 
Old 07-18-2004, 08:47 AM   #4
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
Thanks so much rgiggs and jschiwal - problem solved. (Particularly useful tip to 'run as different user'.)
 
  


Reply



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
Simple Question - How To Edit With Recovery CD? rrrssssss Linux - Newbie 1 04-22-2005 06:08 AM
Elementary Question - Can't Edit File - Need Root rrrssssss Linux - Newbie 2 04-12-2005 03:05 AM
Edit which config file to allow for dif resolutions Glas Slackware 9 09-24-2004 01:26 AM
Need a SIMPLE CONFIG file for Kernel compile bongski55 Linux - Newbie 1 09-02-2003 08:54 AM
Really dumb question but how do I edit a config file ? gavinc Linux - Newbie 2 08-19-2003 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 10:17 PM.

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