터미널에서 그놈 쉘 확장 설치

터미널에서 그놈 쉘 확장 설치

예를 들어 대시에서 도킹으로 터미널에서 그놈 확장을 설치하는 방법이 있습니까? 지금 내가 하는 방법은 Ubuntu Software 앱 스토어에 가서 설치하는 것입니다.

답변1

그놈 확장을 Dock으로 대시

에서 본 바와 같이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

방금 터미널에서 설치하는 두 가지 방법을 찾았습니다. 개인적으로 저는 단순성 때문에 Python 패키지 도구를 선호하지만 두 번째 방법을 사용하면 설치 프로세스를 더 세밀하게 제어할 수 있습니다.

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 페이지에 대한 추가 정보:https://github.com/essembeh/gnome-extensions-cli또는 gnome-extensions-cli --help.

활성 gnome 셸 세션이 없으면 도구에서 오류가 발생합니다. 수정하려면 를 사용하세요 --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 쉘과 함께 제공되는 유틸리티를 사용하는 것을 제외하면 Python 패키지와 거의 동일합니다 .

JQ는 명령줄 json 프로세서입니다. 사용법에 대한 자세한 내용은 다음과 같습니다.https://stedolan.github.io/jq/

관련 정보