FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 08-03-2008, 11:17 PM
Robert Holtzman
 
Default editors in rescue mode

Recently my system locked up because I screwed up my ~/.profile file. I
decided to boot into rescue mode from the alternate ubuntu CD and couldn't
find a text editor. Tried vim, vi, emacs, pico, etc all to no avail. Gave
up, bailed out and booted into single user from the hard drive and found
all the editors, repaired ~/.profile and all was well. The burning
question is what editor is available on the alternate ubuntu CD rescue
mode. There must be at least one or rescue mode is all but useless.

--
Bob Holtzman
"If you think you're getting free lunch,
check the price of the beer"

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-03-2008, 11:25 PM
"Brian McKee"
 
Default editors in rescue mode

On Sun, Aug 3, 2008 at 7:17 PM, Robert Holtzman <holtzm@cox.net> wrote:
> Recently my system locked up because I screwed up my ~/.profile file. I
> decided to boot into rescue mode from the alternate ubuntu CD and couldn't
> find a text editor. Tried vim, vi, emacs, pico, etc all to no avail. Gave
> up, bailed out and booted into single user from the hard drive and found
> all the editors, repaired ~/.profile and all was well. The burning
> question is what editor is available on the alternate ubuntu CD rescue
> mode. There must be at least one or rescue mode is all but useless.

That's odd - I had a thread running here last week on the same
subject. Vi and nano where there, just the terminal emulation was an
issue. Did you use the 'rescue a broken system' option?

Brian

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-04-2008, 12:26 AM
Robert Holtzman
 
Default editors in rescue mode

On Sun, 3 Aug 2008, Brian McKee wrote:

> On Sun, Aug 3, 2008 at 7:17 PM, Robert Holtzman <holtzm@cox.net> wrote:
>> Recently my system locked up because I screwed up my ~/.profile file. I
>> decided to boot into rescue mode from the alternate ubuntu CD and couldn't
>> find a text editor. Tried vim, vi, emacs, pico, etc all to no avail. Gave
>> up, bailed out and booted into single user from the hard drive and found
>> all the editors, repaired ~/.profile and all was well. The burning
>> question is what editor is available on the alternate ubuntu CD rescue
>> mode. There must be at least one or rescue mode is all but useless.
>
> That's odd - I had a thread running here last week on the same
> subject. Vi and nano where there, just the terminal emulation was an
> issue. Did you use the 'rescue a broken system' option?

Yes. I didn't try nano, didn't think of it.

--
Bob Holtzman
The most dangerous ones aren't the ones who don't know.
They're the ones who don't know that they don't know.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-04-2008, 12:37 AM
Smoot Carl-Mitchell
 
Default editors in rescue mode

On Sun, 2008-08-03 at 17:26 -0700, Robert Holtzman wrote:

> Yes. I didn't try nano, didn't think of it.

Or to avoid dependence on any terminal emulator use "ed". I used to have
to do this on an old VAX-11-780 in single user mode where the console
was literally a hardcopy teletype!
--
Smoot Carl-Mitchell
System/Network Architect
smoot@tic.com
+1 480 922 7313
cell: +1 602 421 9005

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-04-2008, 12:52 AM
NoOp
 
Default editors in rescue mode

On 08/03/2008 05:26 PM, Robert Holtzman wrote:
> On Sun, 3 Aug 2008, Brian McKee wrote:
>
>> On Sun, Aug 3, 2008 at 7:17 PM, Robert Holtzman <holtzm@cox.net> wrote:
>>> Recently my system locked up because I screwed up my ~/.profile file. I
>>> decided to boot into rescue mode from the alternate ubuntu CD and couldn't
>>> find a text editor. Tried vim, vi, emacs, pico, etc all to no avail. Gave
>>> up, bailed out and booted into single user from the hard drive and found
>>> all the editors, repaired ~/.profile and all was well. The burning
>>> question is what editor is available on the alternate ubuntu CD rescue
>>> mode. There must be at least one or rescue mode is all but useless.
>>
>> That's odd - I had a thread running here last week on the same
>> subject. Vi and nano where there, just the terminal emulation was an
>> issue. Did you use the 'rescue a broken system' option?
>
> Yes. I didn't try nano, didn't think of it.
>

It wouldn't have worked properly anyway; see Brian's earlier thread on
this: "vi almost unusable in recovery console"

If you have a working network connection on the machine:

# apt-get install bogl-bterm

That installs bterm and thereafter you will be able to use vi or nano in
"rescue a broken system". This is a pretty serious bug IMO as you
shouldn't have to have a network connection the "rescue a broken system".

and Brian's bug report (I'm surprised he didn't post this for you):
https://bugs.launchpad.net/bugs/253758


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-04-2008, 08:26 AM
Leo Cacciari
 
Default editors in rescue mode

Il giorno dom, 03/08/2008 alle 16.17 -0700, Robert Holtzman ha scritto:
> Recently my system locked up because I screwed up my ~/.profile file. I
> decided to boot into rescue mode from the alternate ubuntu CD and couldn't
> find a text editor. Tried vim, vi, emacs, pico, etc all to no avail. Gave
> up, bailed out and booted into single user from the hard drive and found
> all the editors, repaired ~/.profile and all was well. The burning
> question is what editor is available on the alternate ubuntu CD rescue
> mode. There must be at least one or rescue mode is all but useless.

Why use an editor at all? When you drop in rescue mode's root shell,
simply change to your home dir and do

mv .profile dot.profile.old

This will revert you to standard, that way you can log in, edit your
profile (now in ~/dot.profile.old) and copy it back to ~/.profile. Log
out, log back in and you are done.

Enjoy

--
Leo Cacciari

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-05-2008, 06:00 AM
Florian Diesch
 
Default editors in rescue mode

Smoot Carl-Mitchell <smoot@tic.com> wrote:

> On Sun, 2008-08-03 at 17:26 -0700, Robert Holtzman wrote:
>
>> Yes. I didn't try nano, didn't think of it.
>
> Or to avoid dependence on any terminal emulator use "ed". I used to have
> to do this on an old VAX-11-780 in single user mode where the console
> was literally a hardcopy teletype!

From /usr/share/emacs/*/etc/JOKES:

--8<---------------cut here---------------start------------->8---

When I log into my Xenix system with my 110 baud teletype, both vi
*and* Emacs are just too damn slow. They print useless messages like,
'C-h for help' and '"foo" File is read only'. So I use the editor
that doesn't waste my VALUABLE time.

Ed, man! !man ed

ED(1) UNIX Programmer's Manual ED(1)

NAME
ed - text editor

SYNOPSIS
ed [ - ] [ -x ] [ name ]
DESCRIPTION
Ed is the standard text editor.
---

Computer Scientists love ed, not just because it comes first
alphabetically, but because it's the standard. Everyone else loves ed
because it's ED!

"Ed is the standard text editor."

And ed doesn't waste space on my Timex Sinclair. Just look:

-rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed
-rwxr-xr-t 4 root 1310720 Jan 1 1970 /usr/ucb/vi
-rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs

Of course, on the system *I* administrate, vi is symlinked to ed.
Emacs has been replaced by a shell script which 1) Generates a syslog
message at level LOG_EMERG; 2) reduces the user's disk quota by 100K;
and 3) RUNS ED!!!!!!

"Ed is the standard text editor."

Let's look at a typical novice's session with the mighty ed:

golem> ed

?
help
?
?
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
^C
?
^C
?
^D
?

---
Note the consistent user interface and error reportage. Ed is
generous enough to flag errors, yet prudent enough not to overwhelm
the novice with verbosity.

"Ed is the standard text editor."

Ed, the greatest WYGIWYG editor of all.

ED IS THE TRUE PATH TO NIRVANA! ED HAS BEEN THE CHOICE OF EDUCATED
AND IGNORANT ALIKE FOR CENTURIES! ED WILL NOT CORRUPT YOUR PRECIOUS
BODILY FLUIDS!! ED IS THE STANDARD TEXT EDITOR! ED MAKES THE SUN
SHINE AND THE BIRDS SING AND THE GRASS GREEN!!

When I use an editor, I don't want eight extra KILOBYTES of worthless
help screens and cursor positioning code! I just want an EDitor!!
Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED!
ED! ED IS THE STANDARD!!!

TEXT EDITOR.

When IBM, in its ever-present omnipotence, needed to base their
"edlin" on a UNIX standard, did they mimic vi? No. Emacs? Surely
you jest. They chose the most karmic editor of all. The standard.

Ed is for those who can *remember* what they are working on. If you
are an idiot, you should use Emacs. If you are an Emacs, you should
not be vi. If you use ED, you are on THE PATH TO REDEMPTION. THE
SO-CALLED "VISUAL" EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE
FAITHLESS. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!!

?
--8<---------------cut here---------------end--------------->8---


Florian
--
<http://www.florian-diesch.de/>
-----------------------------------------------------------------------
** Hi! I'm a signature virus! Copy me into your signature, please! **
-----------------------------------------------------------------------

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-05-2008, 02:58 PM
Smoot Carl-Mitchell
 
Default editors in rescue mode

On Tue, 2008-08-05 at 08:00 +0200, Florian Diesch wrote:
> Smoot Carl-Mitchell <smoot@tic.com> wrote:
>
> > On Sun, 2008-08-03 at 17:26 -0700, Robert Holtzman wrote:
> >
> >> Yes. I didn't try nano, didn't think of it.
> >
> > Or to avoid dependence on any terminal emulator use "ed". I used to have
> > to do this on an old VAX-11-780 in single user mode where the console
> > was literally a hardcopy teletype!
>
> >From /usr/share/emacs/*/etc/JOKES:

LOL! Thanks for that.

As an historical note, vi is a visual extension of ed. Whenever you type
a ":" in vi, it drops you to what is essentially the ex editor command
line. ex is an extension of ed. Mark Horton (the inventor of vi) did
this deliberately, so all the search and regular expression power of ed
was available in vi. Mark also invented termcap which is similar to
terminfo so vi would work on the wide variety of character cell
terminals available at the time. This made vi the editor of choice for
most Unix sysadmins, since it was widely available across all Unix
variants and would work on all CRT terminals.
--
Smoot Carl-Mitchell
System/Network Architect
smoot@tic.com
+1 480 922 7313
cell: +1 602 421 9005

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-05-2008, 05:35 PM
Derek Broughton
 
Default editors in rescue mode

Smoot Carl-Mitchell wrote:

> On Tue, 2008-08-05 at 08:00 +0200, Florian Diesch wrote:
>> Smoot Carl-Mitchell <smoot@tic.com> wrote:
>>
>> > On Sun, 2008-08-03 at 17:26 -0700, Robert Holtzman wrote:
>> >
>> >> Yes. I didn't try nano, didn't think of it.
>> >
>> > Or to avoid dependence on any terminal emulator use "ed". I used to
>> > have to do this on an old VAX-11-780 in single user mode where the
>> > console was literally a hardcopy teletype!
>>
>> >From /usr/share/emacs/*/etc/JOKES:
>
> LOL! Thanks for that.
>
> As an historical note,

I hope you realize historical notes just ruin the humor :-)
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 08-05-2008, 09:53 PM
Smoot Carl-Mitchell
 
Default editors in rescue mode

On Tue, 2008-08-05 at 14:35 -0300, Derek Broughton wrote:
> Smoot Carl-Mitchell wrote:
>
> > On Tue, 2008-08-05 at 08:00 +0200, Florian Diesch wrote:
> >> Smoot Carl-Mitchell <smoot@tic.com> wrote:
> >>
> >> > On Sun, 2008-08-03 at 17:26 -0700, Robert Holtzman wrote:
> >> >
> >> >> Yes. I didn't try nano, didn't think of it.
> >> >
> >> > Or to avoid dependence on any terminal emulator use "ed". I used to
> >> > have to do this on an old VAX-11-780 in single user mode where the
> >> > console was literally a hardcopy teletype!
> >>
> >> >From /usr/share/emacs/*/etc/JOKES:
> >
> > LOL! Thanks for that.
> >
> > As an historical note,
>
> I hope you realize historical notes just ruin the humor :-)

That was the intent. ;-)

I had to give the history of vi because like other things "editor wars"
get religious awfully fast. My general philosophy is use what is
comfortable for you whether it is Emacs, vi, nano or even (gasp!) ed.
Personally, I think vi is an awful editor with its modality and less
than obvious command set. Emacs and even nano are much more elegant in
a lot of ways. Sadly, I have used vi so much (because it was available
everywhere when I consulted), it is wired into my spine with unfortunate
effects when I try and use a word processor like OO. I end up typing
things like 'dd' or 'cw' or ':wq' and get frustrated when the "right"
thing does not happen.

--
Smoot Carl-Mitchell
System/Network Architect
smoot@tic.com
+1 480 922 7313
cell: +1 602 421 9005

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 02:20 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org