[gentoo-user] Bash Duplicated Prompt
Hi, I have this problem when ssh into my machine. The bash prompt is displayed as below. When I *ctrl + l* the screen, it backs to normal. local prompt is okay. This problem is really annoying. Anybody has any idea? GNU bash, version 4.2.36(1)-release (i686-pc-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. *kit393@gentoo-box:~kit393@gentoo-box ~ $* echo $PS1 \[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] *kit393@gentoo-box:~kit393@gentoo-box ~ $* env MANPATH=/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.5.3/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.22.52.0.1/man TERM=xterm SHELL=/bin/bash HISTSIZE=5000 XDG_SESSION_COOKIE=a1a238c1c0beb1e1d873f6780018-1342417590.318348-451680483 VBOX_APP_HOME=/opt/VirtualBox XIM_PROGRAM=fcitx SSH_TTY=/dev/pts/4 HISTFILESIZE=5000 USER=kit393 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: PRELINK_PATH_MASK=/opt:/usr/lib/klibc:/usr/lib/libfreebl3.so:/usr/lib/libnssdbm3.so:/usr/lib/libsoftokn3.so GUILE_LOAD_PATH=/usr/share/guile/1.8 GDK_USE_XFT=1 PAGER=/usr/bin/less CONFIG_PROTECT_MASK=/etc/gentoo-release /etc/sandbox.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/revdep-rebuild XDG_CONFIG_DIRS=/etc/xdg MAIL=/var/mail/kit393 PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.3:/usr/games/bin XIM=fcitx QT_IM_MODULE=xim DISTCC_LOG=/var/log/distcc.log PWD=/home/kit393 XMODIFIERS=@im=fcitx EDITOR=/usr/bin/vi LANG=en_US.utf8 GSETTINGS_BACKEND=gconf TZ=Asia/Singapore QT_GRAPHICSSYSTEM=raster DISTCC_VERBOSE=1 DCCC_PATH=/usr/lib/distcc/bin HISTCONTROL=ignoreboth:erasedups MANPAGER=vimmanpager SHLVL=1 HOME=/home/kit393 LESS=-R -M --shift 5 LOGNAME=kit393 GCC_SPECS= LC_CTYPE=zh_CN.UTF-8 XDG_DATA_DIRS=/usr/local/share:/usr/share LESSOPEN=|lesspipe %s INFOPATH=/usr/share/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.5.3/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.22.52.0.1/info RUBYOPT=-rauto_gem OPENGL_PROFILE=xorg-x11 XSESSION=awesome GTK_IM_MODULE=xim _=/usr/bin/env *kit393@gentoo-box:~kit393@gentoo-box ~ $ * Thanks and Regards, Liang Yun
[gentoo-user] Re: Bash Duplicated Prompt
attached is screen shot. [image: Inline image 1] On Mon, Jul 16, 2012 at 1:56 PM, LiangYun Gong kit...@gmail.com wrote: Hi, I have this problem when ssh into my machine. The bash prompt is displayed as below. When I *ctrl + l* the screen, it backs to normal. local prompt is okay. This problem is really annoying. Anybody has any idea? GNU bash, version 4.2.36(1)-release (i686-pc-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. *kit393@gentoo-box:~kit393@gentoo-box ~ $* echo $PS1 \[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] *kit393@gentoo-box:~kit393@gentoo-box ~ $* env MANPATH=/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.5.3/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.22.52.0.1/man TERM=xterm SHELL=/bin/bash HISTSIZE=5000 XDG_SESSION_COOKIE=a1a238c1c0beb1e1d873f6780018-1342417590.318348-451680483 VBOX_APP_HOME=/opt/VirtualBox XIM_PROGRAM=fcitx SSH_TTY=/dev/pts/4 HISTFILESIZE=5000 USER=kit393 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: PRELINK_PATH_MASK=/opt:/usr/lib/klibc:/usr/lib/libfreebl3.so:/usr/lib/libnssdbm3.so:/usr/lib/libsoftokn3.so GUILE_LOAD_PATH=/usr/share/guile/1.8 GDK_USE_XFT=1 PAGER=/usr/bin/less CONFIG_PROTECT_MASK=/etc/gentoo-release /etc/sandbox.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/revdep-rebuild XDG_CONFIG_DIRS=/etc/xdg MAIL=/var/mail/kit393 PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.5.3:/usr/games/bin XIM=fcitx QT_IM_MODULE=xim DISTCC_LOG=/var/log/distcc.log PWD=/home/kit393 XMODIFIERS=@im=fcitx EDITOR=/usr/bin/vi LANG=en_US.utf8 GSETTINGS_BACKEND=gconf TZ=Asia/Singapore QT_GRAPHICSSYSTEM=raster DISTCC_VERBOSE=1 DCCC_PATH=/usr/lib/distcc/bin HISTCONTROL=ignoreboth:erasedups MANPAGER=vimmanpager SHLVL=1 HOME=/home/kit393 LESS=-R -M --shift 5 LOGNAME=kit393 GCC_SPECS= LC_CTYPE=zh_CN.UTF-8 XDG_DATA_DIRS=/usr/local/share:/usr/share LESSOPEN=|lesspipe %s INFOPATH=/usr/share/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.5.3/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.22.52.0.1/info RUBYOPT=-rauto_gem OPENGL_PROFILE=xorg-x11 XSESSION=awesome GTK_IM_MODULE=xim _=/usr/bin/env *kit393@gentoo-box:~kit393@gentoo-box ~ $ * Thanks and Regards, Liang Yun 2012-07-16_123431.png
[gentoo-user] SCP bash script
Hi guys, I have a problem with scp bash script. I was trying to automate scp command to copy files in and out, and I was trying to avoid key in the password myself. So I attempt to use the here string feature of bash, it didn't work with scp. And those server I am working with, they don't have expect package installed. :-( ps. I am not supposed to change the configuration of the servers( includes setup openssh keys, or install expect) You guys have any idea that can help this case? Thanks Regards, kit393
Re: [gentoo-user] SCP bash script
Right, I am just not sure that's the only way. Since I just want to copy one file in and one file out on many servers, this solution will double the work. It's just for servers auditing, you know. But thanks a lot anyway. Appreciate you help. :-) On Thu, May 3, 2012 at 9:20 PM, Adam Carter adamcart...@gmail.com wrote: On Thu, May 3, 2012 at 9:44 PM, LiangYun Gong kit...@gmail.com wrote: Hi guys, I have a problem with scp bash script. I was trying to automate scp command to copy files in and out, and I was trying to avoid key in the password myself. So I attempt to use the here string feature of bash, it didn't work with scp. And those server I am working with, they don't have expect package installed. :-( ps. I am not supposed to change the configuration of the servers( includes setup openssh keys, or install expect) Typically you would copy local:~/.ssh/id_dsa.pub (or non dsa equivalent) into remote:~/.ssh/authorized_keys - since that's only user level, no need for root access. Its changing the configuration of the user on the remote machine, but since that user is you, its usually ok. You then use -i with scp.