跳转到主要内容
x

Ubuntu 20.04/21.04和深度桌面的嫁接与使用

Deepin桌面环境可能是目前最适合国内使用的一种系统。如果要使用最新的Ubuntu或Debian系统,又想使用Deepin桌面环境。最佳的方式将Ubuntu与Deepin桌面环境相嫁接。

UbuntuDDE实际上提供了这样一种可能。不过,由于它提供的是一种不可卸载的桌面环境安装模式,因此会对Ubuntu其他桌面环境的安装和配置产生影响。因此,下面将对可卸载时DDE桌面环境进行描述。

1. Xubuntu 系统的安装

Xubuntu 桌面环境以轻量著称,以Xfce4为基础,是Linux下三大桌面环境之一。

2. Xubuntu桌面环境中启用DDE桌面及安装Deepin相关软件

A. 更换软件源,加快软件包下载速度

建议将/etc/apt/sources.list中的地址修改为下面的镜像地址,以加快软件包下载速度:

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

B. 刷新软件仓库地址列表

sudo apt-get update

C. 卸载不需要的软件包和残余包。例如,libreOffice常常被阈值安装,可以将其卸载掉

sudo apt-get purge libreoffice* && sudo apt-get autoremove

执行此步很重要,避免系统中不需要的软件包产生冲突。

3. DDE桌面环境安装

A.  添加DDE软件源

# 适合Ubuntu/Xubuntu 18.04
deb http://ppa.launchpad.net/ubuntudde-dev/stable/ubuntu bionic main
deb-src http://ppa.launchpad.net/ubuntudde-dev/stable/ubuntu bionic main

# 适合Ubuntu/Xubuntu 20.04/21.04
deb http://ppa.launchpad.net/ubuntudde-dev/stable/ubuntu hirsute main
deb-src http://ppa.launchpad.net/ubuntudde-dev/stable/ubuntu hirsute main

亦可使用下面的命令来进行:

sudo add-apt-repository ppa:ubuntudde-dev/stable

B. 执行秘钥添加

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1C30362C0A53D5BB

C. 安装WPS和搜狗输入法的安装

前面将libreoffice卸载后,一方面避免了它依赖的软件包再后续产生影响。如要使用字处理软件,强烈建议安装WPS Linux版本,具体可从这里下载:https://www.wps.cn/product/wpslinux

此外,输入法可以安装使用搜狗输入法,下载地址:https://pinyin.sogou.com/linux。需要注意,Sogou输入法其依赖包与系统自带的fcitx-ui-qimpanel有冲突,使用下面的命令卸载后在执行搜狗输入法安装:

sudo apt-get purge fcitx-ui-qimpanel

D. 安装DDE桌面环境

sudo apt-get update && sudo apt-get install ubuntudde-dde

注意

1) ubuntudde-dde是可卸载桌面环境,ubuntudde-desktop为不可卸载桌面环境。建议不要安装ubuntudde-desktop,以免后续出现不可解决的软件包依赖问题。

ubuntudde-dde安装过程中,系统可能会提示其依赖的ubuntudde-default-settings会与Xubuntu桌面环境的xubuntu-default-settings发生冲突,具体表现为”/etc/skel/.config/Trolltech.conf”文件已存在。此时可将该文件移除或者改名,如下面的改名操作:

sudo mv /etc/skel/.config/Trolltech.conf /etc/skel/.config/Trolltech.conf.bak

sudo mv /usr/lib/x86_64-linux-gnu/libjpeg.so.8 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.bak

sudo mv /usr/lib/x86_64-linux-gnu/libjpeg.so.8 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.bak

sudo mv /usr/share/doc/libasyncns0/changelog.Debian.gz /usr/share/doc/libasyncns0/changelog.Debian.gz.bak

然后再一次执行sudo apt-get install ubuntudde-dde。当然,如果出现其他类似的冲突,也可同样采取这种处理方式。例如,可能会提示libjpeg-turbo8:amd64与libjpeg8:i386冲突,/usr/share/doc/libasyncns0/changelog.Debian.gz已存在的情况。

2) 安装ubuntudde-dde相关软件包时,可能会出现下载时间漫长的现象。其原因在于,从http://ppa.launchpad.net/ubuntudde-dev/stable/ubuntu获取下载相关包的速度较慢。实际上,dde-api_5.0.0-1_amd64.deb、dde-dock_5.0.0-2_amd64.deb、dde-control-center_5.0.0-3_amd64.deb、deepin-wallpapers_1.7.7-6_amd64.deb、dde-daemon_5.0.0-5_amd64.deb、kwin-data_5.18.5-1ubuntu2_all.deb、dde-desktop_5.0.0-2_amd64.deb、libdde-file-manager_5.0.0-2_amd64.deb等包的下载过程,成为限制的主要原因。对于DDE 15.11桌面环境版本,我们可以从这里下载。对于DDE20.0桌面环境版本,则可以从这里下载。下载完这些软件包后,可以先使用sudo dpkg -i *.deb进行安装,随后再采用sudo apt-ge -f install && sudo apt-get install ubuntudde-dde进行依赖包修复。

F. 启用DDE桌面环境

注销Xfce桌面或重启系统,在Xubuntu登录右上方选择Deepin会话,然后登录即可。需要注意的是,要想DDE桌面环境整体上字体显示较好,建议在设置面板中使用标准字体: Noto Sans CJK SC等宽字体: Noto Mono. 其他字体,可以从这里下载并安装(安装命令:sudo fc-cache -fv)

G. 来自Deepin的其他软件安装

1)首先添加如下仓库

#Deepin 15官方仓库,xubuntu 20.04/21.04/21.10可以使用

deb [by-hash=force] http://packages.deepin.com/deepin lion main contrib non-free
deb-src http://packages.deepin.com/deepin lion main contrib non-free

#Deepin wine应用, xubuntu/Ubuntu 18.04以上可以使用

deb http://cdn-package-store6.deepin.com/appstore eagle appstore

#Deepin打印机驱动,Xubuntu/Ubuntu 18.04以上可以使用
deb https://community-packages.deepin.com/printer eagle non-free

特别注意:

1) 如下的Deepin 20官方仓库,最好目前暂时不要用于Xubuntu/Ubuntu 18.04及其以上系统,存在较多的系统层级软件冲突。

#Deepin 20官网软件仓库
deb [by-hash=force] https://community-packages.deepin.com/deepin/ apricot main contrib non-free
deb-src https://community-packages.deepin.com/deepin/ apricot main contrib non-free

2) 添加上述地址后,执行如下命令,可通过新里得软件包管理器对来自Deepin的相关软件进行安装:

sudo apt-get update && sudo apt-get install synaptic

deepin-wine

当然,也可直接从http://packages.deepin.com/deepin/pool/non-free/d/下载相关Wine包进行安装使用,如deepin.com.qq.office_2.0.0deepin4_i386.debdeepin.com.wechat_2.6.8.65deepin0_i386.deb

deepin-wine-online

当然,采用命令安装也是可以的:

sudo apt-get install deepin-screen-recorder deepin-screensaver deepin-terminal deepin-screenshot deepin-voice-recorder deepin-picker

说明:deepin-screenshot(桌面截图程序,快捷键为Ctrl+Alt+A)、deepin-voice-recorder(录音软件)、deepin-screen-recorder(屏幕录制软件)、deepin-picker(颜色拾取器)、deepin-screensaver(屏保程序)、deepin-terminal(终端程序)等。

H. 故障排除

上述过程,Xubuntu系统下最稳定的Linux内核还是5.4.0系列,建议不要升级其他内核版本。如果要升级,建议不要删除这个老版本内核。同时,还需要注意的是,DDE桌面安装过程中,会自动更新系统内核,以便能加载特性至Linux内核中,从而在系统重启之后自动进行加载。特别地,内核更新时,会在Grub启动加载配置文件中,出现如下的代码行:

menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6c823ab7-333d-440c-ba11-62af26ecb33f' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  6c823ab7-333d-440c-ba11-62af26ecb33f
    else
      search --no-floppy --fs-uuid --set=root 6c823ab7-333d-440c-ba11-62af26ecb33f
    fi
    #linux    /boot/vmlinuz-5.4.0-58-generic root=UUID=6c823ab7-333d-440c-ba11-62af26ecb33f ro  quiet splash DEEPIN_GFXMODE=$DEEPIN_GFXMODE $vt_handoff
    initrd    /boot/initrd.img-5.4.0-58-generic
}

内核启动时,加载DEEPIN_GFXMODE=$DEEPIN_GFXMODE $vt_handoff会导致系统进入一个长时间等待过程而无解(a start job if running with time no limited....)。为此,可将该代码行修改如下:

menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6c823ab7-333d-440c-ba11-62af26ecb33f' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  6c823ab7-333d-440c-ba11-62af26ecb33f
    else
      search --no-floppy --fs-uuid --set=root 6c823ab7-333d-440c-ba11-62af26ecb33f
    fi
    linux    /boot/vmlinuz-5.4.0-58-generic root=UUID=6c823ab7-333d-440c-ba11-62af26ecb33f ro
    #linux    /boot/vmlinuz-5.4.0-58-generic root=UUID=6c823ab7-333d-440c-ba11-62af26ecb33f ro  quiet splash DEEPIN_GFXMODE=$DEEPIN_GFXMODE $vt_handoff
    initrd    /boot/initrd.img-5.4.0-58-generic
}