
Ubuntu 14.04에는 현재 오른쪽 상단에 종료, 잠금 버튼, 캘린더 시간 세부 정보, 배터리 세부 정보, 입력 형식(영어)이 기본 표시로 표시됩니다. 만드는 것이 가능합니까?표시기 시스템 모니터기본 지표 중 하나로 사용됩니다.
이제 컴퓨터에 로그인했을 때만 표시기 시스템 모니터가 표시되고 로그아웃하거나 컴퓨터를 잠그면 표시기 시스템 모니터가 자동으로 패널에서 종료됩니다. 나는 잠긴 컴퓨터 표시기 시스템 모니터의 경험을 통해 백그라운드에서 작동하지만 패널에는 표시되지 않는다는 것을 알고 있습니다. 컴퓨터를 잠글 때 보고 싶은 몇 가지 통계(CPU, 메모리 및 일부 사용자 정의 포함)가 있습니다.
할 수 있을까?
PS 메인 소프트웨어 사이트에 이 질문을 올렸는데 작성자가 이 사이트를 추천했습니다.
나는 보았다이 질문그 답변은 유망해 보이지만 표시기 시스템 모니터에 대한 답변을 조정하는 방법을 모르겠습니다.
답변1
인사/로그인 화면
나는 결국 어떻게 nm-applet
작동하는지 살펴 보았습니다. .unity-greeter
이렇게 수정하면 부팅 또는 로그오프 후 인사말 화면에 표시됩니다(단, 잠금 화면에는 표시되지 않음).
소스 다운로드 및 종속성 빌드
sudo apt-get build-dep unity-greeter apt-get source unity-greeter
스폰 기능 추가
indicator-sysmonitor
cd unity-greeter-*/ vim src/unity-greeter.vala +590
거기에서 인사 화면을
Process.spawn_command_line_async ("nm-applet");
생성하는 원본 코드를 찾을 수 있습니다 . 전체 랩nm-applet
으로 복사본을 만들고 수정하여 생성 되도록 합니다.try..catch
indicator-sysmonitor
/* Make nm-applet hide items the user does not have permissions to interact with */ Environment.set_variable ("NM_APPLET_HIDE_POLICY_ITEMS", "1", true); try { Process.spawn_command_line_async ("nm-applet"); } catch (Error e) { warning ("Error starting nm-applet: %s", e.message); } /* I added these for sysmonitor, from here */ try { Process.spawn_command_line_async ("indicator-sysmonitor"); } catch (Error e) { warning ("Error starting indicator-sysmonitor: %s", e.message); } /* to here */ }
짓다
./autogen.sh ./configure --prefix=/usr make -j2
설치하다
sudo cp src/unity-greeter /usr/local/sbin/unity-greeter
재부팅
잠금 화면
어쨌든, 여기에는 모든 애플리케이션 표시기가 표시됩니다(스크린샷의 nm-applet 참고). 이는 보안 및 개인 정보 보호 문제가 될 수 있습니다. 잠금화면 모드에 대해서만 표시기 목록을 미리 정의할 수 있지만 그렇게 하고 테스트할 시간이 없습니다.
소스 다운로드 및 종속성 빌드
sudo apt-get build-dep unity apt-get source unity
잠금화면 모드에서도 애플리케이션 표시기를 로드하도록 unity-panel-service를 수정하세요.
cd unity-7*/ vim services/panel-service.c +893
if (!lockscreen_mode)
아래에서는 잠금 화면 모드에서 표시기 로딩을 방지합니다.static void initial_load_default_or_custom_indicators (PanelService *self, GList *indicators) { GList *l; suppress_signals = TRUE; if (!indicators) { /* comment these lines if (!lockscreen_mode) { load_indicators (self); } */ // add this line load_indicators (self); load_indicators_from_indicator_files (self); sort_indicators (self); } ...
짓다
mkdir build cd build/ cmake ../ make
설치하다
sudo mv /usr/lib/unity/unity-panel-service /usr/lib/unity/unity-panel-service.orig sudo cp services/unity-panel-service /usr/lib/unity/unity-panel-service
시도 해봐:CtrlAltL