啤酒配鸡架 發表於 2024-11-29 16:23:00

ubuntu默认桌面gnome安装、卸载、重置恢复默认桌面配置

<h3 id="前言全局说明">前言全局说明</h3>
<blockquote>
<p>ubuntu默认桌面gnome安装、卸载、重置恢复默认</p>
</blockquote>
<br>
<h3 id="一说明">一、说明</h3>
<p>环境:</p>
<pre><code class="language-txt">Ubuntu 18.04.6 LTS (Linux qt-vm 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux)
</code></pre>
<br>
<h3 id="二安装-gnome">二、安装 gnome</h3>
<h4 id="21-更新源">2.1 更新源</h4>
<pre><code class="language-bash">sudo apt-get update
sudo apt upgrade
</code></pre>
<blockquote>
<p>建议,提前将源切换到官方源,因为源内容更完整,如果用国内源,由可能安装时提示:无法定位软件包 gnome-desktop</p>
</blockquote>
<h4 id="22-安装">2.2 安装</h4>
<h5 id="221-方式一-直接安装完整的ubuntu-gnome桌面">2.2.1 方式一: 直接安装完整的Ubuntu Gnome桌面</h5>
<pre><code class="language-bash">sudo apt-get install libxkbcommon0=0.8.0-1 libxkbcommon-x11-0 libmutter-2-0 gnome-shell
sudo apt-get install gnome-session-common=3.28.1-0ubuntu2 ubuntu-session
sudo apt-get install libgdm1=3.28.0-0ubuntu1 gdm3
sudo apt-get install packagekit=1.1.9-1ubuntu2.18.04.6 gstreamer1.0-packagekit
sudo apt-get install gvfs-common=1.36.1-0ubuntu1.3.3 gvfs-bin
sudo apt-get install nautilus-data=1:3.26.4-0~ubuntu18.04.5 libnautilus-extension1a=1:3.26.4-0~ubuntu18.04.5 nautilus
sudo apt-get install python3-update-manager=1:18.04.11 update-manager-core=1:18.04.11 update-manager python3-distupgrade=1:18.04.45 ubuntu-release-upgrader-core=1:18.04.45ubuntu-release-upgrader-gtk
sudo apt-get install ubuntu-desktop
</code></pre>
<blockquote>
<p>以上版本可能会变化,安装时根据提示修改,即可<br>
如果遇到版本号怎么填都不对,那直接删除掉哪个依赖模块名</p>
</blockquote>
<h5 id="221-方式二-tasksel命令安装完整的ubuntu-gnome桌面">2.2.1 方式二: tasksel命令安装完整的Ubuntu Gnome桌面</h5>
<pre><code class="language-bash">sudo apt install tasksel
sudo tasksel install ubuntu-desktop
</code></pre>
<h5 id="222-方式三-安装-gnome-最新版本">2.2.2 方式三: 安装 gnome (最新版本)</h5>
<pre><code class="language-bash">sudo apt-get install gnome
</code></pre>
<h5 id="223-gnome桌面窗口管理程序">2.2.3 gnome桌面窗口管理程序</h5>
<pre><code class="language-bash">sudo apt-get install gnome-shell
sudo apt-get install ubuntu-gnome-desktop
</code></pre>
<blockquote>
<p>安装后需要重启, sudo reboot</p>
</blockquote>
<br>
<h3 id="三卸载-gnome">三、卸载 gnome</h3>
<p><font color="#FF0000">注意:卸载 gnome 重启后,就只有命令行了</font><br>
<font color="#FF0000">注意:卸载 gnome 重启后,就只有命令行了</font><br>
<font color="#FF0000">注意:卸载 gnome 重启后,就只有命令行了</font><br></p>
<pre><code class="language-bash">sudo apt-get remove ubuntu-desktop
sudo apt-get remove gnome-tweak-tool
sudo apt-get remove gnome-shell
</code></pre>
<br>
<h3 id="四桌面配置">四、桌面配置</h3>
<h4 id="41-重置恢复默认桌面配置">4.1 重置恢复默认桌面配置</h4>
<pre><code class="language-bash">dconf reset -f /org/gnome/
</code></pre>
<h4 id="42-配置系统">4.2 配置系统</h4>
<pre><code class="language-bash">sudo apt-get install gnome-tweaks
</code></pre>
<h4 id="43-安装系统深色主题因为最小化桌面环境只有浅色主题">4.3 安装系统深色主题,因为最小化桌面环境只有浅色主题:</h4>
<pre><code class="language-bash">sudo apt-get --no-install-recommends install yaru-theme-gtk
</code></pre>
<br>
<h3 id="五其他">五、其他:</h3>
<h4 id="51-查看包来源">5.1 查看包来源</h4>
<pre><code class="language-bash">sudo apt-cache madison gnome
</code></pre>
<h4 id="52-查看可用版本">5.2 查看,可用版本</h4>
<pre><code class="language-bash">sudo apt-cache show gnome
</code></pre>
<blockquote>
<p>下图红框里,是可以安装的文件,上面的 version 1:3.22+9 是 3.22版本</p>
</blockquote>
<p><img src="https://img2024.cnblogs.com/blog/597729/202411/597729-20241129192125970-1781113821.png"></p>
<h4 id="53-查看安装好的-gnome版本">5.3 查看,安装好的 gnome版本</h4>
<pre><code class="language-bash">gnome-shell --version
</code></pre>
<h4 id="54-删除卸载包的依赖">5.4 删除卸载包的依赖</h4>
<p>如果还打算重新安装,建议不要执行此命令,否则要手动补齐依赖包</p>
<pre><code class="language-bash">sudo apt autoremove
</code></pre>
<br>
<hr>
<blockquote>
<p>免责声明:本号所涉及内容仅供安全研究与教学使用,如出现其他风险,后果自负。</p>
</blockquote>
<p><br><br></p>
<hr>
<p>参考、来源:<br>
https://zhuanlan.zhihu.com/p/478409636 (安装、卸载、配置)<br>
https://blog.csdn.net/qq_40857842/article/details/88053452 (简化、完整 gnome桌面)<br>
https://zhuanlan.zhihu.com/p/479572355 (安装系统深色主题)<br>
https://zhuanlan.zhihu.com/p/540712989 (软件来源)<br>
https://cn.linux-console.net/?p=17452<br>
https://blog.csdn.net/allway2/article/details/106322339 (完整安装Gnome桌面)<br>
https://forum.ubuntu.com.cn/viewtopic.php?t=241116 (install ubuntu-desktop)<br>
https://blog.csdn.net/m0_46278037/article/details/120194653 (echo $XDG_CURRENT_DESKTOP<br>
)<br>
https://blog.csdn.net/cunjiu9486/article/details/109077658( gnome-shell --version)<br>
https://zhuanlan.zhihu.com/p/540712989 (查询指定包的详情)<br>
https://www.51shizhi.com/article/a/ubuntu2204-install-gnome (三个版本的 Gnome 桌面环境 Ubuntu Desktop、Ubuntu Desktop、Vanilla GNOME)</p>
<p><br><br></p>


</div>
<div id="MySignature" role="contentinfo">
    <p>&nbsp;</p>
<p>作者:悟透</p>
<p>原文链接:https://www.cnblogs.com/wutou/p/18577012</p>
<p>来源:博客园</p>
<p>著作权归原作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。</p>
<p>&nbsp;</p><br><br>
来源:https://www.cnblogs.com/wutou/p/18577012
頁: [1]
查看完整版本: ubuntu默认桌面gnome安装、卸载、重置恢复默认桌面配置