LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-27-2004, 12:28 PM   #1
nokobino
LQ Newbie
 
Registered: Oct 2004
Location: Raleighwood, NC
Distribution: Gentoo 2.6.9-r1
Posts: 3

Rep: Reputation: 0
Using sudo with Eterm


I have two key toggles in my .fluxbox/keys file that open Eterm. One as user and one as root.

Code:
Control E :ExecCommand Eterm -f yellow --trans --shade 50 --geometry 125x25 --scrollbar 0 --buttonbar off
Control S E :ExecCommand sudo Eterm -f yellow --trans --shade 50 --geometry 125x25 --scrollbar 0 --buttonbar off
The user version functions properly. The root also functions properly, but shows the owner of the terminal still as user.

Code:
 blackdog ryan $
The titlebar shows root@blackdog as expected. Can someone tell me how to change the terminal to show
Code:
blackdog root $
Thanks!
 
Old 10-27-2004, 02:19 PM   #2
UsualTuxpect
Member
 
Registered: Aug 2004
Location: New York
Distribution: --------- Gentoo-2004.2 [2.6.8] Redhat-9 [2.6.6]
Posts: 545

Rep: Reputation: 31
edit your .bashrc file and include the following and open a new terminal to notice the changes.
[****Note: back up your .bashrc, you might have some of the portion already in your .bashrc so exclude those sections.. ]

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi


##### ADDED FOR COLORS, PATH DISPLAY IN THE TERMINAL#######

PS1="[\u@\h \W]\\$ " # show name & current folder

# colors for ls, etc.
eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"

# Change the window title of X terminals
case $TERM in
xterm*|rxvt|Eterm|eterm|aterm|Aterm)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
;;
screen)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
;;
esac

##uncomment the following to activate bash-completion:
[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion

###############################################################


Post back as to how it went.
 
Old 10-27-2004, 02:36 PM   #3
nokobino
LQ Newbie
 
Registered: Oct 2004
Location: Raleighwood, NC
Distribution: Gentoo 2.6.9-r1
Posts: 3

Original Poster
Rep: Reputation: 0
Solved

I had already added this line to my .bashrc file. We're assigned static IPs and hostnames here at work, so I did this to show blackdog instead of bios7. The fix for me was to add the ${USER}. Now, each terminal opens with the correct user shown.

# Hostname
export PS1='\[\e]2;\u@blackdog \w\a\e \[\033[01;32m\]${USER}@blackdog \$ \[\033[00m\]'

Thanks for the reply.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Esetroot (Eterm) error - starting Eterm in transparent mode? nimcha Linux - Software 2 07-14-2007 05:58 AM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Eterm kurrupt Linux - Software 1 08-10-2004 08:05 PM
eterm help! boolim Slackware 1 09-26-2003 07:40 AM
Eterm chrismiceli Linux - Software 4 03-30-2003 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:01 PM.

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