Click to See Complete Forum and Search --> : Command line edit help please
Lend273
03-30-2001, 02:33 PM
I messed up my XF86config and now X wont start. I need to edit the file from the command line.
What is the most newbie friendly way to do this? I tried VI, emacs, and pico. Couldnt
figure them out. Can't see the file to edit it. Is there an easier way?
Thanks again
Len
btw......I'm running SuSE 7.1
MBMarduk
03-30-2001, 02:45 PM
If you ask me: try the GNU Midnight Commander.
It sooooooo easy (not as elaborate or powerful as the ones you mentioned.
Just select the file with arrow-keys, F3=Edit, it's just plain WYSIWYG.
If you don't have it installed: SuSE6.4 has it so you should too. Install it with YaST.
chaoscapstone
03-30-2001, 02:47 PM
You need to be running as root. It sounds like your not. You could always log into X as root and then go to the /home directory manager. Set the options to display hidden files. Find the file and open it in a text editor. I had to do that to edit my etc/hosts file. :D
bdg1983
03-30-2001, 02:58 PM
vi /path/to/filename
'vi' is fairly simple to use for small changes.
There is a NHF here on using vi. Give it a read.
Yeah,
vi would be pretty easy. Open the file as mdwatts states above, hit the insert key to enter (duh) insert mode, make your changes, and the hit escape to exit insert mode. To save your changes and quit vi, type a colon followed by "wq". The "wq" tells vi to "write the changes" and "quit".
The directory in which your XF86Config file lives depends on your distro, but you can use the find command ("find / -name XF86Config") to get the correct path.
[ 30 March 2001: Message edited by: DMR ]
mychl
03-30-2001, 03:15 PM
I think that pico is pretty easy to use. I've looked at vi, and it just seems a little complex for simple editing.
CTRL-O will save changes
CTRL-X exits
what else is there really???
good luck
bdg1983
03-30-2001, 03:21 PM
jed is a nice and easy editor.
jed /path/to/file
Make your changes.
Ctrl-x Ctrl-s to save the file
Ctrl-x Ctrl-c to exit.
BTW, it's the same in emacs but jed is smaller.
teeitup
03-30-2001, 07:56 PM
Why not rename the old config file.
Rerun your XF86Setup configurator of choice.
This should get X running, then use one of the editors in X.(i.e. Xedit, Gnotepad+)
You can then cut and paste fron the old file to the new one.
Lend273
03-30-2001, 08:06 PM
Stupid me :)
Since I am running 2 distros on the same box, I went into the other distro as root, mounted the problem partition and corrected the file.
Sort of a back door approach but it worked :)
Len
Lend273
03-30-2001, 08:06 PM
Stupid me :)
Since I am running 2 distros on the same box, I went into the other distro as root, mounted the problem partition and corrected the file.
Sort of a back door approach but it worked :)
Len