Merge pull request #26581 from wxy/20220716-How-to-Install-Deepin-Desktop-in-Arch-Linux-Complete-Guide]

ALL:20220716 how to install deepin desktop in arch linux complete guide]
This commit is contained in:
Xingyu.Wang 2022-07-26 17:31:59 +08:00 committed by GitHub
commit 730be519fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 314 additions and 297 deletions

View File

@ -0,0 +1,314 @@
[#]: subject: "How to Install Deepin Desktop in Arch Linux [Complete Guide]"
[#]: via: "https://www.debugpoint.com/deepin-arch-linux-install-20/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "wxy"
[#]: reviewer: "wxy"
[#]: publisher: "wxy"
[#]: url: "https://linux.cn/article-14867-1.html"
如何在 Arch Linux 中安装深度桌面DDE
======
![](https://img.linux.net.cn/data/attachment/album/202207/26/170414x01pmevoo8o8b6ob.jpg)
> 在本指南中,我们将解释在 Arch Linux 中安装漂亮的深度桌面DDE所需的步骤。
指南的第一部分解释了安装 Arch 基本系统的步骤。第二部分是在 Arch Linux 的基础上安装完整的深度桌面。
### 什么是深度桌面DDE
[深度操作系统][1] 是一个基于 Debian 稳定分支的、功能丰富且漂亮的桌面环境。深度桌面环境DDE是深度操作系统自主开发的桌面环境。它由它自己的 dde-kwin 窗口管理器驱动。深度桌面带有漂亮的停靠区和许多预装的深度原生的应用程序。
这个令人眼花缭乱的桌面环境 [可在 Arch 仓库中找到][2];这篇文章介绍了如何在 Arch Linux 中安装深度桌面。
本指南安装深度桌面环境 20.1。然而,其他版本的步骤也应该是类似的。
### 第一部分:安装 Arch Linux
如果你已经安装了 Arch Linux你可以跳过这一步直接进入安装深度桌面部分。
要快速安装基本的 Arch Linux请按照以下步骤进行。你也可以访问 [本指南][3] 了解以双启动或在虚拟机上安装 Arch Linux 的完整教程。
#### 下载 Arch Linux
从下面的链接下载 Arch Linux 的 .iso 文件。这里有磁力链和 BT 链接。一旦你下载好了,就把 ISO 写入 U 盘。然后从该驱动器启动。
> **[下载 Arch Linux][4]**
如果你打算通过 [GNOME Boxes][5]、[virt-manager][6] 将其安装为虚拟机镜像 —— 那么你不需要将其写入 U 盘。
#### 启动和配置分区
从 Arch Linux ISO 启动后,你必须运行一系列的命令来安装基本系统。
首先,运行下面的命令,找出设备的标识符。
```
fdisk -l
```
![fdisk -l 之前的分区][7]
然后用此设备标识符,运行下面的命令,开始对你的磁盘进行分区。请确保根据你的系统而修改下面的 `/dev/sda` 参数。
```
cfdisk /dev/sda
```
在下一个提示中选择 `label type = dos`
选择可用空间,并从底部选择 “NEW” 选项。在这个例子中,我将创建三个分区,如下所示:
```
/dev/sda1 - 1G - for /boot
/dev/sda2 - 5G - for root
/dev/sda3 - 1G - for swap
```
![cfdisk][8]
在下一个屏幕中,提供启动分区(`/boot`)的大小(在这个例子中,我给出了 1GB。选择它作为主分区。
对 5GB 大小的主根分区(`/`)重复同样的步骤。
![改变交换分区的类型][9]
用同样的步骤创建一个大小为 1G 的交换分区(你可以根据你的需要改变大小)。创建交换分区后,确保在底部选择类型,并将其标记为 “Linux Swap/Solaris” 选项的交换分区。
![cfdisk 的最终分区列表][10]
完成后,用底部的 “Write” 选项将变化写到磁盘上。确保你在写之前做一个备份,因为这是你系统中的一个永久性的改变。
在你继续之前,运行下面的命令来检查。在这个例子中,你可以看到,列出了三个分区。
```
fdisk -l
```
![fdisk 中的最终分区列表][11]
依次运行下面的命令,在上面新创建的分区中格式化并创建一个 ext4 文件系统。确保你根据你的需要改变 `/dev/sda1``/dev/sda2` 参数。
```
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda2
mkswap /dev/sda3
swapon /dev/sda3
```
完成后,挂载系统并创建必要的目录。
```
mount /dev/sda2 /mnt
mkdir /mnt/boot /mnt/var /mnt/home
mount /dev/sda1 /mnt/boot
```
同样,确保你根据你的系统改变 `/dev/sda1`、`/dev/sda2` 和 `/dev/sda3` 参数。
![准备文件系统][12]
#### 安装基本系统
我希望你已经连接到互联网了。如果没有,请尝试使用 USB 网卡或有线网络连接Arch 安装程序会自动配置和检测。如果你没有可用的有线连接,请按照本指南使用 Arch Linux 安装程序配置无线 Wi-Fi 网络。
依次运行下面的命令,将基本系统安装到挂载的分区中。下载的大小约为 400MB。
```
pacman -Syy
pacstrap /mnt base base-devel linux linux-firmware nano dhcpcd net-tools grub
```
![安装基本系统][13]
一旦完成,生成一个文件系统表,没有这个表你就无法启动系统。
```
genfstab -U /mnt >> /mnt/etc/fstab
```
#### 配置基本系统
依次按照下面的命令来配置基本系统。这包括设置你的地区和语言,添加一个登录用户,以及设置互联网。
```
arch-chroot /mnt
nano /etc/locale.gen
```
去掉开头的 `#`,取消对你选择的语言环境的注释。在本指南中,我选择了 `en_US.UTF-8 UTF-8`。按 `CTRL+O`、回车和 `CTRL+X` 退出 nano。
![改变语言环境][14]
使用以下方法生成语言环境数据。
```
locale-gen
```
使用下面的命令设置语言。
```
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
```
设置本地时区。
```
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
```
同样,你可以根据你的需要来选择它们。你可以通过以下命令列出本地时区。
```
ls /usr/share/zoneinfo
ls /usr/share/zoneinfo/America
```
依次使用下面的命令设置硬件时钟、创建主机名并启用互联网的 DHCP。你可以根据你的想法把 `debugpoint-pc` 改为任何主机名。
```
hwclock --systohc --utc
echo debugpoint-pc > /etc/hostname
systemctl enable dhcpcd
```
下一步是设置 `root` 用户的密码、创建一个管理员用户,并将该用户添加到 `sudoers` 文件中。
按照下面的命令依次进行。确保根据你的需要将用户名`debugpoint` 改为其他名称。
```
passwd rootuseradd -m -g users -G wheel -s /bin/bash debugpointpasswd debugpoint
```
![创建用户][15]
打开 `sudoers` 文件,添加以下几行。
```
nano /etc/sudoers
```
添加下面几行。由于你已经创建了 `root` 用户,该条目应该已经有了。
```
root ALL=(ALL) ALL
debugpoint ALL=(ALL) ALL
```
![更新 sudoers 文件][16]
安装 GRUB建立初始的 Ramdisk 环境,并使用下面的命令卸载系统。
```
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
mkinitcpio -p linux
exit
```
![配置 GRUB][17]
然后重新启动你的系统。
```
umount /mnt/boot
umount /mnt
reboot
```
现在你已经成功地安装了 Arch Linux 基本系统。现在是安装完整的深度桌面的时候了。
### 第二部分:在 Arch Linux 中安装深度桌面
重新启动后,从 GRUB 中选择 Arch Linux。在 Arch Linux 的提示符下,开始依次运行以下命令。这些命令安装 Xorg 服务器、Lightdm 显示管理器和深度桌面组件。
对于所有的命令,使用默认的包版本,即在询问时按回车。
安装 Xorg 和显示管理器。大约安装大小为 80 MB。
```
sudo pacman -S --need xorg lightdm
```
安装额外的组件和应用程序(约 550 MB
```
sudo pacman -S --need deepin deepin-extra
```
安装完成后,通过修改 Lightdm 配置文件启用深度欢迎页。按照下面的命令。
```
nano /etc/lightdm/lightdm.conf
```
并添加下面这一行。保存该文件(`CTRL+O`、`CTRL+X`)。
```
greeter-session=lightdm-deepin-greeter
```
![在 Lightdm 登录页中添加深度欢迎欢迎页][18]
现在是时候把显示管理器和网络管理器作为服务启用了。这样,下次登录时,它们就可以由 systemd 自动运行。
```
systemctl enable lightdm
systemctl enable NetworkManager
```
![启用 Lightdm 和网络][19]
使用 `reboot` 命令重新启动系统。
```
reboot
```
如果一切顺利,你应该看到深度桌面的登录提示。使用你刚刚在上面的步骤中创建的凭证登录。你应该会看到最新的深度桌面环境。
![Arch Linux 中的深度 20.1 登录屏幕][20]
![Arch Linux中的深度桌面 20.1][21]
### 总结
我希望这个指南能帮助你在 Arch Linux 中安装深度桌面。虽然它不是我的日常环境,我觉得深度的桌面在本质上有些慢。可能是因为有太多的颜色渲染和动画,而且尽管它是建立在 Qt 上的,但没有为深度桌面进行适当的优化。
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/deepin-arch-linux-install-20/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[wxy](https://github.com/wxy)
校对:[wxy](https://github.com/wxy)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/2020/09/deepin-20-review/
[2]: https://archlinux.org/groups/x86_64/deepin/
[3]: https://www.debugpoint.com/2020/11/install-arch-linux/
[4]: https://www.archlinux.org/download/
[5]: https://www.debugpoint.com/2020/05/install-use-gnome-boxes/
[6]: https://www.debugpoint.com/2020/11/virt-manager/
[7]: https://www.debugpoint.com/wp-content/uploads/2020/12/fdisk-l-before.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2020/12/cfdisk-1024x159.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2020/12/Swap-parition-type-change.jpg
[10]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-cfdisk-1024x178.jpg
[11]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-fdisk.jpg
[12]: https://www.debugpoint.com/wp-content/uploads/2020/12/prepare-file-system.jpg
[13]: https://www.debugpoint.com/wp-content/uploads/2020/12/Install-base-system-1024x205.jpg
[14]: https://www.debugpoint.com/wp-content/uploads/2020/12/change-locale.jpg
[15]: https://www.debugpoint.com/wp-content/uploads/2020/12/create-user.jpg
[16]: https://www.debugpoint.com/wp-content/uploads/2020/12/update-sudoers-file.jpg
[17]: https://www.debugpoint.com/wp-content/uploads/2020/12/configure-grub-1024x639.jpg
[18]: https://www.debugpoint.com/wp-content/uploads/2021/01/add-deepin-greeter-in-lightdm-login.jpg
[19]: https://www.debugpoint.com/wp-content/uploads/2020/12/Enable-lightdm-and-network-Install-Xfce-Desktop-in-Arch-Linux.jpg
[20]: https://www.debugpoint.com/wp-content/uploads/2021/01/Deepin-20.1-Login-screen-in-Arch-Linux-1024x771.jpg
[21]: https://www.debugpoint.com/wp-content/uploads/2021/01/Deepin-Desktop-20.1-in-Arch-Linux-1024x770.jpg

View File

@ -1,297 +0,0 @@
[#]: subject: "How to Install Deepin Desktop in Arch Linux [Complete Guide]"
[#]: via: "https://www.debugpoint.com/deepin-arch-linux-install-20/"
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
[#]: collector: "lkxed"
[#]: translator: "wxy"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
How to Install Deepin Desktop in Arch Linux [Complete Guide]
======
In this guide, we explain the steps required to install the beautiful Deepin Desktop in Arch Linux.
The first part of the guide explains the steps for installing the base Arch system. The second part is installing the complete Deepin desktop on top of Arch Linux.
### What is the Deepin Desktop?
[Deepin][1] is a feature-rich and beautiful desktop environment based on Debian stable branch. Deepin desktop is a homegrown desktop environment by Deepin. It is powered by its own `dde-kwin` Window manager. Deepin desktop comes with nice looking dock and many native Deepin applications pre-loaded.
This eye candy desktop environment is [available in the Arch repository][2]; this is how you can install Deepin Desktop Environment in Arch Linux.
This guide installs Deepin 20.1 Desktop Environment. However, the steps should be similar for other versions as well.
### Install Deepin Desktop in Arch Linux
#### Part 1: Install Arch Linux
If you have already Arch Linux installed, you can skip this step and directly go to the install Deepin Desktop section .
For a quick Arch Linux base installation, follow the below steps. You can also visit [this guide][3] for a complete tutorial on installing Arch Linux as Dual Boot or on a virtual machine.
##### Download Arch Linux
Download Arch Linux .iso from the below link. There are magnet and torrent links available. Once you download it, write the ISO to a USB drive. And then boot from the drive.
[Download Arch Linux][4]
If you are planning to install it as a virtual machine image via [GNOME Boxes][5], [virt-manager][6] then you do not need to write it to a USB drive.
##### Boot and Configure Partitions
After you boot from the Arch Linux iso, you have to run a series of commands to install the base system.
First, run the below command to find out the device identifier.
```
fdisk -l
```
![fdisk -l before][7]
Then with the device identifier, run the below command to start partitioning your disk. Make sure to change `/dev/sda` as per your system.
```
cfdisk /dev/sda
```
Select `label type = dos` the next prompt.
Select the free space and choose the option NEW from the bottom. In this example, I will create three partitions as per below.
```
/dev/sda1 - 1G - for /boot/dev/sda2 - 5G - for root/dev/sda3 - 1G - for swap
```
![cfdisk][8]
In the next screen, provide the partition size for the boot partition (for this example, I gave 1 GB). Select it as the primary partition.
Repeat the same step for the main root partition of size 5GB.
![Swap partition type change][9]
Create a swap partition using the same steps with size 1G (you may change it as per your need). After you create the swap partition, make sure to choose Type at the bottom and mark it as a swap with the option “Linux Swap/Solaris”.
![final partition list in cfdisk][10]
Once done, write the changes to the disk using the Write option at the bottom. Make sure you take a backup before you write, as this is a permanent change in your system.
Run the below command to check before you proceed. You can see in this example, that three partitions are listed.
```
fdisk -l
```
![final partition list in fdisk][11]
Run the following commands in sequence to format and create an ext4 file system in the newly created partition above. Make sure you change the /dev/sda1 and /dev/sda2 as per your need.
```
mkfs.ext4 /dev/sda1mkfs.ext4 /dev/sda2mkswap /dev/sda3swapon /dev/sda3
```
After completion, mount the system and create the necessary directories.
```
mount /dev/sda2 /mntmkdir /mnt/boot /mnt/var /mnt/homemount /dev/sda1 /mnt/boot
```
Again, make sure you change /dev/sda1, /dev/sda2 and /dev/sda3 as per your system.
![prepare file system][12]
##### Install the base system
I hope you are already connected to the internet. If not, try using a USB dongle or wired internet connection which the Arch installer automatically configures and detect. If you do not have a wired connection available, follow this guide to configure a wireless or wifi network using the Arch Linux installer.
Run the below commands in sequence to install the base system in the mounted partition. The download size is approx 400 MB.
```
pacman -Syypacstrap /mnt base base-devel linux linux-firmware nano dhcpcd net-tools grub
```
![Install base system][13]
Once complete, generate a file system table without which you cant boot the system.
```
genfstab -U /mnt >> /mnt/etc/fstab
```
##### Configure the base system
Follow the below commands in sequence to configure the base system. This involves setting up your locale and language, adding a login user, and setting up the internet.
```
arch-chroot /mntnano /etc/locale.gen
```
Uncomment the locale of your choice by removing # at the beginning. For this guide, I have chosen en_US.UTF-8 UTF-8. Press CTRL+O, Enter, and CTRL+X to exit from nano.
![change locale][14]
Generate the locale using:
```
locale-gen
```
Set up the language using the below command.
```
echo LANG=en_US.UTF-8 > /etc/locale.confexport LANG=en_US.UTF-8
```
Set up the local time zone.
```
ln -s /usr/share/zoneinfo/America/New_York /etc/localtime
```
Again, you can choose them as per your need. You can list the local time zones via the below commands.
```
ls /usr/share/zoneinfo
ls /usr/share/zoneinfo/America
```
Set up the hardware clock, create a hostname and enable the DHCP for the internet using the below commands in sequence. You can change `"arindam-pc"` to any hostname as per your desire.
```
hwclock --systohc --utc
echo debugpoint-pc > /etc/hostname
systemctl enable dhcpcd
```
The next step is to set up the root user password, create an admin user, and add the user to the sudoers file.
Follow the below commands in sequence. Make sure to change the user name `debugpoint` to something else as per your need.
```
passwd rootuseradd -m -g users -G wheel -s /bin/bash debugpointpasswd debugpoint
```
![create user][15]
Open the sudoers file and add the below lines.
```
nano /etc/sudoers
```
Add the below lines. As you already created the root user, the entry should be there.
```
root ALL=(ALL) ALLdebugpoint ALL=(ALL) ALL
```
![update sudoers file][16]
Install grub, set up the initial ramdisk environment, and unmount the system using the below commands.
```
grub-install /dev/sdagrub-mkconfig -o /boot/grub/grub.cfgmkinitcpio -p linuxexit
```
![configure grub][17]
Then reboot your system.
```
umount /mnt/bootumount /mntreboot
```
You have now successfully installed the Arch Linux base system. Its time to install the complete Deepin desktop.
#### Part 2: Install Deepin Desktop in Arch Linux
After reboot, choose Arch Linux from grub. In the Arch Linux prompt, start running the following commands in sequence. These commands install the Xorg server, lightdm display manager and Deepin desktop components.
For all the commands, use default as package versions, i.e. press enter when asked.
* Install Xorg and display manager. Approx install size is 80 MB.
```
sudo pacman -S --needed xorg lightdm
```
* Install additional components and applications (approx 550 MB)
```
sudo pacman -S --needed deepin deepin-extra
```
After the installation, enable the Deepin greeter by modifying the lightdm configuration file. Follow the below commands.
```
nano /etc/lightdm/lightdm.conf
```
And add the below line. Save the file (CTRL+O, CTRL+X).
```
greeter-session=lightdm-deepin-greeter
```
![add deepin-greeter in lightdm login - install Deepin desktop in Arch Linux][18]
Now its time to enable the display manager and network manager as service. So that next time you log on, they can run automatically by systemd.
```
systemctl enable lightdm
systemctl enable NetworkManager
```
![Enable lightdm and network][19]
Reboot the system using the reboot command.
```
reboot
```
If all goes well, you should see the Deepin desktop login prompt. Login using the credentials you just created in the above steps. You should be greeted with the latest Deepin desktop environment.
![Deepin 20.1 Login screen in Arch Linux][20]
![Deepin Desktop 20.1 in Arch Linux][21]
### Wrapping Up
I hope this guide helped you to install the Deepin desktop in Arch Linux. Although it is not my daily driver, I feel Deepins desktop is somewhat slow in nature. Probably because of too much colour rendering and animation and not properly optimized by `dde-desktop` despite it being built on Qt.
--------------------------------------------------------------------------------
via: https://www.debugpoint.com/deepin-arch-linux-install-20/
作者:[Arindam][a]
选题:[lkxed][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://www.debugpoint.com/author/admin1/
[b]: https://github.com/lkxed
[1]: https://www.debugpoint.com/2020/09/deepin-20-review/
[2]: https://archlinux.org/groups/x86_64/deepin/
[3]: https://www.debugpoint.com/2020/11/install-arch-linux/
[4]: https://www.archlinux.org/download/
[5]: https://www.debugpoint.com/2020/05/install-use-gnome-boxes/
[6]: https://www.debugpoint.com/2020/11/virt-manager/
[7]: https://www.debugpoint.com/wp-content/uploads/2020/12/fdisk-l-before.jpg
[8]: https://www.debugpoint.com/wp-content/uploads/2020/12/cfdisk-1024x159.jpg
[9]: https://www.debugpoint.com/wp-content/uploads/2020/12/Swap-parition-type-change.jpg
[10]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-cfdisk-1024x178.jpg
[11]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-fdisk.jpg
[12]: https://www.debugpoint.com/wp-content/uploads/2020/12/prepare-file-system.jpg
[13]: https://www.debugpoint.com/wp-content/uploads/2020/12/Install-base-system-1024x205.jpg
[14]: https://www.debugpoint.com/wp-content/uploads/2020/12/change-locale.jpg
[15]: https://www.debugpoint.com/wp-content/uploads/2020/12/create-user.jpg
[16]: https://www.debugpoint.com/wp-content/uploads/2020/12/update-sudoers-file.jpg
[17]: https://www.debugpoint.com/wp-content/uploads/2020/12/configure-grub-1024x639.jpg
[18]: https://www.debugpoint.com/wp-content/uploads/2021/01/add-deepin-greeter-in-lightdm-login.jpg
[19]: https://www.debugpoint.com/wp-content/uploads/2020/12/Enable-lightdm-and-network-Install-Xfce-Desktop-in-Arch-Linux.jpg
[20]: https://www.debugpoint.com/wp-content/uploads/2021/01/Deepin-20.1-Login-screen-in-Arch-Linux-1024x771.jpg
[21]: https://www.debugpoint.com/wp-content/uploads/2021/01/Deepin-Desktop-20.1-in-Arch-Linux-1024x770.jpg