新しいターミナルが自動的に閉じられるのはなぜですか?

新しいターミナルが自動的に閉じられるのはなぜですか?

新しいターミナルを開くたびに、自動的に閉じられます。Arch Linux と Xforce4 ターミナルを実行しています。

$ terminal --execute sudo arpspoof -i $(cat var.log|awk '{print $1}') \
           -t $(cat var.log|awk '{print $4}') $(cat var.log|awk '{print $3}')

または

# terminal --execute arpspoof -i $(cat var.log|awk '{print $1}') \
           -t $(cat var.log|awk '{print $4}') $(cat var.log|awk '{print $3}')

上記のいずれかのコマンドを実行するとエラーが表示されます:

Unable to register terminal service: Did not receive a reply. Possible causes
include: the remote application did not send a reply, the message bus security
policy blocked the reply, the reply timeout expired, or the network connection
was broken.

答え1

端末の「デフォルト」の動作は、実行するように指示されたプログラムが終了すると終了することです。これが最も実用的な動作であるため、このように動作します。出力が消える前に読みたい場合は、次のように最後にコマンドを追加することを検討してください。

urxvt -e sh -c 'cowsay howdy?; sleep 1337'

rxvt-unicode などの一部の端末には、ウィンドウ マネージャーによって閉じられるまで待機するオプションがあります。

-hold|+hold
    Turn on/off hold window after exit support. If enabled, urxvt will 
    not immediately destroy its window when the program executed within 
    it exits.  Instead, it will wait till it is being killed or closed by 
    the user; resource hold.

関連情報