fedora26: アプリケーションをダウンロードしてDesktop Lancherから実行可能にする方法

Table of Contents

参考にしたページ

https://blog.scottlowe.org/2017/11/21/installing-postman-fedora-27/

1. ダウンロード

curl でも wgetでもブラウザでもなんでもよいのでとりあえずローカルに持ってくる

2. 解凍する

例)tar.gzファイルを解凍して /opt直下に配置

sudo tar xvzf Postman-linux-x64-5.5.0.tar.gz -C /opt

3. 実行ファイルを移動する

上記の例ではtarコマンドのオプション-C /optをつけて移動しているため省略

4. シンボリックリンクを作成

例)/opt/postman/Postmanという実行ファイルのシンボリックリンクをpostmanという名前で/usr/local/bin直下に作成

sudo ln -s /opt/Postman/Postman /usr/local/bin/postman

terminalから実行するだけならこれだけでOK。

※当たり前ですが、パスが通っている場所に置かないとダメです。パスの確認方法は以下の通りです。

echo $PATH

5. Desktop Lancherに設定

Desktop Lancherの設定ファイルの格納場所は~/.local/share/applications。 ここにアプリごとの設定ファイルを作成する。

例)~/.local/share/applicationspostman.desktopという設定ファイルを作成

cat << EOF > postman.desktop
[Desktop Entry]
Name=Postman
GenericName=API Client
X-GNOME-FullName=Postman API Client
Comment=Make and view REST API calls and responses
Keywords=api;
Exec=/opt/Postman/Postman
Terminal=false
Type=Application
Icon=/opt/Postman/resources/app/assets/icon.png
Categories=Development;Utilities;
EOF

.desktopファイルの書き方については以下参照: https://wiki.gnome.org/Initiatives/GnomeGoals/CorrectDesktopFiles https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html