deepin系统配置及常见问题解决方法

开机卡logo或安装卡%0

启动界面按e键进入编辑界面,先修改保证可以进入正常启动:
在splash quiet后面加

nouveau.modeset=0

之后修改/boot/grub/grub.cfg文件

vim /boot/grub/grub.cfg
在splash quiet后面加nouveau.modeset=0

// intel_pstate=disable

CPU自动调频

Linux上基本改用了intel_pstate驱动来替代原有acpi驱动进行cpu管理intel处理器,只有Peformance和Powersave两档,风扇转动快,耗电快…
首先可以通过安装cpufrequtils来查看cpu频率:

sudo apt install cpufrequtils

修改/etc/default/grub文件:

#sudo vim /etc/default/grub
# Written by com.deepin.daemon.Grub2
DEEPIN_GFXMODE_ADJUSTED=1
GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet nouveau.modeset=0 intel_pstate=disable"
GRUB_DEFAULT=0
GRUB_DISTRIBUTOR="`/usr/bin/lsb_release -d -s 2>/dev/null || echo Deepin`"
GRUB_GFXMODE=1920x1080
GRUB_THEME="/boot/grub/themes/deepin/theme.txt"
GRUB_TIMEOUT=1

GRUB_CMDLINE_LINUX_DEFAULT中的quiet后面加intel_pstate=disable即可;
其中nouveau.modeset=0是防止开机卡logo处;
最后执行命令:

sudo update-grub

开机重启;
最后修改每个cpu文件:

su root
cd /sys/devices/system/cpu
echo conservative | tee cpu*/cpufreq/scaling_governor

最终效果:
cpufrequtils

终端短路径

vim ~/.bashrc

修改60和70行:

     PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
    #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u:\[\033[01;34m\]\W\[\033[00m\]\$ '
    #PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \W\a\]$PS1"
    PS1="\[\e]0; \W\a\]$PS1"

deepin终端仿kali配色

sudo cp ~/.bashrc /root/.bashrc
vim ~/.config/deepin/deepin-terminal/config.conf 
[general]
theme=aci
opacity=1
font=Noto Mono
font_size=11

[shortcut]
copy=Ctrl + c
paste=Ctrl + v
open=Alt + q
search=Ctrl + f
zoom_in=Ctrl + =
zoom_out=Ctrl + -
default_size=Ctrl + 0
select_all=Ctrl + a
jump_to_next_command=Shift + Down
jump_to_previous_command=Shift + Up
new_workspace=Ctrl + Shift + t
close_workspace=Ctrl + Shift + w
next_workspace=Ctrl + Tab
previous_workspace=Ctrl + Shift + Tab
vertical_split=Ctrl + Shift + j
horizontal_split=Ctrl + Shift + h
select_upper_window=Alt + k
select_lower_window=Alt + j
select_left_window=Alt + h
select_right_window=Alt + l
close_window=Ctrl + Alt + q
close_other_windows=Ctrl + Shift + q
rename_title=F2
switch_fullscreen=F11
display_shortcuts=Ctrl + Shift + ?
custom_commands=Ctrl + [
remote_management=Ctrl + /
select_workspace=Alt
new_theme_terminal=Ctrl + Alt
resize_workspace_up=Ctrl + Alt + Up
resize_workspace_down=Ctrl + Alt + Down
resize_workspace_left=Ctrl + Alt + Left
resize_workspace_right=Ctrl + Alt + Right

[advanced]
cursor_shape=ibeam
cursor_blink_mode=true
cursor_auto_hide=false
scroll_on_key=true
scroll_on_output=false
scroll_line=-1
use_on_starting=window
blur_background=false
window_width=941
window_height=668
quake_window_height=0
quake_window_fullscreen=false
remote_commands=zssh
hide_quakewindow_after_lost_focus=false
show_quakewindow_tab=true
follow_active_window=true
hide_quakewindow_when_active=true
print_notify_after_script_finish=true
run_as_login_shell=false
show_highlight_frame=false
copy_on_select=false
bold_is_bright=false
audible_bell=false
always_hide_resize_grip=false
tabbar_at_the_bottom=false

[theme]
color_1=#363636
color_2=#ff0883
color_3=#e01900
color_4=#ff8308
color_5=#0883ff
color_6=#8308ff
color_7=#08ff83
color_8=#b6b6b6
color_9=#424242
color_10=#ff1e8e
color_11=#8eff1e
color_12=#ff8e1e
color_13=#1e8eff
color_14=#8e1eff
color_15=#1eff8e
color_16=#c2c2c2
background=#0d1926
foreground=#fbf5ef
tab=#31B96E
style=dark

[theme_terminal]
theme1=solarized dark
theme2=bim
theme3=hemisu light
theme4=gruvbox light
theme5=elementary
theme6=azu
theme7=aco
theme8=miu
theme9=material

xiaoguo

vim设置

安装Vundle:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

安装auto-pairs插件:

git clone git://github.com/jiangmiao/auto-pairs.git ~/.vim/bundle/auto-pairs
# vim /etc/vim/vimrc 
set nocompatible " be iMproved, required
filetype off " required
set rtp+=/home/sir/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'jiangmiao/auto-pairs'
call vundle#end()
filetype plugin indent on

set ts=4
set nu
set expandtab
set smartindent
set cindent
set shiftwidth=4
set softtabstop=4

gdb编译

主要解决内核调试remote问题;
源码下载:

http://ftp.gnu.org/gnu/gdb
国内源: https://mirrors.ustc.edu.cn/gnu/gdb/

源码修改,将./gdb/remote.c中:

if (buf_len > 2 * rsa->sizeof_g_packet)
error (_("Remote 'g' packet reply is too long: %s"), rs->buf);

修改为:

if (buf_len > 2 * rsa->sizeof_g_packet) {
    rsa->sizeof_g_packet = buf_len;
    for (i = 0; i < gdbarch_num_regs (gdbarch); i++)
    {
        if (rsa->regs[i].pnum == -1)
            continue;
        if (rsa->regs[i].offset >= rsa->sizeof_g_packet)
            rsa->regs[i].in_g_packet = 0;
        else
            rsa->regs[i].in_g_packet = 1;
    }
}

配置:

./configure -prefix=/usr/local/gdb \
--with-python='/usr/bin/python3.5'

编译:

make -j8

安装依赖等:

sudo aptitude install texinfo

安装:

sudo make install

.gdbinit:

#/home/sir/tools/pwndbg/docs/gdb
set architecture i386:x86-64:intel

更换主目录

修改user-dirs.dirs即可:

cat ~/.config/user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_PUBLICSHARE_DIR="$HOME/.Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
XDG_TEMPLATES_DIR="$HOME/.Templates"

无法开启窗口特效

解决办法:

  1. win+shift+tab快速切换
  2. ~/.config/deepin/deepin-wm-switcher/config.json配置文件中的allow_switch的值是不是false,如果是false,改成true,注销重新登陆
  3. ~/.config/kwinrc配置文件中的OpenGLIsUnsafe改成false,注销重新登陆

安装kali工具最安全有效方法

链接

安装docker

sudo apt-get install docker-ce

可能会出现网络太慢造成的timeout断线问题,可以直接根据情况下载最新deb包进行安装:

https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/docker-ce_19.03.11~3-0~debian-stretch_amd64.deb

添加切换加速器:

#sudo vim /etc/docker/daemon.json
{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}

注意如果这个文件写错了,在重新启动docker时可能会出现错误:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

pip修改源

python3 -m pip install --upgrade pip --force-reinstall

Python源:

#在root用户下执行:
vim  ~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
中国科技大学 					https://pypi.mirrors.ustc.edu.cn/simple/ 
清华大学 					https://pypi.tuna.tsinghua.edu.cn/simple/ 
中国科学技术大学 				https://pypi.mirrors.ustc.edu.cn/simple/ 
阿里云 						https://mirrors.aliyun.com/pypi/simple/ 
豆瓣(douban) 				https://pypi.douban.com/simple/

编译32位程序报错

编译32位程序报错:

# gcc pwn.c -o pwn -m32
/usr/include/features.h:364:25: fatal error: sys/cdefs.h: 没有那个文件或目录
 #  include <sys/cdefs.h>

安装g++-multilib:

sudo apt-get install g++-multilib

AFL

afl-fuzz

官网下载:

http://lcamtuf.coredump.cx/afl/

安装:

make
make install

通常的格式:

afl-fuzz -i testcase_dir -o findings_dir /path/to/program [params]

使用“@@”替换输入文件,Fuzzer会将其替换为实际执行的文件:

afl-fuzz -i testcase_dir -o findings_dir /path/to/program @@

afl-llvm

cd llvm_mode
sudo apt-get install clang-3.9
export LLVM_CONFIG=`which llvm-config-3.9`
make
sudo make install

afl-utils

git clone https://github.com/rc0r/afl-utils.git
cd afl-utils/
sudo python ./setup.py install
  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值