실행기없는 Unity 컴파일 수있는 솔루션을 찾고

나는 런처 (왼쪽 줄)이 표시되지 유니티 수정하고자하는 모든의를 . 런처를 볼 수있는 솔루션을 찾고 있지 않습니다. 나는 그것이 완전히 사라지기를 정말로 원합니다. 그것은 나의 약혼자를위한 선물이며, 나는 그 유명한 과일 회사에서 온 것처럼 보이게하는 멋진 아이콘이있는 도키 도크를 실행하는 그녀의 리눅스 노트북에 대해 가능한 가장 높은 여성 수락 요소를 달성하고 싶습니다.

어떤 패키지와 어떤 소스 파일 을 연구해야하는지 에 대한 힌트가 있습니까?

“unity.launcher.show ()”로 주석을 달고 다시 컴파일하는 것처럼 쉬워지기를 바랍니다. 🙂

감사합니다!



답변

내 자신의 질문에 대한 답변은 다음과 같습니다.

  • 유니티 버전 <7.4.0의 경우 Launcher.cpp, unityshell.cpp, DashController.cpp 및 HudController.cpp
  • 유니티 버전 7.4.0 용 Launcher.cpp 및 UnitySettings.ccp

단일 소스 패키지에서.

그러나 나는 내 질문에 대한 답을 찾는 모든 사람들이 그 소스 파일로 무엇을 해야할지 알고 싶어하기 때문에 그 이상을 대답하고 있습니다.

내용 :
A. 직접 컴파일 하거나
B. 바이너리 가져 오기

면책 조항 : 나는 전혀 단서가 없으며 이것은 유니티 5.20.2로 12.04, 유니티 7.2.6으로 14.04, 유니티 7.3.2로 15.10, 유니티 7.4.0으로 16.04에서만 테스트되었습니다.

A. 실행기를 표시하지 않도록 Unity를 컴파일하십시오.

0. 조바심

이 스크립트는 12.04, 14.04 및 15.10 이상에서 작동해야합니다. 필요에 따라 끝에 주석을 해제하십시오.

#!/bin/bash
mkdir temp-build-dir; cd temp-build-dir
export HWE=$(dpkg-query -l xserver*-lts-* | grep ^ii  | cut -d" " -f3 | rev | cut -d- -f1 | rev | sort -u)
sudo apt-get install unity xserver-xorg-video-dummy-lts-$HWE
sudo apt-get build-dep unity
sudo apt-get install apt-show-versions devscripts dpkg-dev fakeroot nano
apt-get source unity
cd unity-*
# you can leave the comment field in the changelog empty but dont forget to save the file
EDITOR=nano debchange --newversion $(apt-show-versions unity | cut -d " " -f2)
find . -iname Launcher.cpp -exec sed -i -e '1,/void Launcher::DrawContent(nux::GraphicsEngine/b' -e '0,/{/s//{\nreturn;/' {} \;
# for unity 7.4.0 comment out this for statement and read the explanation Nr. A.4
for i in unityshell.cpp DashController.cpp HudController.cpp; do
    find . -iname $i -exec sed -i -e  's/launcher_width =/launcher_width =0; \/\//' {} \;
done
dpkg-buildpackage -rfakeroot -d -us -uc -b
sudo dpkg -i ../unity_*.deb
# For 12.04 use:
# gconftool --type Integer --set /apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode 1
# For 14.04 use:
# dconf write "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode" 1

그런 다음 통일을 다시 시작하면 완료됩니다.

1. 올바른 소스 파일을 찾으십시오

시행 착오 후에 변경 될 소스 파일이

  • Launcher.cpp-> 한 줄을 추가하여 더 이상 실행기를 표시하지 않습니다.
  • unityshell.cpp, DashController.cpp 및 HudController.cpp-> 런처의 너비를 0으로 설정

네 개의 파일 모두 소스 패키지 “unity”에 포함되어 있습니다.

2. 소스를 얻을

유니티 용 빌드 -deps를 설치하기 전에 일부 종속성 문제를 해결하기 위해 xserver-xorg-video-dummy-lts- {your HWE version} 패키지를 수동으로 설치해야했습니다.

sudo apt-get install xserver-xorg-video-dummy-lts-{put your HWE name here}

이 명령으로 HWE의 ​​이름 (버전)을 찾을 수 있습니다.

dpkg-query -l xserver*-lts-* | grep ^ii  | cut -d" " -f3 | rev | cut -d- -f1 | rev | sort -u

그 후 나머지는 효과가있었습니다.

sudo apt-get build-dep unity
apt-get source unity
cd unity-*

3. Launcher.cpp에 한 줄을 입력하십시오.

find . -iname launcher.cpp -exec gedit {} \;

“void Launcher :: DrawContent (nux :: GraphicsEngine & GfxContext, bool force_draw)”함수를 찾아 “return;” 몸에서 시작하면 다음과 같습니다.

void Launcher::DrawContent(nux::GraphicsEngine& GfxContext, bool force_draw)
{
  return; //dont show launcher anymore
  ...

런처를 더 이상 표시하지 않을 수 있습니다. 그러나 대시와 hud는 화면 왼쪽의 런처를 사용하지 않은 채로 남겨 둡니다.

4. unityshell.cpp, DashController.cpp 및 HudController.cpp / UnitySettings.cpp에서 런처 너비를 0으로 설정합니다.

통일 <7.4.0의 경우 :

unityshell.cpp, DashController.cpp 및 HudController.cpp에서 “launcher_width =”의 모든 발생을 “launcher_width = 0; //”로 바꾸려면 편집기를 사용하십시오.
아니면 그냥이 명령을 사용

for i in unityshell.cpp DashController.cpp HudController.cpp; do find . -iname $i -exec sed -i -e  's/launcher_width =/launcher_width =0; \/\//' {} \; ; done

통일 7.4.0의 경우 :

UnitySettings.cpp 파일을 찾아 LauncherSize 끝에서 다음과 같이 반환 값을 바꾸십시오.

int Settings::LauncherSize(int monitor) const
{
  if (monitor < 0 || monitor >= (int)monitors::MAX)
  {
    LOG_ERROR(logger) << "Invalid monitor index: " << monitor << ". Returning 0.";
    return 0;
  }

  return 0; // pimpl->launcher_sizes_[monitor];
}

런처에서 사용 된 여백없이 대시를 화면 왼쪽에 표시하려는 경우에만 필요합니다.

5. 변경 로그에서 올바른 버전을 설정하십시오

내 경우 (12.04, unity 5.20.2) 나는 통일의 소스 버전을 5.20에서 5.20.2로 변경해야했다.

EDITOR=nano debchange --newversion $(apt-show-versions unity | cut -d " " -f2)

설치시 종속성이 손상되지 않도록 컴파일하기 전에. 파일을 저장하는 것을 잊지 마십시오.

6. 컴파일 및 설치

그런 다음 이것을 사용하여 다시 컴파일했습니다.

dpkg-buildpackage -rfakeroot -d -us -uc -b

새 패키지를 설치했습니다 :

sudo dpkg -i ../unity_*.deb

(내가보고 테스트 할 수있는 한 실제로 필요한 유일한 파일은

find . -name libunityshell.so | grep unity/usr/lib/compiz/libunityshell.so

/usr/lib/compiz/libunityshell.so를 새 것으로 교체하는 것만으로도 충분하지만, 위에서 설명한대로 새 unity 패키지를 설치하십시오.)

7. 실행기를 자동 숨기기로 설정

# For 12.04:
gconftool --type Integer --set /apps/compiz-1/plugins/unityshell/screen0/options/launcher_hide_mode 1
# For 14.04:
dconf write "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode" 1

그게 다야. 통일을 다시 시작하고 발사기가 사라졌습니다!

B. 바이너리를 믿고 신뢰하는 것을 선호하는 경우

바이너리와 유니티 버전 및 PC 아키텍처의 조합을 선호하는 경우

unity --version
getconf LONG_BIT

아래에서 찾을 수 있습니다. 올바른 패키지를 다운로드하십시오.

32 비트

64 비트

다운로드 후 deb 파일을 확인하십시오.

md5sum unity_*.deb

결과는 다음 중 하나 여야합니다

0a5f7fc9255262e5803656d83f84f7c5  unity_5.20.0-0ubuntu3_amd64_nolauncher.deb
717dc41f4cad6410c997e1014f5f3f1d  unity_5.20.0-0ubuntu3_i386_nolauncher.deb
594eb8b87f8a56697865c051c4db5073  unity_5.20.2_i386_nolauncher.deb
8ed070afa4d7d6da8222d03b8ad5ebf3  unity_7.2.6+14.04.20160408-0ubuntu1_amd64_nolauncher.deb
abd32e40e8a10bd603b9fc44014cb179  unity_7.2.6+14.04.20151021-0ubuntu1_i386_nolauncher.deb
43c56b889028bf368da01780c0a099b9  unity_7.3.2+15.10.20151016-0ubuntu1_amd64_nolauncher.deb
64474d1a8280ed4113d748a57422ddcc  unity_7.3.2+15.10.20151016-0ubuntu1_i386_nolauncher.deb
4fecdb9b4f590e00609baa3b98f55cc0  unity_7.4.0+16.04.20160715-0ubuntu1_amd64_nolauncher.deb

그런 다음 패키지를 설치하십시오

sudo dpkg -i unity_*.deb

런처가 자동 숨기기 및 통합을 다시 시작하도록 설정하십시오. 그게 다야!

무언가 잘못되고 화합이 시작되지 않는 경우 :

sudo apt-get install --reinstall unity

그러나 모든 것이 작동하면 새 패키지가 업데이트되지 않도록 할 수 있습니다.

echo "unity hold" | sudo dpkg --set-selections

“unity_5.20.2_i386_nolauncher.deb”파일 만 내 PC에서 컴파일되었습니다. 다른 deb 파일은이 스크립트 변형을 사용하여 소위 “클라우드 컴퓨터”(기계실이 구름처럼 보이기 때문에 …)에서 만들어졌습니다.

#!/bin/bash
sudo apt-get update
sudo apt-get -y dist-upgrade
sudo apt-get -y build-dep unity
sudo apt-get -y install unity devscripts dpkg-dev fakeroot nano
mkdir temp-build-dir; cd temp-build-dir
rm -r unity-*
apt-get source unity
cd unity-*
find . -iname Launcher.cpp -exec sed -i -e '1,/void Launcher::DrawContent(nux::GraphicsEngine/b' -e '0,/{/s//{\nreturn;/' {} \;
# for unity 7.4.0 comment out this for statement and read the explanation Nr. A.4
for i in unityshell.cpp DashController.cpp HudController.cpp; do
    find . -iname $i -exec sed -i -e  's/launcher_width =/launcher_width =0; \/\//' {} \;
done
dpkg-buildpackage -rfakeroot -d -us -uc -j2 -b
cp ../unity_*.deb ../$(echo ../unity_*.deb | sed -e  's/.deb$/_nolauncher.deb/')