LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-21-2006, 07:27 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Colorizing vim and ls command as normal user


Hi All,

I'm trying to configure my user environment on a box where I have only normal user's rights.

The host box is using FreeBSD 4.11 and Bash 2.05b. On my personal box I use Bash 3.00.16 and Slackware 10.2.

I successfully uploaded a .bash_profile config file to help customize my environment. The file is working because my prompt is correct as well as several environment variables and alias commands. However, I cannot get colors to work correctly with the ls command or inside vim.

Colors seem to be working partially because my shell prompt is colorized just as I configured. To be certain that some colorization was functional, I temporarily edited my .bash_profile and modified my shell prompt without colors. After logging out and logging in via SSH, my prompt was colorless. I then restored my .bash_profile and the prompt colors returned.

Similarly, when I launch vim empty, the intro screen shows some blue colors , but when I open a shell script or html file there is no syntax highlighting in the text.

I uploaded my .vimrc config file from my personal box. I also uploaded my own DIR_COLORS file and then edited .bash_profile to reference that file instead of the system file. As a result the LS_OPTIONS and LS_COLORS environment variables are exactly the same as on my personal box. But no colors when listing files with ls. Likewise no colors with vim.

A little help is appreciated!
 
Old 01-21-2006, 08:56 PM   #2
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
dir colors in terms:
add "source /etc/profile" to ~/.bashrc

vim colors:
cp /usr/share/vim/vim63/vimrc_example.vim /usr/share/vim/vimrc
 
Old 01-22-2006, 04:53 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
I finally got vim to display colored syntax highlighting. The server is using vim 6.4.x and my config file is for 6.3.x. I had to delete my .vimrc and copy the sample from the vim64 directory.

Regarding a colorized ls command, the problem is related to using BSD. I've been browsing the BSD man pages but no success thus far. I don't know the differences between BSD and Slack/Linux so any help is appreciated.
 
Old 01-22-2006, 10:21 PM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
If anybody is interested I finally got color to work with my ls command on that FreeBSD server. Apparently the ls command in FreeBSD is not the same as the GNU ls command. Also, the FreeBSD ls command does not seem to recognize any LS_OPTIONS environment variable.

My particular solution was to upload a copy of my DIR_COLORS file to my home directory. In my ~/.bashrc I used the familiar eval `dircolors -b $HOME/etc/DIR_COLORS` directive to generate the LS_COLORS environment variable. Then I had to use an alias to use the gnuls command:

alias ls="gnuls -laFb --color=always"

The only thing consistent in the computer world is that very little is consistent.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running super user commands as normal user mickyg Linux - Security 5 10-14-2005 07:25 PM
can normal user use shutdown command? sorno Linux - Newbie 2 07-30-2005 06:11 AM
problem in running the command as a normal user junaid18183 Linux - General 2 06-25-2005 06:27 AM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM
normal user cannot use mount command mrosati Slackware 4 01-05-2004 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration