Warning about undefined background when exiting file

159 views
Skip to first unread message

Pascal Hasko Bernhard

unread,
Jun 17, 2013, 5:39:51 AM6/17/13
to vim...@googlegroups.com
Hey all,

Everytime I quit a file viewed or edited by vi/vim I get the following
message:

'Warning: Color name "BACKGROUND" is not defined'

This happens only when in a graphical desktop environment, not on the
'real' console (CTRL+ALT+F2) though. I tried several desktops (MATE [my
default], GNOME Shell, XFCE, KDE) as well as different terminal
emulators (GNOME terminal, MATE terminal, Konsole, LXTerminal,
UXTerm...). Always the same behavior. Then I set different color schemes
for vim, no success. The same happens when changing the color scheme of
the terminal emulator. This behavior afflicts all users, I logged in
with different users, root is affected too.

The locale settings are correct (en_US.UTF-, I checked to be sure that
it's not case of a configuration file that cannot read the variable
'BACKGROUND'. I grep'ed all vim-files for the string 'BACKGROUND' to see
whether there was something misconfigured here, no luck.

It seems like I'm the only person having this problem, I could not find
solution for the issue online.

Vim is in version 7.3.905

The following packages are installed:

vim-core-7.3.905
vim-7.3.905
gvim-7.3.905 (I do not use the GUI, but have it installed nonetheless)

Sabayon Linux 11 64bit (MATE desktop)


Otherwise there are no issues with vi/vim. I can edit files without any
problems, so in principle vi/vim seem work just fine. BTW: It doesn't
matter whether I use VI or VIM, both complain about the background color
being undefined.

Any ideas?

Bee

unread,
Jun 17, 2013, 11:29:08 AM6/17/13
to vim_use


On Jun 17, 2:39 am, Pascal Hasko Bernhard
Try opening vim with:

vim -U NONE

-u NONE ## No .vimrc, No .gvimrc, No plugin
-U NONE ## No .gvimrc
-u NORC ## No .vimrc, Load plugins

See...
:help gui-colors
:help -u

Pascal Bernhard

unread,
Jun 18, 2013, 4:47:08 AM6/18/13
to vim...@googlegroups.com
Problem persists

> -U NONE ## No .gvimrc

Problem persists


> -u NORC ## No .vimrc, Load plugins

Does not open file but instead produces this output:

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
Xsession-Errors.txt Error detected while processing function l9#guardScriptLoading:
line 7:
E15: Invalid expression:
E15: Invalid expression: a:l9Version > 0 && (a:l9Version > s:L9_VERSION_CURRENT ||
E15: Invalid expression:
E15: Invalid expression: a:l9Version > 0 && (a:l9Version > s:L9_VERSION_CURRENT ||
line 8:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/txtfmt.vim:
line 67:
E10: \ should be followed by /, ? or &
line 68:
E10: \ should be followed by /, ? or &
line 337:
E10: \ should be followed by /, ? or &
line 338:
E10: \ should be followed by /, ? or &
line 339:
E10: \ should be followed by /, ? or &
line 340:
E10: \ should be followed by /, ? or &
line 341:
E10: \ should be followed by /, ? or &
line 342:
E10: \ should be followed by /, ? or &
line 343:
E10: \ should be followed by /, ? or &
line 344:
E10: \ should be followed by /, ? or &
line 346:
E10: \ should be followed by /, ? or &
line 347:
E10: \ should be followed by /, ? or &
line 348:
E10: \ should be followed by /, ? or &
line 349:
E10: \ should be followed by /, ? or &
line 351:
E10: \ should be followed by /, ? or &
line 352:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/undotree.vim:
line 85:
E697: Missing end of List ']':
E15: Invalid expression: ['" ===== Marks ===== ',
line 86:
E10: \ should be followed by /, ? or &
line 87:
E10: \ should be followed by /, ? or &
line 88:
E10: \ should be followed by /, ? or &
line 89:
E10: \ should be followed by /, ? or &
line 90:
E10: \ should be followed by /, ? or &
line 91:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/unite/bookmark.vim:
line 28:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/unite/buffer.vim:
line 28:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/unite/directory_mru.vim:
line 28:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/unite/file_mru.vim:
line 28:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/unite/history_yank.vim:
line 28:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/unite/tab.vim:
line 28:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/unite/window.vim:
line 28:
E10: \ should be followed by /, ? or &
Error detected while processing /usr/share/vim/vimfiles/plugin/unite.vim:
line 34:
E10: \ should be followed by /, ? or &
line 36:
E10: \ should be followed by /, ? or &Warning: Color name "BACKGROUND" is not defined

Press ENTER or type command to continue

Pressing ENTER gives me that:

Error detected while processing /usr/share/vim/vimfiles/nerdtree_plugin/exec_menuitem.vim:
line 18:
E15: Invalid expression:


I guess I'll to remove plugins one by one, to see whether one of those is causing the issue. Removing the 'nerdtree' plugin does not solve the problem.

> See...
>
> :help gui-colors
>
> :help -u

Those do not help me much, not to say not at all. What information am I supposed to be looking for in these help files?

John Little

unread,
Jun 18, 2013, 7:31:23 AM6/18/13
to vim...@googlegroups.com, pascal.has...@googlemail.com
>'Warning: Color name "BACKGROUND" is not defined'

> Any ideas?

Maybe the message is coming from X, or even GTK.

>The same happens when changing the color scheme of
>the terminal emulator.

Well, it's not coming from vim then. Which emulator? If it happens changing the colour scheme of Konsole, it's not from GTK.

Googling suggests that stuff in X "resources" can give messages like this, maybe an .Xresources file or similar.

Regards, and HTH, John Little

Pascal Hasko Bernhard

unread,
Jun 18, 2013, 9:37:23 AM6/18/13
to Vim User Group (Google), John Little
On Tue, 2013-06-18 at 04:31 -0700, John Little wrote:
> >'Warning: Color name "BACKGROUND" is not defined'
>
> > Any ideas?
>
> Maybe the message is coming from X, or even GTK.

That might be the case. I encounter the same problem, which desktop
environment I use (KDE, Gnome, XFCE, LXDE, Cinnamon - those are the ones
I tried)



>
> >The same happens when changing the color scheme of
> >the terminal emulator.
>
> Well, it's not coming from vim then. Which emulator? If it happens changing the colour scheme of Konsole, it's not from GTK.
>

I tried several emulators: MATE Terminal, GNOME Terminal, Konsole,
UXTerm, LXTerm. I changed their respective color schemes, that had no
effect.


> Googling suggests that stuff in X "resources" can give messages like this, maybe an .Xresources file or similar.

Good idea, I'll look for a file like that.

Thanks John


Reply all
Reply to author
Forward
0 new messages