深度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 [email protected]
debug1: Entering interactive session.
debug1: pledge: exec
debug1: client_input_global_request: rtype [email protected] 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”命令