"gnome-terminal -e tmux ./"는 터미널을 영원히 엽니다.

"gnome-terminal -e tmux ./"는 터미널을 영원히 엽니다.

나는 최근에 물었다.이 문제. 나는 첫 번째 방법을 결코 사용하지 않을 것입니다.

gnome-terminal -e tmux ./.zshrc또는 .bashrc(두 쉘 모두 동일한 문제) 에 넣으면 . 이것을 사용하면 터미널은 무한 루프에서 항상 새 터미널을 엽니다.

사용자에게 이에 대해 물었고 그는 자신의 컴퓨터에서 작동한다고 말했기 때문에 그의 대답을 수락했고 그는 도움을 주려고 노력했으며 포상금이 곧 만료될 예정이지만 문제는 여전히 지속됩니다.

해당 명령을 실행하면 제대로 작동하지만 사용자가 내가 틀렸다고 생각 하지만 .zshrc그렇지 않으면 소싱할 때 오류가 표시됩니다. 아무튼 여기야.bashrc.zshrc

ZSH_THEME="robbyrussell"
plugins=(git)
source $ZSH/oh-my-zsh.sh
alias ll='ls -l'
alias rm='rm -i'
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
alias githd='git reset --hard HEAD'
alias bre='gedit ~/.zshrc'
alias brs='source ~/.zshrc'
alias wl='sudo modprobe -r wl'
alias clam='sudo clamscan  -r -i / > ~/clamav/clamav.log'
alias xa='sudo /opt/lampp/manager-linux-x64.run'
alias net='sudo nethogs'
alias android='sudo sh /opt/android-studio/bin/studio.sh'
alias rmgit='sudo rm -rf .git'
# Functions
function conv () { if ffmpeg -i $1 -codec copy $2;
then gvfs-trash $1 && cd ..;
fi }
function rt() { gvfs-trash $@; }
function mkcd {
  last=$(eval "echo \$$#")
  if [ ! -n "$last" ]; then
    echo "Enter a directory name"
  elif [ -d $last ]; then
    echo "\`$last' already exists"
  else
    mkdir $@ && cd $last
  fi
}
function j { java -jar $1; }
cmd() { curl "http://www.commandlinefu.com/commands/matching/$(echo "$@" \
    | sed 's/ /-/g')/$(echo -n $@ | base64)/plaintext" ;}
calc() {
  if which python2 &>/dev/null; then
    python2 -ic "from __future__ import division; from math import *; from random import *"
  elif which python3 &>/dev/null; then
    python3 -ic "from math import *; import cmath"
  elif which bc &>/dev/null; then
    bc -q -l
  else
    echo "Requires python2, python3 or bc for calculator features"
  fi
}
myip() {
  echo "--------------- Network Information ---------------"
  echo "router ip:" $(netstat -rn | awk 'FNR == 3 {print $2}')
  # newer system like archlinux
  ip addr | awk '/global/ {print $1,$2}' | cut -d\/ -f1
  ip addr | awk '/global/ {print $3,$4}'
  ip addr | awk '/ether/ {print $1,$2}'
  ip addr | awk '/scope link/ {print $1,$2}' | cut -d\/ -f1
  # older system like debian
  ifconfig | awk '/inet addr/ {print $1,$2}' | awk -F: '{print $1,$2}'
  ifconfig | awk '/Bcast/ {print $3}' | awk -F: '{print $1,$2}'
  ifconfig | awk '/inet addr/ {print $4}' | awk -F: '{print $1,$2}'
  ifconfig | awk '/HWaddr/ {print $4,$5}'
  ifconfig | awk '/Scope:Link/ {print $1,$3}' | cut -d\/ -f1
  # echo External IP $(curl -s http://checkip.dyndns.org/ | grep -o "[[:digit:].]\+")
  # echo External IP: $(curl -s http://ipaddr.io/)
  # echo External IP: $(curl -s https://icanhazip.com/)
  # echo External IP: $(curl -s https://ifconfig.co/)
  # echo External IP: $(curl -s http://pasteip.me/api/cli/ && echo)
  echo external ip: $(curl -s http://ipecho.net/plain)
  echo "---------------------------------------------------"
}
down4me() { curl -s "http://www.downforeveryoneorjustme.com/$1" | sed '/just you/!d;s/<[^>]*>//g';}
# Needed for virtualenvwrapper
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2.7
export VIRTUALENVWRAPPER_PYTHON
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Documents/Projects/Python
source /usr/bin/virtualenvwrapper.sh

.tmux.conf

assume-paste-time 1
base-index 0
bell-action any
bell-on-alert off
default-command ""
default-shell "/bin/zsh"
destroy-unattached off
detach-on-destroy on
display-panes-active-colour red
display-panes-colour blue
display-panes-time 1000
display-time 750
history-limit 2000
key-table "root"
lock-after-time 0
lock-command "lock -np"
message-command-style fg=yellow,bg=black
message-style fg=black,bg=yellow
mouse off
prefix C-b
prefix2 None
renumber-windows off
repeat-time 500
set-remain-on-exit off
set-titles off
set-titles-string "#S:#I:#W - "#T" #{session_alerts}"
status on
status-interval 15
status-justify left
status-keys emacs
status-left "[#S] "
status-left-length 10
status-left-style default
status-position bottom
status-right " "#{=21:pane_title}" %H:%M %d-%b-%y"
status-right-length 40
status-right-style default
status-style fg=black,bg=green
update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"
visual-activity off
visual-bell off
visual-silence off
word-separators " -_@"

예를 들어, 터미널에서 실행하면 HOME=/home/user/Documents gnome-terminal -e tmux ./작동하지 않습니다. tmux는 열리지만 Documents폴더에서는 열리지 않습니다.~/

관련 정보