Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

w2ksp4.exe, WwwxxXdbf, procmail "FROM_MAILER" patch, Use of assignment to $[ is deprecated at /usr/local/sbin/apxs line 86. , wwwxxx vim, mysql closing table and opening table, 800c5000, setgid operation not permitted, pciehp: acpi_pciehprm on IBM, WWWXXX.DBF

Links

XODOX
Impressum

#1: vi error

Posted on 2007-03-28 15:10:46 by jim_epler

hello,
upon quitting vi, I am receiving

E138: Can't write viminfo file $HOME/.viminfo!

any suggestions would be appreciated.

thx.

Jim Epler
San Diego,CA
http://www.mytechmusings.com

Report this message

#2: Re: vi error

Posted on 2007-03-28 15:56:30 by Jean-Rene David

* jim_epler [2007.03.28 13:10]:
> upon quitting vi, I am receiving

You are quitting vim, not vi.

> E138: Can't write viminfo file $HOME/.viminfo!

:h E138
[...]
When you get error "E138: Can't write viminfo file"
check that no old temp files were left behind (e.g.
~/.viminf*) and that you can write in the directory of
the .viminfo file.

--
JR

Report this message

#3: Re: vi error

Posted on 2007-03-28 16:58:34 by jim_epler

> When you get error "E138: Can't write viminfo file"
> check that no old temp files were left behind (e.g.
> ~/.viminf*) and that you can write in the directory of
> the .viminfo file.

JR, thanks for the reply. I guess I should have also noted that I'm
editing as the root user on the machine which makes it more strange to
me. I don't see any temp files in the root user's home directory
related to .vmi. I'm running Darwin Kernel Version 7.9.0 (OS 10.3.9
Server).

Report this message

#4: Re: vi error

Posted on 2007-03-28 17:28:13 by Jean-Rene David

* jim_epler [2007.03.28 14:58]:
> I guess I should have also noted that I'm editing as the
> root user on the machine which makes it more strange to
> me. I don't see any temp files in the root user's home
> directory related to .vmi. I'm running Darwin Kernel
> Version 7.9.0 (OS 10.3.9 Server).

Did you become root by doing "su" or "su -"? What is the
HOME variable set to when you edit?

See:

:h viminfo-write

and the notes that follow. Esp:

- Vim will not overwrite a viminfo file that is not writable
by the current "real" user. This helps for when you did
"su" to become root, but your $HOME is still set to a
normal user's home directory. Otherwise Vim would create
a viminfo file owned by root that nobody else can read.

--
JR

Report this message

#5: Re: vi error

Posted on 2007-03-28 18:16:32 by jim_epler

> Did you become root by doing "su" or "su -"? What is the
> HOME variable set to when you edit?
>

I typed "sudo -s" and authenticated using the admin's password to
arrive at the root prompt. I'm not sure exactly how to determine the
$HOME variable. I typed:

[www:~/] root# echo $HOME;

but was returned an empty line. I then typed "cd" and was returned

tcsh: cd: No home directory.

I'm going to go out on a limb here and guess this *might* be related
to the error I'm receiving?

Report this message

#6: Re: vi error

Posted on 2007-03-28 18:27:45 by Jean-Rene David

* jim_epler [2007.03.28 16:16]:
> [www:~/] root# echo $HOME;
>
> but was returned an empty line. I then typed "cd" and was returned
>
> tcsh: cd: No home directory.

This is most likely your problem. Looks like root doesn't
have a home defined in /etc/passwd (though I know nothing
about OS X, to be frank.)

In vim, doing:
:set viminfo=n/tmp/viminfo

should at least make the error stop.

--
JR

Report this message

#7: Re: vi error

Posted on 2007-03-28 18:46:32 by jim_epler

> This is most likely your problem. Looks like root doesn't
> have a home defined in /etc/passwd (though I know nothing
> about OS X, to be frank.)
>
yes, OS X Server's flavor of unix seems to be non-standard (i.e.
crap). unfortunately, i don't have the ability to change the OS on my
box or I would in a heartbeat.

> In vim, doing:
> :set viminfo=n/tmp/viminfo
>
> should at least make the error stop.
>

when entering above I receive E518: Unknow option: viminfo=n/tmp/
viminfo. I've been using pico but have been trying to do more with vi
(vim) to broaden my horizons. I've begun to appreciate its nuances
which clearly reveal why it is a superior text editor. I guess I can
go back to pico or just close my eyes and ignore the warning.

Report this message

#8: Re: vi error

Posted on 2007-03-28 19:07:12 by Glenn Jackman

At 2007-03-28 12:46PM, "jim_epler" wrote:
> > In vim, doing:
> > :set viminfo=n/tmp/viminfo
> >
> > should at least make the error stop.
> >
>
> when entering above I receive E518: Unknow option: viminfo=n/tmp/
> viminfo. I've been using pico but have been trying to do more with vi
> (vim) to broaden my horizons. I've begun to appreciate its nuances
> which clearly reveal why it is a superior text editor. I guess I can
> go back to pico or just close my eyes and ignore the warning.

Or set $HOME before invoking vim:
env HOME=/tmp vim ...

--
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry

Report this message

#9: Re: vi error

Posted on 2007-03-28 19:49:26 by jim_epler

On Mar 28, 10:07 am, Glenn Jackman <gle...@ncf.ca> wrote:
>
> Or set $HOME before invoking vim:
> env HOME=/tmp vim ...

still getting the error. I even chmod'd 777 the .viminfo file found
in /tmp and to the .viminfo file in ~/var/root.

both these .viminfo files are universally writeable yet vim still
complains viminfo file $HOME/.viminfo!

What other directories might the .viminfo file reside?

Report this message

#10: Re: vi error

Posted on 2007-03-28 20:05:53 by Dan Mercer

"jim_epler" <jim.epler@gmail.com> wrote in message news:1175087445.998868.60810@p15g2000hsd.googlegroups.com...
: hello,
: upon quitting vi, I am receiving
:
: E138: Can't write viminfo file $HOME/.viminfo!

You have somehow defined viminfo as the literal string '$HOME/.viminfo',
not the value of $HOME/.viminfo. For instance, if the root home directory
was /root, the message would have been

E138: Can't write viminfo file /root/.viminfo!

Dan Mercer

:
: any suggestions would be appreciated.
:
: thx.
:
: Jim Epler
: San Diego,CA
: http://www.mytechmusings.com
:

Report this message

#11: Re: vi error

Posted on 2007-03-28 20:17:46 by jim_epler

> You have somehow defined viminfo as the literal string '$HOME/.viminfo',
> not the value of $HOME/.viminfo. For instance, if the root home directory
> was /root, the message would have been
>
> E138: Can't write viminfo file /root/.viminfo!
>
> Dan Mercer

that makes sense. is there a preference or profile somewhere where I
can remove the quotes to set the value from a string back to the way
it should be represented?

-Jim

Report this message

#12: Re: vi error

Posted on 2007-03-28 20:39:51 by Bill Marcum

On 28 Mar 2007 06:10:46 -0700, jim_epler
<jim.epler@gmail.com> wrote:
>
>
> hello,
> upon quitting vi, I am receiving
>
> E138: Can't write viminfo file $HOME/.viminfo!
>
> any suggestions would be appreciated.
>
> thx.
>
> Jim Epler
> San Diego,CA
> http://www.mytechmusings.com
>
Could it be trying to write '$HOME/.viminfo' instead of using the
variable $HOME?


--
Minors in Kansas City, Missouri, are not allowed to purchase cap pistols;
they may buy shotguns freely, however.

Report this message

#13: Re: vi error

Posted on 2007-03-28 23:28:09 by jim_epler

> On Mar 28, 10:07 am, Glenn Jackman <gle...@ncf.ca> wrote:
>
> > Or set $HOME before invoking vim:
> > env HOME=/tmp vim ...
>
this finally did the trick after typing env HOME=/tmp vi (not vim).
But how do I set this environmental variable so I won't need to type
it when invoking vim in future sessions? I tried setenv HOME=/tmp vi
but received a syntax error, and then tried to add it to my csh.cshrc
profile by hand, both to no avail.
-Jim

Report this message

#14: Re: vi error

Posted on 2007-03-29 00:59:52 by Bill Marcum

On 28 Mar 2007 14:28:09 -0700, jim_epler
<jim.epler@gmail.com> wrote:
>
>
>> On Mar 28, 10:07 am, Glenn Jackman <gle...@ncf.ca> wrote:
>>
>> > Or set $HOME before invoking vim:
>> > env HOME=/tmp vim ...
>>
> this finally did the trick after typing env HOME=/tmp vi (not vim).
> But how do I set this environmental variable so I won't need to type
> it when invoking vim in future sessions? I tried setenv HOME=/tmp vi
> but received a syntax error, and then tried to add it to my csh.cshrc
> profile by hand, both to no avail.
> -Jim
>
In a standard Unix system, the HOME variable is set according to the
next-to-last field in /etc/passwd. If Darwin is different, perhaps you
should consult an appropriate newsgroup or mailing list.
Here is one on the news.gmane.org news server:
news://news.gmane.org/gmane.os.opendarwin.general
Maybe an Apple newsgroup could help


--
"Well I don't see why I have to make one man miserable when I can make so many
men happy."
-- Ellyn Mustard, about marriage

Report this message

#15: Re: vi error

Posted on 2007-03-29 01:53:18 by Janis Papanagnou

jim_epler wrote:
>>This is most likely your problem. Looks like root doesn't
>>have a home defined in /etc/passwd (though I know nothing
>>about OS X, to be frank.)
>>
>
> yes, OS X Server's flavor of unix seems to be non-standard (i.e.
> crap). unfortunately, i don't have the ability to change the OS on my
> box or I would in a heartbeat.

AFAIK, OS X is based on freeBSD; so a quite typical Unix.

You don't need to change the complete OS, just fix some settings,
as far as I see. Maybe your /etc/passwd has no home directory for
root (add it and create the directory if not existing). What does
this command show on your box...?

$ grep root /etc/passwd
root:x:0:0:root:/root:/bin/ksh
^^^^^

Maybe your profile is not set correctly; you seem to be using tcsh
as your default shell, so I cannot tell you about the specific tcsh
profile that you would have to add to your (root's) home directory,
but usually you find settings for the login shells in /etc/profile,
and perhaps also links to the shell specific profiles.

Elsethread you wrote:
> I tried setenv HOME=/tmp vi
> but received a syntax error, and then tried to add it to my
> csh.cshrc profile by hand, both to no avail.

Cannot tell about syntax for tcsh/csh but I had tried something like

$ setenv HOME /tmp
$ vi

or

$ setenv HOME=/tmp
$ vi

But better to use a non-dummy HOME directory.

Janis

>
>
>>In vim, doing:
>>:set viminfo=n/tmp/viminfo
>>
>>should at least make the error stop.
>>
>
>
> when entering above I receive E518: Unknow option: viminfo=n/tmp/
> viminfo. I've been using pico but have been trying to do more with vi
> (vim) to broaden my horizons. I've begun to appreciate its nuances
> which clearly reveal why it is a superior text editor. I guess I can
> go back to pico or just close my eyes and ignore the warning.
>
>
>

Report this message

#16: Re: vi error

Posted on 2007-03-30 20:49:10 by jim_epler

update:
I figured out why I was having the problem. I was tunneling in through
ssh to my box with an admin account and then switching to the root
prompt using "sudo -s". So, I guess vim wasn't actually trying to save
to the .viminfo file in the root user's home directory, but instead
into the admin's home directory (even though the prompt seemed to
indicate I was the root user [www:~/] root# ). And the admin account
is the one that doesn't have a home directory. When I actually
tunneled in to my box as root, I no longer received the error. Anyway,
thanks for the help. And to clarify what I said about OS X's Server's
flavor of UNIX which is the freeBSD, I think the underlying unix is
fine. But OS X Server mucked around and added their own directives and
non-freeBSD configuration files without adequate documentation. It
probably should have its own name; maybe LUNI-osX would fit the bill.

Report this message

#17: Re: vi error

Posted on 2007-03-31 20:07:39 by ebenZEROONE

In article <1175117289.566738.154680@b75g2000hsg.googlegroups.com>,
jim_epler <jim.epler@gmail.com> wrote:
> > On Mar 28, 10:07 am, Glenn Jackman <gle...@ncf.ca> wrote:
> >
> > > Or set $HOME before invoking vim:
> > > env HOME=/tmp vim ...
> >
> this finally did the trick after typing env HOME=/tmp vi (not vim).
> But how do I set this environmental variable so I won't need to type
> it when invoking vim in future sessions? I tried setenv HOME=/tmp vi
> but received a syntax error, and then tried to add it to my csh.cshrc
> profile by hand, both to no avail.

You could do it with an alias:

alias hvi env HOME=/tmp vi

but that's bash-speak; I don't know tcsh.

--
-eben QebWenE01R@vTerYizUonI.nOetP royalty.mine.nu:81
When we've nuked the world to a cinder, the cockroaches picking
over the remains will be crawling over the remaining artifacts
and wondering what "PC LOAD LETTER" means. -- PC / ASR

Report this message