深度Deep系统的使用问题记录
yum程序的安装及操作
安装yum操作:
sudo apt-get install build-essential 安装build-essential
sudo apt-get install yum
yum的基础操作:
sudo yum install -y(yes) nano 安装安装包
sudo yum remove -y nano 卸载
sudo yum install --downloadonly --downloaddir=/home/hyan/nano nano 只想下载nano安装包到/home/hyan/nano文件夹
sudo yum localinstall /home/hyan/nano-2.3.1-10.el7.x86_64.rpm 本地安装
sudo yum update PACKAGE #更新某个包
sudo yum groupupdate GROUP #更新某个软件组
sudo yum check-update #检查当前系统中需要更新的包
sudo yum list #显示软件源中所有可用的包,一般不用
sudo yum list installed #显示系统中已经安装过的包
sudo yum info PACKAGE #显示某个包的信息
sudo yum remove PACKAGE #删除某个包
sudo yum groupremove GROUP #删除某个软件组
sudo yum clean #清除使用yum所生成的缓存文件
apt-get的安装和卸载软件
apt-get update:更新安装列表
apt-get upgrade:升级软件
apt-get install software_name :安装软件
apt-get --purge remove software_name :卸载软件及其配置
apt-get autoremove software_name:卸载软件及其依赖的安装包
dpkg --list: 显示已安装软件
notepad++安装
安装方法:
sudo add-apt-repository ppa:notepadqq-team/notepadqq
sudo apt-get update
sudo apt-get install notepadqq
卸载方法:
sudo apt-get remove notepadqq
sudo add-apt-repository --remove ppa:notepadqq-team/notepadqq
Linux 卸载软件,强力清除残留配置
#卸载
sudo apt remove openssh-client*
#清理依赖的软件(如果你要卸载的软件有第3方的库依赖, 可以使用以下命令清理, 相关不在使用的依赖 )
sudo apt autoremove 删除系统不再使用的孤立软件
sudo apt autoclean 清理旧版本的软件缓存
#强力清理残留配置(有时就算清理了第3方依赖, 还是会有软件配置的残留, 一般软件的配置都在/etc目录下, 不是知道是那个情况下乱删除会导致系统崩溃, Linux又没有什么管家辅助清理, 这个时间就要拿出终极命令, 一键强力清理残留配置)
sudo dpkg -l |grep ^rc|awk '{print $2}' |sudo xargs dpkg -P
deepin深度系统更改窗口标题栏高度
1、先创建一个目录,如果有就不用了:
# 如果你是用的默认的白色主题
mkdir -p ~/.local/share/deepin/themes/deepin/light
# 如果你用的黑色主题
mkdir -p ~/.local/share/deepin/themes/deepin/dark
2、进入改目录后创建配置文件:
cd ~/.local/share/deepin/themes/deepin/light
deepin-editor titlebar.ini
3、加入下面内容并保存:
[Active]
height=24
[Inactive]
height=24
这个24是我自定义的像素,你想给多少给多少。
注销生效。
Deepin(Ubuntu)安装rpm软件包
1.首先安装alien和fakeroot这两个软件,alien可以将rpm转换为deb包。命令
sudo apt-get install alien fakeroot
2.使用alien将rpm包转为deb包:
sudo fakeroot alien youapplet.rpm
3.转换成功,可以即刻使用这个命令来安装:
sudo dpkg -i youapplet.deb
Deepin的快捷键的创建
首先我们先复制一个可以用的桌面快捷方式,然后重命名在里面修改配置:
sudo \cp -fr idea.desktop ~/Desktop #将idea的桌面快捷方式复制到桌面
修改桌面快捷方式的配置:
sudo gedit netease-cloud-music.desktop.desktop
或者
sudo vim netease-cloud-music.desktop.desktop
配置项:
[Desktop Entry] #每个desktop文件都以这个标签开始,说明这是一个Desktop Entry文件
Version=1.0 #标明Desktop Entry的版本(可选)
Type=Application #desktop的类型(必选),常见值有“Application”和“Link”
Name=pycharm#程序名称(必须),这里以创建一个pycharm的快捷方式为例
Name[zh_CN]=pycharm
Name[zh_TW]=pycharm
Comment=pycharm #程序描述(可选)
Comment[zh_CN]=pycharm
Comment[zh_TW]=pycharm
Icon=/home/shenjia/pycharm-community-2018.2.1/bin/pycharm.png #设置快捷方式的图标(可选)
Exec=/home/shenjia/pycharm-community-2018.2.1/bin/pycharm.sh %U #程序的启动命令(必选),可以带参数运行,当下面的Type为Application,此项有效
Categories=Development;IDE; #注明在菜单栏中显示的类别(可选)
Terminal=false #是否在终端中运行(可选),当Type为Application,此项有效
StartupNotify=true
更改配置放到相应的目录:
将这个快捷方式复制到/usr/share/applications文件夹下即可,此时已经出现了快捷方式
Deepin快捷键冲突
1. Ctrl+Alt+H:
在搜狗输入法配置里——》附加组件——》键盘布局——》切换单词提示(去掉快捷键)
2. ctrl+alt+b(软键盘)
launcher -> 输入法配置 -> 全局配置 -> 显示高级选项 -> 切换虚拟键盘
Deepin终端连接远程出现X11错误
###报错信息:
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
debug1: Unspecified GSS failure. Minor code may provide more information
No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
debug1: Next authentication method: publickey
debug1: Trying private key: /home/kunzai/.ssh/id_rsa
debug1: Trying private key: /home/kunzai/.ssh/id_dsa
debug1: Trying private key: /home/kunzai/.ssh/id_ecdsa
debug1: Trying private key: /home/kunzai/.ssh/id_ed25519
debug1: Next authentication method: password
root@ip's password:
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Permission denied, please try again.
root@ip's password:
debug1: Authentication succeeded (password).
Authenticated to ip ([ip]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: exec
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Sending environment.
debug1: Sending env LANG = zh_CN.UTF-8
debug1: Remote: No xauth program; cannot forward with spoofing.
X11 forwarding request failed on channel 0
#ssh调试:(可以查看)
ssh -X -v root@server
#我的解决主要要点
在配置文件/etc/ssh/sshd_config中最后添加一行
IPQoS 0x00
解释说明:
IPQoS 指令用于 IP 层的 type-of-service,默认为“ lowdelay ” 和 "throughput".
我的路由器之前 WAN 口双播,不是很稳定。
在添加 IPQoS 0x00 指令前,每次 ssh 都会失败。
在添加 IPQoS 0x00 指令后,每次 ssh 都会成功,但是建立链接花费的时间很长, 比如 10 多秒后才成功。
之后我修改 WAN 口单播,ssh 一切正常了。
目前可以理解为路由器的性能在双播情况下处理数据包不稳定导致的 ssh 失败
原文地址:
https://www.v2ex.com/t/412269
#修改配置/usr/lib/deepin-terminal/ssh_login.sh
将配置
set ssh_cmd {/usr/lib/deepin-terminal/zssh -X -o ServerAliveInterval=60}
修改为
set ssh_cmd {/usr/lib/deepin-terminal/zssh -o ServerAliveInterval=60}
#修改配置文件/etc/ssh
PermitRootLogin yes #允许root登录
X11Forwarding yes #允许x11转发
配置文件/etc/ssh
# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key
# Ciphers and keying
#RekeyLimit default none
# Logging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
#PubkeyAuthentication yes
# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation sandbox
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# no default banner path
#Banner none
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
ll未找到命令
vi ~/.bashrc
## 放开注释或增加
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
source ~/.bashrc”命令