Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Terminals, colors and VIM
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Roderik
n00b
n00b


Joined: 06 Jun 2002
Posts: 55
Location: Belgium

PostPosted: Sun Jun 09, 2002 12:01 pm    Post subject: Terminals, colors and VIM Reply with quote

problem isn't hard, just some pointers would suffice to get me on my way

I installed gentoo on my 2 pc's, works great, on 1 small detail

1. mc is black instead of blue
2. vim doens't have syntax highlighting
3. ls etc don't show me nice colors
4. bash-2.05a# as promt is kunda sucky if you don't exactly know where you were on your hard disk (ok pwd shows it but i like to see it in my prompt)

Those problems didn't exist when running mandrake, dunno exactly what terminal i used there (i use default xterm on fluxbox now).

Do i have to change some settings? (cause i notisec that when ssh'ing to the other box i did get colors and a dirname in my prompt, though not with ls) or use another teminal, or...

any help would be appreciated
Back to top
View user's profile Send private message
Roderik
n00b
n00b


Joined: 06 Jun 2002
Posts: 55
Location: Belgium

PostPosted: Sun Jun 09, 2002 12:07 pm    Post subject: Reply with quote

never mind the vim part

this solved it: http://forums.gentoo.org/viewtopic.php?t=4185
Back to top
View user's profile Send private message
alec
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 270
Location: Here

PostPosted: Sun Jun 09, 2002 12:36 pm    Post subject: Reply with quote

By saying that your prompt is only "bash-2.05a#" seems to make me think something is screwy with your profile. Try "source /etc/profile" - that should be a temporary fix. Did you alter your ~/.bashrc?
Back to top
View user's profile Send private message
Roderik
n00b
n00b


Joined: 06 Jun 2002
Posts: 55
Location: Belgium

PostPosted: Sun Jun 09, 2002 2:16 pm    Post subject: Reply with quote

didn't change anything, and it's on my 2 boxes just the same (1.1a and 1.2)

does it make a difference if i told you i always work as root? (i know it isn't smaert etc, but blah!)

ps: i don't even have a .bashrc
Back to top
View user's profile Send private message
alec
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 270
Location: Here

PostPosted: Sun Jun 09, 2002 2:37 pm    Post subject: Reply with quote

Try reemerging baselayout.


Here's the /etc/profile if you don't want to:

Code:
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/profile,v 1.12 2002/05/12 21:48:18 azarah Exp $

if [ -e "/etc/profile.env" ]
then
  source /etc/profile.env
fi

#077 would be more secure, but 022 is generally quite realistic
umask 022

if [ `/usr/bin/whoami` = 'root' ]
then
        if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
        then
                export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
        fi
        export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
else
        if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
        then
                export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
        fi
        export PATH="/bin:/usr/bin:${PATH}"
fi
unset ROOTPATH
export EDITOR="/usr/bin/nano"

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
        export INPUTRC="/etc/inputrc"
fi


I'll put it bluntly: yes, you're an absolute moron for running as root.

There was another thread on colors - search for it.
Back to top
View user's profile Send private message
Roderik
n00b
n00b


Joined: 06 Jun 2002
Posts: 55
Location: Belgium

PostPosted: Sun Jun 09, 2002 3:03 pm    Post subject: Reply with quote

alec wrote:
Try reemerging baselayout.


Here's the /etc/profile if you don't want to:

Code:
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/profile,v 1.12 2002/05/12 21:48:18 azarah Exp $

if [ -e "/etc/profile.env" ]
then
  source /etc/profile.env
fi

#077 would be more secure, but 022 is generally quite realistic
umask 022

if [ `/usr/bin/whoami` = 'root' ]
then
        if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
        then
                export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
        fi
        export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}"
else
        if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]
        then
                export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'
        fi
        export PATH="/bin:/usr/bin:${PATH}"
fi
unset ROOTPATH
export EDITOR="/usr/bin/nano"

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
        export INPUTRC="/etc/inputrc"
fi


I'll put it bluntly: yes, you're an absolute moron for running as root.

There was another thread on colors - search for it.


i'll try that, thx

and concerning the root thing, i've got it all figured out

1. running as root you can severely damage your system
>> i've got no problem reinstalling my box (i was a fervent windows user zo i'm used to it :))

2. to install packages etc you have to be root
>> saves me alot of time if i don't have to su every 30 seconds

3. Permissions
>> i'm the only one on my bix so there's no danger of others doing thing they shouldn't and i've got no probs with permissions anywhere

conclusion, if i'm stupid enough to do something that kills my box, i for sure won't do that a second time so i learned a valuable lesson.

but hey, eveyone has it's own views and standards
Back to top
View user's profile Send private message
alec
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 270
Location: Here

PostPosted: Sun Jun 09, 2002 3:14 pm    Post subject: Reply with quote

Hey, man, if you feel like reinstalling and bootstrapping all over again several times, go for it. Doesn't make you not stupid :)

I for one don't have the time in the day to reinstall KDE. I use Linux because I know it won't crash when I need to get stuff done - running in root mode sorta kills that. I don't install stuff every 30 seconds - I install stuff once and it works. Or I fiddle with configs.

Anyway, hope that stuff helps. Good luck scewing your box :)
Back to top
View user's profile Send private message
Roderik
n00b
n00b


Joined: 06 Jun 2002
Posts: 55
Location: Belgium

PostPosted: Sun Jun 09, 2002 3:41 pm    Post subject: Reply with quote

ok tried remerging, checked the profile, it's all as it should be

maybe good to tell is that it does work in CLI but not in X, but after the source thingy it does...
Back to top
View user's profile Send private message
Roderik
n00b
n00b


Joined: 06 Jun 2002
Posts: 55
Location: Belgium

PostPosted: Sun Jun 09, 2002 6:53 pm    Post subject: Reply with quote

found the problem after reading this thread: http://forums.gentoo.org/viewtopic.php?t=4545

i have to add -ls behind the xterm option in the fluxbox menu
Back to top
View user's profile Send private message
tomte
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2002
Posts: 122

PostPosted: Sun Jun 09, 2002 9:22 pm    Post subject: Reply with quote

Quote:

and concerning the root thing, i've got it all figured out

1. running as root you can severely damage your system
>> i've got no problem reinstalling my box (i was a fervent windows user zo i'm used to it :))

2. to install packages etc you have to be root
>> saves me alot of time if i don't have to su every 30 seconds

3. Permissions
>> i'm the only one on my bix so there's no danger of others doing thing they shouldn't and i've got no probs with permissions anywhere

conclusion, if i'm stupid enough to do something that kills my box, i for sure won't do that a second time so i learned a valuable lesson.

but hey, eveyone has it's own views and standards

it's plain stupid, these reasons just don't make it less so.
Back to top
View user's profile Send private message
Roderik
n00b
n00b


Joined: 06 Jun 2002
Posts: 55
Location: Belgium

PostPosted: Sun Jun 09, 2002 10:34 pm    Post subject: Reply with quote

sorry, but now i have to ask, why?

been working like this for a some 3-4 years now and never had a problem...
Back to top
View user's profile Send private message
alec
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 270
Location: Here

PostPosted: Mon Jun 10, 2002 2:45 am    Post subject: Reply with quote

Quoth the cocaine addict:

Hey, I've been doing this for a while, it's fun *sniff* and nothing has ever gone wro-----*falls over dead*

Stupid and arrogant. But this is getting OT.
Back to top
View user's profile Send private message
Locke
Guest





PostPosted: Mon Jun 10, 2002 5:19 am    Post subject: Reply with quote

Listen, if he is running linux just to learn and not for anything important, than he might as well run as root. The more mistakes you make, the better you learn :wink: . I have a computer I call my 'screw around' computer. I install operatings systems on it like once a month just to mess around with them and see what is up. I have 2 other computers that are my 'main' computers (and a laptop). I usually don't make a user account on my 'screw around' computer. I just run as root. And if I accidently wipe the drive, no big deal. That just gives me an excuse to practice installing or recovery techniques, or to start learning another operating system. So, in my opinion, if he wants to run as root like this, there's no reason not to. Not everyone is a sysadmin. Some people are just having fun with their computers.
Back to top
kraylus
l33t
l33t


Joined: 07 Jun 2002
Posts: 648
Location: ft.worth.tx

PostPosted: Mon Jun 10, 2002 7:54 am    Post subject: Reply with quote

hehe, one time i was running as root and i dled a file that when untarred it put a folder in my home dir called "etc"

being the retard that i am (i was also very tired) i did "rm -rf /etc" instead of "rm -rf etc/"

eh... hehe...

now if i was running as a non-privileged user i wouldn't have been able to do that (i was just installing an app - xchat i believe). i merely woulda had to su to root when the time to "make install" came around.

but live and learn. i dont tinker around in root near as much. in fact, i only do it after an install. but yes, that's not to say that he's stupid. if he were a sysadmin for an ISP or for some sorta webhost, then yes, that'd be stupid. but we're home users (at least i am) and running as root all the time means squat :P just... be prepared to suffer the consequences if yer doin it when yer tired ;)

ryan
_________________
I used gentoo BEFORE it was cool.
Back to top
View user's profile Send private message
tomte
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2002
Posts: 122

PostPosted: Mon Jun 10, 2002 9:34 pm    Post subject: Reply with quote

well, i don't said that he is stupid, only that he is doing one stupid thing, a difference, no?
Back to top
View user's profile Send private message
alec
Apprentice
Apprentice


Joined: 19 Apr 2002
Posts: 270
Location: Here

PostPosted: Tue Jun 11, 2002 12:22 am    Post subject: Reply with quote

Stupid is as stupid does.

;)

Can a moderator close this thread? It seems to be turning into a moron-who-runs-everything-as-root bashing more than an explanation of colors.
Back to top
View user's profile Send private message
Houdini
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 224
Location: New Mexico Tech, Socorro, NM

PostPosted: Fri Jun 14, 2002 5:07 am    Post subject: su-ing every 30 seconds Reply with quote

To try to bring this back into helpful...

Try sudo. It can set a ticket on your terminal so that you don't have
to enter a password every time you do something as root. Also, it asks
for your password, not the root one.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum