xfce / bash: 쉘 스크립트의 GUI 요소

xfce / bash: 쉘 스크립트의 GUI 요소

기본 창 관리자로 xfce를 사용하여 최소 설치를 했습니다. 간단한 GUI 요소로 쉘 스크립트를 작성하는 것이 어떻게든 가능합니까? 아니면 다른 것을 설치해야 합니까?(하기가 꺼려지므로 설치된 패키지 수(크기)를 최소로 유지하고 싶습니다).

답변1

Zenity를 사용해 보세요:

" Zenity allows you to display GTK+ dialogs from shell scripts".

매우 최소한입니다. 종속성은 다음과 같습니다. 이들 중 다수는 이미 xfce 시스템에 존재해야 합니다.

Depends: libc6 (>= 2.4), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.24.0), libgtk-3-0 (>= 3.0.0), libnotify4 (>= 0.7.0), libpango1.0-0 (>= 1.14.0), libwebkitgtk-3.0-0 (>= 1.3.10), libx11-6, zenity-common (= 3.2.0-0ubuntu1)

답변2

또 다른 옵션은yad

 YAD  is a program that will display GTK+ dialogs, and return (either in
       the return code or on standard output) the users input. This allows you
       to present information, and ask for information from the user, from all
       manner of shell scripts.

       YAD is the fork of Zenity program.

YAD(Yet Another Dialog)는 사용자 정의 버튼, 추가 대화 상자, 알림 아이콘의 팝업 메뉴 등과 같은 많은 개선 사항이 포함된 Zenity의 포크입니다. 기본적으로 Zenity에서 하고 싶었던 대부분의 작업은 YAD에서 사용할 수 있습니다. 원하는 만큼 많은 버튼을 가질 수 있고 각 버튼에는 원하는 텍스트가 포함되어 있으며 정말 멋진 아이콘 대화 상자가 있습니다.

YAD에는 --error, --info, --question 또는 --warning과 같은 동일한 대화 상자가 모두 없습니다. 대신 원하는 메시지, 버튼 및 아이콘을 추가할 수 있는 --form 대화 상자가 있습니다. 또한 알림 영역에 아이콘을 표시하기 위한 --notification 대화 상자도 포함되어 있습니다. YAD 사용에 대한 도움말은 [Wiki](https://code.google.com/archive/p/yad/wikis/Examples.wiki)

yad이 유용한 패키지들과 마찬가지로 현재 지원되는 모든 Ubuntu 버전의 저장소에서 사용할 수 있습니다.Universe 저장소를 활성화하세요설치를 시도하기 전에 아직 활성화되지 않은 경우.

출처:

man yad

http://www.webupd8.org/2010/12/yad-zenity-on-steroids-display.html

https://code.google.com/archive/p/yad/wikis/Examples.wiki

https://www.mankier.com/1/yad

관련 정보