LoginSignup
1
0

More than 5 years have passed since last update.

CentOS7で、ダブルクリックでスクリプトファイルを実行する方法。

Posted at

デスクトップで、スクリプトファイル vvv を作成します。
そして実行属性をつけます。
(ここでは、chrome を root から起動する例です。)

% cd Desktop
% vi vvv
% chmod 0755 vvv

中身はこんな感じです。

% cat vvv
#!/bin/bash
google-chrome-stable --no-sandbox

このままでは、このファイルのアイコンをダブルクリックしても中身を表示するだけですので、gnome の設定を変えます。
まずは、dconf-editor をインストールします。

% yum install dconf-editor

次に、dconf-editor を起動して、
/org/gnome/nautilus/preferences/executable-text-activation を選択して、値を display -> launch に変更すれば完了です。

Screenshot.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0