实践Deepin

版本

deepin 备注
     
20 debian 10 (buster)  
15.11 debian 9 (stretch)  

环境变量

用户环境配置文件:~/.bashrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
alias la="ls -a"
alias ll="ls -l"
alias lla="ls -la"

#unset _JAVA_OPTIONS

#export JAVA_HOME=~/platform/jdk
#export PATH="$JAVA_HOME/bin:$PATH"

#alias mvn='mvn --global-settings "/media/ray/resource/Resource/Java/maven/settings-aliyun-private.xml"'

export GOROOT=~/platform/go
export PATH="$GOROOT/bin:$PATH"

export GOPATH=~/goProjects
export PATH="$GOPATH/bin:$PATH"

export GRADLE_USER_HOME=/media/ray/resource/GradleUserHome
export MAVEN_USER_HOME=/media/ray/resource/MavenUserHome

# zookeeper
export PATH="/home/ray/platform/zookeeper/zookeeper/bin:$PATH"

#export SCALA_HOME=~/software/scala
#export PATH="$SCALA_HOME/bin:$PATH"

#export SBT_HOME=~/software/sbt
#export PATH="$SBT_HOME/bin:$PATH"
export SBT_OPTS="-Dsbt.global.base=/media/ray/resource/sbt_global_base -Dsbt.ivy.home=/media/ray/resource/sbt_ivy_home"

#export ACTIVATOR_HOME=/media/ray/Resource/Scala/Akka/software/typesafe-activator-1.3.12
#export PATH="$ACTIVATOR_HOME/bin:$PATH"

#export HADOOP_HOME=~/software/hadoop
#export PATH="$HADOOP_HOME/sbin:$PATH"
#export JAVA_LIBRARY_PATH=$HADOOP_HOME/lib/native

#export HBASE_HOME=~/software/hbase
#export PATH="$HBASE_HOME/bin:$PATH"

#export HIVE_HOME=~/software/hive
#export PATH="$HIVE_HOME/bin:$PATH

应用

快捷方式

应用快捷方式清单目录:/usr/share/applications,个人快捷方式清单目录:~/.local/share/applications

例如:intellij-idea-ce.desktop

1
2
3
4
5
6
7
8
9
10
11
12
[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Community Edition
Icon=/media/ray/Resource/Platform/IDEA_CE_2018.3_linux/bin/idea.svg
Exec="/media/ray/Resource/Platform/IDEA_CE_2018.3_linux/bin/idea.sh" %f
Comment=Capable and Ergonomic IDE for JVM
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea-ce
X-Deepin-CreatedBy=com.deepin.dde.daemon.Launcher
X-Deepin-AppID=jetbrains-idea-ce

intellij-idea-ue.desktop

1
2
3
4
5
6
7
8
9
10
11
12
[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Ultimate Edition
Icon=/media/ray/Resource/Platform/IDEA_UE_2018.3_linux/bin/idea.svg
Exec="/media/ray/Resource/Platform/IDEA_UE_2018.3_linux/bin/idea.sh" %f
Comment=Capable and Ergonomic IDE for JVM
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea
X-Deepin-CreatedBy=com.deepin.dde.daemon.Launcher
X-Deepin-AppID=jetbrains-idea

idea-ue.desktop

1
2
3
4
5
6
7
8
9
10
[Desktop Entry]
Type=Application
Name=IntelliJ IDEA Ultimate
Comment=Intelligent Java IDE 
Exec=/opt/idea/bin/idea.sh %f
Icon=/opt/idea/bin/idea.png
Categories=Development;IDE;
Terminal=false
StartupNotify=true
StartupWMClass=jetbrains-idea

idea-ue.desktop

1
2
3
4
5
6
7
8
9
10
[Desktop Entry]
Type=Application
Name=IntelliJ IDEA Community
Comment=Intelligent Java IDE 
Exec=/home/ray/platform/IDEA_CE_2018.3_linux/bin/idea.sh %f
Icon=/home/ray/platform/IDEA_CE_2018.3_linux/bin/idea.png
Categories=Development;IDE;
Terminal=false
StartupNotify=true
StartupWMClass=jetbrains-idea-ce

android-studio.desktop

1
2
3
4
5
6
7
8
9
10
11
[Desktop Entry]
Name=Android studio
Name[zh_CN]=Android studio
#显示图标
Icon=/opt/android-studio/bin/studio.png
#程序路径
Exec=studio.sh
StartupNotify=false
Terminal=false
Type=Application
Categories=Application

Dock

自定义Dock,/usr/lib/dde-dock/plugins,修改后注销才生效。

QQ

系统默认自带的是CrossOver版本的QQ,后来官方新出了deepin-wine版本的QQ

提取QQ消息的快捷键,需要操作系统和QQ都设置为Ctrl+Alt+Z才行,不知道为啥设置为Alt+A却不行。

git

1
sudo apt install git

typora

1
2
3
4
5
6
7
# 创建 typora 软件源文件
sudo vim /etc/apt/sources.list.d/typora.list
# 文件内键入以下内容,保存退出即可
deb https://typora.io/linux ./

sudo apt update
sudo apt install typora

修改字体:

编辑主题文件,比如~/.config/Typora/themes/github.css

body和header下的font-family最后追加字体Noto Sans CJK SC,例如:

1
2
3
4
5
body {
    font-family: "Open Sans","Clear Sans","Helvetica Neue",Helvetica,Arial,sans-serif,"Noto Sans CJK SC";
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

1
2
3
header, .context-menu, .megamenu-content, footer{
    font-family: "Segoe UI", "Arial", sans-serif, "Noto Sans CJK SC";
}

ssh

/etc/hosts.allow中添加sshd:ALL

mysql

1
2
3
4
5
6
# 安装mysql apt repository
$ sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
# 刷新repository
$ sudo apt update
# 安装mysql
$ sudo apt install mysql-community-server
1
2
3
4
# 重新选择主版本
$ sudo dpkg-reconfigure mysql-apt-config
# 刷新repository
$ sudo apt update

systemctl

1
$ sudo systemctl [start|stop|status|enable|disable] 服务名

memcached

/lib/systemd/system/memcached.service

#disable禁止随机启动,/etc/systemd/system/multi-user.target.wants/中对应的link也就没了

#随机启动脚本

/etc/init.d/memcached

#执行程序

/usr/bin/memcached

快捷键

  • 双指在触摸板上滑动(垂直或水平),相当于滚动鼠标中键滑轮

    1
    2
    $ gsettings set com.deepin.dde.touchpad vert-scroll-enabled true
    $ gsettings set com.deepin.dde.touchpad horiz-scroll-enabled true
    
  • 双指在触摸板上点击,相当于右键

  • 终端中,复制的快捷键是ctrl+shift+c,粘贴的快捷键是ctrl+shift+v

  • 鼠标放到任务栏的程序图标上滚动鼠标中键滑轮或者双指在触摸板上点击,会预览当前程序图标的窗口

  • 双指在触摸板上滑动,相当于滚动鼠标中键滑轮

  • 选择文件然后点击空格键可以预览文件内容

<Super>代表windows键

字体

默认字体:

  • 标准:Noto Sans
  • 等宽:Noto Mono

大小:12px

安装Source Code Pro字体(OTF)到~/.locate/share/fonts下新建的source-code-pro目录。【不要随便安装中文字体,比如宋体等,会引起其他qq、网页等字体问题】

类似wps等软件中的宋体(deepin默认没有安装windows的宋体等字体)默认被文泉驿微米黑替代

阿里的Java代码规范扫描插件需要微软雅黑字体,不然显示方框。

双系统

时间

Windows下注册表中新增如下键: Reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_DWORD /d 1

关闭快速启动启动(fast startup)

否则在Linux下只能只读方法访问NTFS分区

软件源

1
2
/etc/apt/sources.list.d/*.list
/etc/apt/sources.list

dpkg:deepin下一般安装在/opt下面

mysql 5.7.15-1

root/mysql

显卡

大黄蜂

默认禁用独显,可以使用optirun或者primusrun命令来强制使用独显运行程序。

打印机

KONICA MINOLTA Bizhub C224E

官方下载Linux驱动(PPD),然后添加打印机,选择LPD/LPR主机或打印机,输入ip地址,然后选择PPD(KOC554UX.ppd),接着型号选择C224E即可。

Q&A

无法解析或打开软件包的列表或是状态文件

1
2
3
4
E: Problem parsing dependency 21
E: 处理 libc6-dev-mips64el-cross (NewVersion2) 时出错
E: Problem with MergeList /var/lib/apt/lists/packages.deepin.com_deepin_dists_panda_main_binary-amd64_Packages
E: 无法解析或打开软件包的列表或是状态文件。

解决办法:

1
2
$ sudo rm -f /var/lib/apt/lists/packages.deepin.com_deepin_dists_panda_main_binary-amd64_Packages
$ sudo apt update

目录出于锁定状态

因为Windows10开启了快速启动,关闭即可。