
ターミナルから Dash to Dock などの GNOME 拡張機能をインストールする方法はありますか? 現在私が行っている方法は、Ubuntu ソフトウェア アプリ ストアにアクセスしてインストールすることです。
答え1
Dash to Dock GNOME 拡張機能
ご覧の通りhttps://extensions.gnome.org/extension/307/dash-to-dock/
.zipファイルをここからダウンロードしてくださいhttps://micheleg.github.io/dash-to-dock/releases.html
注意: ダウンロードした .zip ファイルの名前は、[email protected]
以下に示す unzip コマンドで表示されるものと異なる場合があります。正しい .zip 名になるように、必要に応じてコマンドを調整してください。
マニュアルのインストールノートはこちらをご覧くださいhttps://micheleg.github.io/dash-to-dock/download.html
手動インストール
リリースページからzipアーカイブの形式で拡張機能を入手することもできます。シェルバージョンをサポートする最新バージョンを探してください。拡張機能はgnome-tweak-tool
、または内部でインストールできます。directly extracting the archive in the a directory named [email protected]
~/.local/share/gnome-shell/extensions/
unzip [email protected] \ -d ~/.local/share/gnome-shell/extensions/[email protected]/
シェルの再ロードが必要ですAlt+F2 r Enter
。拡張機能はgnome-tweak-tool
、 または dconf でキー[email protected]
に を追加して有効にすることができます/org/gnome/shell/enabled-extensions
。
注意: DtD は 19.04 と互換性がありません。
噂によると、をアンインストールすると
Ubuntu Dock
、DtDは19.04で動作するとのことです。また、DtDを手動でインストールすると、19.04でも動作するようです。
答え2
次のコマンドを実行して Dash-to-Dock をインストールできます。
sudo apt install gnome-shell-extension-dashtodock
apt search gnome-shell-extension
たとえば、次のコマンドを実行すると、利用可能な拡張機能のリストを取得できます。
答え3
ターミナルからインストールする方法が 2 つ見つかりました。個人的には、シンプルさから Python パッケージ ツールの方が好きですが、2 番目の方法の方がインストール プロセスをより細かく制御できるかもしれません。
A) Pythonパッケージを使用する
# 1. Install the package
pip3 install gnome-extensions-cli
# 2. Install extension by UUID
gnome-extensions-cli install [email protected]
# 2.a ... or by PK (primary key)
gnome-extensions-cli install 307
詳細はgithubページをご覧ください:gnome-extensions は、以下の URL からダウンロードできます。または を使用しますgnome-extensions-cli --help
。
アクティブな gnome shell セッションがない場合、ツールはエラーを出力します。修正するには、 を使用します--backend file
。
B) カスタムシェルスクリプトを使用する
#!/usr/bin/env bash
[email protected]
pk=307
# 1. GNOME shell version
shell_version=$(gnome-shell --version | cut -d' ' -f3)
# 2. Fetch extension info (for the given shell version)
info_json=$(curl -sS "https://extensions.gnome.org/extension-info/?uuid=$uuid&shell_version=$shell_version")
# 2.a instead of ?uuid=$uuid you can use ?pk=$pk
# 3. Extract download url from the json with jq
download_url=$(echo $info_json | jq ".download_url" --raw-output)
# 4. Install the extension
gnome-extensions install "https://extensions.gnome.org$download_url"
# 4.a ... or download it first, then install
curl -sL "https://extensions.gnome.org$download_url" -o $uuid.zip
gnome-extensions install $uuid.zip
# 4.a.i ... or manually extract the zip
mkdir -p ~/.local/share/gnome-shell/extensions/$uuid
unzip $uuid.zip -d ~/.local/share/gnome-shell/extensions/$uuid
gnome-extensions
これは、GNOME Shell に付属するユーティリティを使用することを除けば、Python パッケージとほぼ同じです。
JQ はコマンドライン JSON プロセッサです - 使用方法の詳細:https://stedolan.github.io/jq/