1
このスクリプトは、グラフィカルに起動すると(スクリプトアイコンをダブルクリックして実行を選択すると)正常に機能しません。既存のファイルからファイルを保存したり、内容を読み込んだりしません。助けてください!ありがとうございました。外部端末で実行するとBashスクリプトが動作しない
#!/bin/bash
# This script provides a simple and secure messaging system for users not
# familiar with gpg or using the terminal. The idea is to keep sensitive
# plaintext files off one's computer.
zenity --question --text="Select operation:" --ok-label="Compose" --cancel-label="Read"
if [[ $? == 0 ]]; then
usr=$(zenity --entry --text="Sender Key ID:")
rec=$(zenity --entry --text="Recipient Key ID:")
pwd=$(zenity --password)
outfile=$(zenity --file-selection --save --confirm-overwrite)
zenity --text-info --editable | gpg -aseu $usr -r $rec --passphrase $pwd --cipher-algo AES256 -o $outfile
else
infile=$(zenity --file-selection)
pwd=$(zenity --password)
gpg -d --passphrase $pwd $infile | zenity --text-info --height=600 --width=800
fi
さて、「正しく機能しない」というのは、診断ではないことを今すぐに知っておくべきです... –
申し訳ありませんが、火曜日に気にしません。あなたは実際に何がうまくいかないか教えてください。 – cledoux
申し訳ありません。スクリプトをダブルクリックして実行を選択して実行すると、スクリプトは実行されますが、ファイルは保存されず、既存のファイルから内容がロードされません。 – Sharon