When I follow the steps in
シェルスクリプトを実行するか、geditを使用して編集するかを尋ねるダイアログボックスを受け取ったことがあります。 LiveCDを使ってUbuntu Linux 16.04を再インストールし、sudo apt-get install mono-completeを実行しました。 Ubuntu 16.04 Nautilusでシェルスクリプトをダブルクリックすると、シェルスクリプトファイルのみを編集できます。
The contents of this shell script are:
#!/bin/bash
exec /usr/bin/mono-service.exe ./AudioRecorder.exe "$@".
as specified in
[http://www.mono-project.com/archived/guiderunning_mono_applications/]
この問題はなぜ発生し、どのように解決できますか? Nautilusでシェルスクリプトをダブルクリックすると、シェルスクリプトファイルを実行するように求められます。
どんな助けでも大変感謝します。
ベストアンサー1
まず、/usr/bin/mono-service.exe
存在しません。
次に、投稿したリンク。スクリプトは次のようにする必要があります。
#!/bin/sh
/usr/bin/mono /usr/lib/mono/4.5/mono-service.exe ./AudioRecorder.exe "$@"
または
#!/bin/sh
/usr/bin/mono-service ./AudioRecorder.exe "$@"
または
#!/bin/bash
mono ./AudioRecorder.exe "$@"
または
#!/bin/sh
/usr/bin/mono ./AudioRecorder.exe "$@"
ただし、これはexeファイルがホームフォルダにある場合にのみ機能し、理想的にはexeファイルがホームフォルダにある場合は、次のようにexeファイルの実際のパスを含める必要があります。
#!/bin/sh
/usr/bin/mono /usr/lib/mono/4.5/mono-service.exe ~/AudioRecorder.exe "$@"
または
#!/bin/sh
/usr/bin/mono-service ~/AudioRecorder.exe "$@"
または
#!/bin/bash
mono ~/AudioRecorder.exe "$@"
または
#!/bin/sh
/usr/bin/mono ~/AudioRecorder.exe "$@"
またはファイルがダウンロードフォルダにある場合:
#!/bin/sh
/usr/bin/mono /usr/lib/mono/4.5/mono-service.exe ~/Downloads/AudioRecorder.exe "$@"
または
#!/bin/sh
/usr/bin/mono-service ~/Downloads/AudioRecorder.exe "$@"
または
#!/bin/bash
mono ~/Downloads/AudioRecorder.exe "$@"
または
#!/bin/sh
/usr/bin/mono ~/Downloads/AudioRecorder.exe "$@"