[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[plamo:30834] Re: prompt が .bashrc で変更できません。



冨岡さんありがとうございます。
河村です。

まず
$echo $SHELL
$/bin/bash
で shell は bash に間違いありません。

以下は .bashrc と ps -axw です。よろしくお願いします。

.bashrcですが以下のようになります。

###################################################################
#  Plamo Linux ユーザ設定ファイルサンプル for bash
#                            Time-stamp: <2010-11-23 21:06:07 nori>

## ログイン時以外 (ログインシェルでない場合) で、
## 対話シェルの場合に実行されます。

PS1='\[\033[33m\]\u@\h:\w\$ \[\033[0m\] '   <追加してみた一行(色が変えたかった。)

if [ ! -n "$SSH_CLIENT" -o -n "$SSH_TTY" ] ; then

# シェル変数の設定 (詳細は man bash)
# 保存する履歴の行数
HISTSIZE=512
HISTFILESIZE=512
# 空白文字で始まる行,履歴の最後の行にマッチする行は
# 履歴に入れない
HISTCONTROL=ignoreboth
# Ctrl+D は 3 回無視する
IGNOREEOF=3

# 端末によって日本語表示する/しないの切り替え
#if [ "$TERM" = "linux" ] ; then
#  LANG=C
#else
#  LANG=ja_JP.eucJP
#fi
LANG=ja_JP.eucJP
export LANG

# JISで表示できない端末はEUCにする
if [ "$TERM" = "xterm" -o "$TERM" = "dtterm" ] ; then
 JLESSCHARSET=japanese-euc
fi

# less で行番号をつけ,終了後に画面を残す
LESS='-M -X'

EDITOR='vi'
#EDITOR='emacs -nw'
PAGER='less'
export LESS EDITOR PAGER

# if [ $SHLVL = 1 ] ; then
#   PATH="$PATH:." ;
# fi

# ls で色をつける
# 色設定等は ~/.dir_colors
if which dircolors >& /dev/null; then
 eval `dircolors -b $HOME/.dir_colors`
 LS_OPTIONS='--color=auto -F -T 0 -N'
else
 LS_OPTIONS='-F -T 0 -N';
fi
# Emacs などの dumb 端末では色をつけない
if [ "$TERM" = "dumb" ] ; then
 LS_OPTIONS="-F -T 0 -N --color=none"
else
 GREP_OPTIONS="--color=auto"
 export GREP_OPTIONS
fi
export LS_OPTIONS

alias ls='ls $LS_OPTIONS'
alias dir='dir $LS_OPTIONS';
alias vdir='vdir $LS_OPTIONS';

# Windowのタイトルバーにカレントディレクトリ
# が表示不可能な場合のプロンプト設定
PS1='\u@\h:\s\$ '                             <こんな感じ
#PS1='\u@\h:\w\$ '                            <
#PS1='\[\033[33m\]\u@\h:\w\$ \[\033[0m\] '            <


# 端末のタイトルに prompt を表示する
if [ "$TERM" = "screen" ] ; then
 SCREEN=screen@
fi
case $TERM in
kterm|xterm|rxvt|dtterm|vt100|screen)
   # Windowのタイトルバーにカレントディレクトリ
   # が表示可能な場合のプロンプト設定
   #   表示例→ hoge@host:/usr/X11R7/lib/X11/app-defaults$ _
   PS1='\u@\h:\w\$ '                            <ここ   
   #   表示例→ hoge@host:app-defaults$ _
   #PS1='\u@\h:\W\$ '
   HN="$SCREEN`hostname`:"
   #HN="$SCREEN`hostname -s`:"
   case "$TERM" in
   vt*)
HN=""
   ;;
   esac
   function mkrmhmpwd () {
tty > /dev/null
if [ "$?" = "0" ] ; then
  BSBS_HOME=`echo "/$HOME"|/usr/bin/sed -e 's/\//\\\\\//g'` ;
  RMHMPWD=`echo "/$PWD"|/usr/bin/sed -e "s/$BSBS_HOME/~/g"` ;
  if [ "$RMHMPWD" = "/$PWD" ] ; then
      RMHMPWD="$PWD"
  fi
fi
   }
   # 遅いマシンではこの設定の方がいいかも…
   # function mkrmhmpwd () { RMHMPWD="$PWD" ; }
   function termtitle () {
tty > /dev/null
if [ "$?" = "0" ] ; then
  if [ -w `tty` ] ; then
    echo -ne "\033]0;$TERM - $*\007" > `tty`
  fi
fi
   }
   function cd () {
if [ "x.$*" = "x." ] ; then
    builtin cd $* ;
else
    builtin cd "$*" ;
fi
mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]" ;
   }
   function popd () {
if [ "x.$*" = "x." ] ; then
    builtin popd $* ;
else
    builtin popd "$*" ;
fi
mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]" ;
   }
   function pushd () {
if [ "x.$*" = "x." ] ; then
    builtin pushd $* ;
else
    builtin pushd "$*" ;
fi
mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]" ;
   }
   #function pwd () { builtin pwd ; mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]"
; }
   function su () { mkrmhmpwd ; termtitle "$HN""su $*($RMHMPWD)" ;
if [ "$1" = "-c" ] ; then command su -c "$2";
elif [ "$2" = "-c" ] ; then command su $1 -c "$3"
elif [ "$3" = "-c" ] ; then command su - $2 -c "$4"
else command su $* ; fi
mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]" ; }
   function rsh () {
termtitle "$HN""rsh $*"
command rsh $*
mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]"
   }
   function rlogin () {
termtitle "$HN""rlogin $*"
command rlogin $*
mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]"
   }
   function telnet () {
termtitle "$HN""telnet $*"
command telnet $*
mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]"
   }
   function ssh () {
termtitle "$HN""ssh $*"
command ssh $*
mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]"
   }
   function screen () {
command screen $*
mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]"
   }
#    mkrmhmpwd ; termtitle "$HN""[$RMHMPWD]"
;;
esac

# 端末によるBackSpaceキーの調整
stty erase '^?'
case "$TERM" in
kterm|sun)
   stty erase '^H'
#   ~/.inputrc で設定済
#   bind '"\C-?": delete-char'
   ;;
#vt*)
#    stty erase '^H'
#    bind '"\C-?": delete-char'
#    ;;
esac
stty werase '^W'
# Ctrl+S での stop をやめる
stty stop undef

# キーバインド等の設定は .inputrc も参照してください.

#Aliases
alias h='history'
alias rmdvi='rm *.dvi ; rm *.log ; rm *.aux ; rm *.toc'
alias rmback='rm *~ ; rm *.bak'
alias j='jobs -l'
alias la='ls -a'
alias ll='ls -l'
alias z='suspend'
alias x='exit'
alias LS='ls -alF | command less -E'
alias mu='mule -rv'
#alias ssh1='ssh -1'
#alias scp1='scp -oProtocol=1'
#alias xv='xv -nolimits'

fi

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

############################################################################
ここからがps -axw

 PID TTY      STAT   TIME COMMAND
   1 ?        Ss     0:00 init [3]
   2 ?        S      0:00 [kthreadd]
   3 ?        S      0:00 [migration/0]
   4 ?        S      0:00 [ksoftirqd/0]
   5 ?        S      0:00 [migration/1]
   6 ?        S      0:00 [ksoftirqd/1]
   7 ?        S      0:00 [migration/2]
   8 ?        S      0:00 [ksoftirqd/2]
   9 ?        S      0:00 [migration/3]
  10 ?        S      0:00 [ksoftirqd/3]
  11 ?        S      0:00 [events/0]
  12 ?        S      0:00 [events/1]
  13 ?        S      0:00 [events/2]
  14 ?        S      0:00 [events/3]
  15 ?        S      0:00 [khelper]
  20 ?        S      0:00 [async/mgr]
  21 ?        S      0:00 [pm]
 129 ?        S      0:00 [sync_supers]
 131 ?        S      0:00 [bdi-default]
 132 ?        S      0:00 [kintegrityd/0]
 133 ?        S      0:00 [kintegrityd/1]
 134 ?        S      0:00 [kintegrityd/2]
 135 ?        S      0:00 [kintegrityd/3]
 137 ?        S      0:00 [kblockd/0]
 138 ?        S      0:00 [kblockd/1]
 139 ?        S      0:00 [kblockd/2]
 140 ?        S      0:00 [kblockd/3]
 142 ?        S      0:00 [kacpid]
 143 ?        S      0:00 [kacpi_notify]
 144 ?        S      0:00 [kacpi_hotplug]
 249 ?        S      0:00 [ata/0]
 250 ?        S      0:00 [ata/1]
 251 ?        S      0:00 [ata/2]
 252 ?        S      0:00 [ata/3]
 253 ?        S      0:00 [ata_aux]
 254 ?        S      0:00 [ksuspend_usbd]
 259 ?        S      0:00 [khubd]
 262 ?        S      0:00 [kseriod]
 335 ?        S      0:00 [kswapd0]
 336 ?        S      0:00 [aio/0]
 337 ?        S      0:00 [aio/1]
 338 ?        S      0:00 [aio/2]
 339 ?        S      0:00 [aio/3]
 340 ?        S      0:00 [crypto/0]
 341 ?        S      0:00 [crypto/1]
 342 ?        S      0:00 [crypto/2]
 343 ?        S      0:00 [crypto/3]
 986 ?        S      0:00 [cciss_scan]
1010 ?        S      0:00 [scsi_eh_0]
1013 ?        S      0:00 [scsi_eh_1]
1018 ?        S      0:00 [scsi_eh_2]
1021 ?        S      0:00 [scsi_eh_3]
1143 ?        S      0:00 [kjournald]
1173 ?        S<s    0:00 /sbin/udevd --daemon
3307 ?        S      0:00 [usbhid_resumer]
3340 ?        S      0:00 [kpsmoused]
3380 ?        S      0:00 [pccardd]
3448 ?        S      0:00 [hd-audio0]
3519 ?        S      0:00 [i915/0]
3525 ?        S      0:00 [i915/1]
3529 ?        S      0:00 [i915/2]
3533 ?        S      0:00 [i915/3]
3941 ?        S      0:00 [flush-8:0]
3950 ?        S      0:00 [jbd2/sda5-8]
3951 ?        S      0:00 [ext4-dio-unwrit]
3952 ?        S      0:00 [ext4-dio-unwrit]
3953 ?        S      0:00 [ext4-dio-unwrit]
3954 ?        S      0:00 [ext4-dio-unwrit]
4034 ?        Ss     0:00 /sbin/dhclient eth1
4081 ?        Ss     0:00 syslogd -m 0
4084 ?        Ss     0:00 klogd -c 4
4086 ?        Ss     0:00 rpc.portmap
4088 ?        Ss     0:00 inetd
4090 ?        Ss     0:00 dbus-daemon --system
4112 ?        S      0:00 crond -l8
4114 ?        Ss     0:00 atd
4117 ?        Ss     0:00 /usr/sbin/sj3serv
4118 ?        S      0:00 /usr/sbin/sj3serv
4141 ?        Ss     0:00 avahi-daemon: running [noriux.local]
4148 ?        Ss     0:00 /usr/sbin/avahi-dnsconfd -D
4153 ?        Ss     0:00 /usr/sbin/cannaserver -inet
4163 ?        Ssl    0:00 /usr/sbin/console-kit-daemon
4235 ?        Ss     0:00 /usr/sbin/cupsd -C /usr/etc/cups/cupsd.conf
4249 ?        Ss     0:00 /usr/sbin/gpm -m /dev/input/mice -t imps2
4250 ?        Ss     0:00 /usr/bin/gpm-root
4254 ?        Ss     0:00 /usr/sbin/hald --use-syslog
4255 ?        S      0:00 hald-runner
4283 ?        S      0:00 hald-addon-input: Listening on /dev/input/event4
/dev/input/event2 /dev/input/event3
4296 ?        S      0:00 /usr/libexec/hald-addon-rfkill-killswitch
4324 ?        S      0:00 hald-addon-acpi: listening on acpi kernel
interface /proc/acpi/event
4325 ?        S      0:00 hald-addon-storage: no polling on /dev/fd0
because it is explicitly disabled
4326 ?        S      0:00 hald-addon-storage: polling /dev/sr0 (every 2
sec)
4341 ?        Ss     0:00 /usr/bin/ntpd -c /etc/ntp.conf
4411 ?        Ss     0:00 /usr/libexec/postfix/master
4414 ?        S      0:00 pickup -l -t fifo -u
4415 ?        S      0:00 qmgr -l -t fifo -u
4417 ?        Ss     0:00 /usr/sbin/nmbd -D
4419 ?        Ss     0:00 /usr/sbin/smbd -D
4423 ?        Ss     0:00 /usr/sbin/saslauthd -a shadow
4424 ?        S      0:00 /usr/sbin/saslauthd -a shadow
4425 ?        S      0:00 /usr/sbin/saslauthd -a shadow
4426 ?        S      0:00 /usr/sbin/saslauthd -a shadow
4427 ?        S      0:00 /usr/sbin/saslauthd -a shadow
4431 ?        S      0:00 /usr/sbin/smbd -D
4432 ?        S      0:00 /usr/bin/Wnn4/jserver
4441 tty1     Ss     0:00 /bin/login --
4442 tty2     Ss+    0:00 /sbin/agetty 38400 tty2 linux
4443 tty3     Ss+    0:00 /sbin/agetty 38400 tty3 linux
4444 tty4     Ss+    0:00 /sbin/agetty 38400 tty4 linux
4445 tty5     Ss+    0:00 /sbin/agetty 38400 tty5 linux
4446 tty6     Ss+    0:00 /sbin/agetty 38400 tty6 linux
4468 tty1     S      0:00 -bash
4485 ?        Ss     0:00 esd -r 48000
4497 ?        S      0:00 [scsi_eh_4]
4498 ?        S      0:00 [usb-storage]
4542 ?        S      0:00 hald-addon-storage: polling /dev/sdc (every 2
sec)
4545 tty1     S+     0:00 /bin/sh /usr/X11R7/bin/startx
4558 tty1     S+     0:00 xinit /home/nori/.xinitrc --
4559 tty7     Ss+    0:01 X :0
4568 tty1     S      0:00 /usr/bin/ck-launch-session startxfce4
4573 tty1     S      0:00 /usr/X11R7/libexec/kinput2 -canna -cannaserver
localhost
4574 tty1     S      0:00 /usr/X11R7/bin/skkinput
4577 tty1     S      0:00 /bin/sh /home/nori/.xinitrc
4578 tty1     S      0:00 /bin/sh /home/nori/.xinitrc
4581 tty1     S      0:00 uim-xim
4583 tty1     S      0:00 uim-toolbar-gtk-systray
4585 tty1     S      0:00 /usr/libexec/uim-helper-server
4587 ?        S      0:00 dbskkd-cdb
4589 ?        Ss     0:00 /usr/lib/scim-1.0/scim-launcher -d -c simple -e
all -f socket --no-stay
4594 ?        Ss     0:00 /usr/X11R7/libexec/nicolatter -D
4595 ?        Ss     0:00 /usr/lib/scim-1.0/scim-helper-manager
4596 ?        Ssl    0:00 /usr/lib/scim-1.0/scim-panel-gtk --display
:0.0 -c socket -d --no-stay
4598 ?        Ss     0:00 /usr/lib/scim-1.0/scim-launcher -d -c socket -e
socket -f x11
4601 tty1     S      0:00 unclutter
4609 tty1     S      0:00 /bin/sh /etc/xdg/xfce4/xinitrc
4617 tty1     S      0:00 xscreensaver -no-splash
4621 ?        Ss     0:00 /usr/bin/ssh-agent -s
4626 tty1     S      0:00
/usr/bin/dbus-launch --sh-syntax --exit-with-session
4627 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid
5 --print-address 7 --session
4629 tty1     S      0:00 /usr/bin/xfce4-session
4631 ?        S      0:00 /usr/libexec/xfconfd
4635 tty1     S      0:00 xfwm4 --sm-client-id
2e3a82169-e846-4b47-a267-17b908ab4808 --display :0.0
4636 tty1     S      0:00 xfsettingsd
4637 tty1     S      0:00 Thunar --sm-client-id
2878ca8eb-9a40-449e-94c5-a84de1b7c0fa --daemon
4639 ?        S      0:00 /usr/libexec/gam_server
4641 tty1     S      0:00 xfce4-panel -r --sm-client-id
2c6816c77-2d40-45d0-bc18-3c63c55c917e
4642 tty1     S      0:00 xfdesktop --sm-client-id
27d70af5c-72f6-4472-9127-cf9fefb29dad --display :0.0
4643 tty1     S      0:00 xfce4-settings-helper --display
:0.0 --sm-client-id 244a573df-765f-4ece-9e90-34f9369dd234
4646 tty1     S      0:00
/usr/libexec/xfce4/panel-plugins/xfce4-menu-plugin socket_id 37748769 name
xfce4-menu id 5 display_name Xfce 秧<??秧ャ?時size
29 screen_position 11
4648 ?        Ss     0:00 python /usr/share/system-config-printer/applet.py
4651 ?        Ss     0:00 gnome-power-manager
4653 ?        S      0:00 /usr/libexec/gconfd-2
4655 ?        S      0:00 /usr/libexec/gvfsd
4706 ?        S      0:00 [flush-8:32]
4710 tty1     S      0:00 /usr/bin/Terminal
4711 tty1     S      0:00 gnome-pty-helper
4712 pts/0    Ss     0:00 -bash
4730 pts/0    R+     0:00 ps axw
4731 pts/0    S+     0:00 nkf -c


Follow-Ups
[plamo:30835] Re: prompt が.bashrc で変更できません。, Tomioka Mikio
[plamo:30836] Re: prompt が .bashrcで変更できません。, YANAGI Shinji
References
[plamo:30830] Re: prompt が .bashrcで変更できません。, Tomioka Mikio
[plamo:30831] Re: prompt が.bashrc で変更できません。, Tomioka Mikio
[plamo:30832] Re: prompt が .bashrc で変更できません。, nori
[plamo:30833] Re: prompt が.bashrc で変更できません。, Tomioka Mikio

[検索ページ] [メール一覧]
Plamo ML 公開システム