OT: colors for vi on Linux (Debian - ubuntu)

John Esak john at valar.com
Sun Jul 27 11:33:43 PDT 2008


Wow, Bill!

Thanks for the tremendously comprehensive answer... with files!  I will be
parsing them apart this afternoon.  Much appreciated.

Tom Podnar mentioned he likes the community supported Centos, too for server
situations. Maybe I'll give it a try next occasion.  

I am blissfully unaware of what you mean by a Stallman/GNU version... and
believe don't want to know. :-)

The only thing I ever liked about the Unix Wars... was the posters.... and
by the way, I just found two of them brand new unopened.  Does anyone want
them before I put them on eBay. :=)  You know the Wizard with the big shell
as a cauldron... and I forget what is on the second one, but I have them
both unopened and no place to put them.

Thanks again, Bill, maybe I should send them to you!

John


> -----Original Message-----
> From: filepro-list-bounces+john=valar.com at lists.celestial.com
> [mailto:filepro-list-bounces+john=valar.com at lists.celestial.com] On Behalf
> Of Bill Campbell
> Sent: Sunday, July 27, 2008 1:58 PM
> To: filepro-list at lists.celestial.com
> Subject: Re: OT: colors for vi on Linux (Debian - ubuntu)
> 
> On Fri, Jul 25, 2008, John Esak wrote:
> >Hi,
> >
> >Okay, I  know I'll take the flack for using this great forum to ask a
> >question that seems non-filePro related.... I'll ask uit at the end of
> the
> >next couple paragraphs.... let me try and attach some filePro basis for
> the
> >question though... :-)  it will be lame, but hopefully informative??
> >
> >Okay, so OT:, and just in case anyone cares.  We have just put a great
> >filePro app on "ubuntu"  Linux. This is a Debian derivative.  Everyone
> knows
> >I have felt Linux to be not ready for prime time for a long time now...
> 
> You mean we shouldn't have been using Linux for production systems now for
> a decade or so?  We used it for customer desktops for quite a while as
> well
> until we started moving their desktops to Macs about four years ago.
> 
> >Well, releases like this latest ubuntu will change not only my mind, but
> the
> >minds of lots of folks who think like me.  I mean for the Linux crowd to
> >have been working for so many years and still have not come up with a
> decent
> >"color" setup a la "setcolor" from SCO...  it is just crazy.
> 
> One of the first things I did when moving to Linux from SCO years ago was
> to do everything in monochrome xterms, even on SCO boxes.  I find the
> color
> selections of many programs horrible, and much prefer a simple light
> background with black text and a red cursor (so that reverse video
> characters are visible).
> 
> >Okay, the ubuntu, you download a file, burn it to a CD, use the CD on
> just
> >about any P"C (server, etc.)... it asks you about 4 questions like "do
> you
> >want to use the whole disk for Linux?"  even if it is a multi-disk FAID5
> >that you want, and so forth.... the simple questions done in seconds, the
> >thing loads itself completely on your box and it's ready to go.  From
> this
> >point you can get or (unget) any package you want with a simple command
> >like:
> 
> As Mark said in another post, the Ubuntu/Debian systems are too much a
> Stallman/GNU religious cult for my liking.
> 
> We install CentOS using kickstart network installs.  Burn a tiny network
> install CD with a few kickstart configuration files (an interactive and
> non-interactive file for installation on VMware virtual machines and the
> same for real hardware).  It requires typing an option at the boot prompt,
> then goe away and forget it for the remainder of the installation.
> 
> Once that install is complete, we install about 240 packages built under
> the OpenPKG portable package management system which have all the servers,
> and our own management software.  When installation from our OpenPKG ISO
> image is complete, a low-level tech can then set the network parameters,
> and configure all systems, e-mail, apache, mysql, postgresql, horde, imp,
> kronolith, etc. in less than five minutes at the keyboard to arrive at a
> fully configured server.
> 
> >Sudo apt-get install package-name
> >
> >And
> >
> >Sudo apt-get remove package-name
> 
> sudo yum install packagename
> 
> sudo yum remove packagename
> 
> ...
> >The bottom line is that filePro works dead easy on this box. (you really
> >just need to copy over the "ansi" terminfo from your working SCO box...
> and
> >the ansi termcap defs from it as well.  And if you use FacetWin, make
> sure
> >that "inetd" is working properly. (an apt-get package thing only.)  If
> you
> >use Bob's anzio product to get to the Linux server, I don't think much of
> >anything would be required.  Printing just works out of the box... even
> >local printing (PFPT=ON).  You can even use the "useradd" command to
> >duplicate your old Unix users, ID, directory and all.
> 
> That's no different from any of the Linux systems I've used for years.
> 
> I have written a script that will read the /etc/{passwd,group,shawod}
> files
> from a SCO box, and create the users on a Linux box including creating the
> appropriate smb.passwd file for Samba, users for jive_messenger, and
> OpenLDAP user information.  This script migrates user home directories
> from
> /usr/usrname or /u/usr/usrname to /home/usrname as well.  The openldap
> /home/usrname home directories are mapped to /homes/usrname to avoid
> conflicts on other systems using nss_ldap for authentication from the
> central server.
> 
> >Just a point of info for all you folks who don't have any other easy
> means
> >of hearing stuff like this.  You can load a server version of ubuntu, or
> >just load the desktop version and add the server things you need, same
> 
> As much as I like Linux for servers, I rarely use it for a desktop since
> moving to Mac OS X where everything Just Works(tm), and it has all sorts
> of
> neat tools to do multi-media things without having to worry about getting
> all the bits and pieces to work together.
> 
> I am typing this on an old PPC Titanium Powerbook running Leopard running
> mutt in an xterm on our primary server which is running SuSE Enterprise
> Linux 10 which has been running since July 2006 with a single reboot due
> to
> an equipment move.  My main desktop machine is a 3-year old PPC Mac Mini,
> and I gave my wife a similar Mac Mini so I wouldn't have to deal with her
> old Windows machine.
> 
> ...
> >Now for my question.
> >
> >The ls command does a lot of color changing for lots of different
> >reasons.... directories, executable files, etc.  It is beyond annoying...
> If
> >you have a black background like me... it is IMPOSSIBLE.
> >
> >I have gotten the great help from various folks and made the "ls" command
> to
> >work like the "l" command I know and love (skipping the color thing) by
> >doing this in my .profile....
> 
> You can either set up an aliase in your ~/.bash_login or ~/.bashrc file,
> ``alias l='ls -la --color=none'' or write a one line shell script that
> does
> the same thing.
> 
> The ls colors output is controlled by and environment variable, LS_COLORS
> which has all sorts of options for different types of files, directories,
> etc..  As I have said, I prefer a simple monochrome output so just ``unset
> LS_COLORS'' to get rid of this.
> 
> ...
> >It stops the program from doing any color shifting.... great.  Now, I
> have
> >to stop "vi" from doing it as well.  On this Linux, "vim" is the choice
> for
> >vi... it is an improved vi and great for editing any kind of file
> including
> >binary files and things with unprintable characters like pcl files.  So,
> >anyway, I start off by doing this in the .profile.
> >
> >alias vi="vim -T ansi $* -u /root/.vimrc"
> 
> Why not just ``alias vi=vim'' as the terminal type is autotically taken
> from the TERM variable and it uses ~/.vimrc by default?
> 
> On CentOS systems I use ``alias vi='vim'' to insure that it really uses
> the
> full vim, and not the stripped down /bin/vi version which doesn't do split
> windows.  I also set ``VISUAL=vim'' so that ``less'' uses vim, and not
> /bin/vi as well.  This was something I did not have to do on SuSE.
> 
> >This gets me using vim and pointing to an initialization file for it
> >".vimrc".  so what do I put in this .vimrc to STOP the damn color
> shifting
> >in vi?????  I have read the info about "syntax"  and tried
> 
> As mark said, this is simply ``syntax off''.  I have attached my ~/.vimrc
> file which has the settings I use, many are ``vi'' compatible even on SCO
> systems.  FWIW, the difference between F5 and F6 is that I wrote a ``fmt''
> script that runs input through ``nroff'' years before the ``fmt'' command
> became standard so F6 forces the system's version.
> 
> The ``set mps+=<:>'' line causes the ``%'' matching to work on HTML, XML,
> etc.  markup languages.
> 
> Mark uses some more sophisticated color shemes than I do.
> 
> >Ultimately, I would LOVE to be able to govern the color of my screen so I
> >could do what I so easily do on SCO, change my foreground and background
> >based on my PFDIR... live, or dev, etc.
> 
> The only thing I really do with color is to set the background of some
> xterm windows, particularly for accounting applications where I want to be
> sure I'm running the right system.  Here are some examples to run
> our Unify based accounting application on an OpenServer system
> 
> # this one runs our main accounting
> #!/bin/sh
> user=csllc
> system=accting.example.com
> 
> xterm=/csoft/bin/xterm
> ssh -f $system $xterm \
> 	-xrm \"*title: CSLLC Accountin\" \
> 	-bg LightSkyBlue -e /usr/local/ubin/unrun $user
> #end of script
> 
> # This is for my personal stuff:
> #!/bin/sh
> user=bill
> system=accting.example.com
> 
> xterm=/csoft/bin/xterm
> 
> ssh -f $system $xterm \
> 	-xrm \"*title: BILL Accounting\" \
> 	-bg AntiqueWhite3 -e /usr/local/ubin/unrun $user
> #end of script
> 
> These scripts run the OpenPKG version of xterm on a SCO server (actually
> an
> OSR 5.0.6a VMware virtual machine running on a CentOS 5.1 host), executing
> the command to run the accounting application in that xterm.  The
> different
> background colors make it easy to see which system I'm in, and they show
> the same color when minimized in the OS X Dock.
> 
> The attached ~/XTerm file can be put in your $HOME directory to
> automatically set things in xterms and has some settings including:
> 
>    + Set a large font as default.
> 
>    + Set the cursor color to red,
> 
>    + The XTerm*charClass is magic to make double left mouse click usually
>      highlight the interesting parts of path names, etc.
> 
>    + The XTerm*ttyModes is very similar to ``stty'' to set the interrupt
> to
>      ctrl-C as $DEITY intended, use ctrl-H as backspace instead of the
>      DECish DEL character and be sure that ctrl-U clears the current line.
> 
> Bill
> --
> INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
> URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
> Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
> Fax:            (206) 232-9186
> 
> There is no distinctly native American criminal class save Congress
>     -- Mark Twain



More information about the Filepro-list mailing list