what I will do when after installing Debian 10, the buster version.
This is a brief guideline to help the DEVs who likes Debian release version.
but I use devuan version because of systemd issues.
Download ISO
http://mirrors.163.com/debian-cd/10.10.0/multi-arch/iso-cd/
use dd to burn it to usb:
dd if=debian-10.10.0-amd64-i386-netinst.iso of =/dev/sd# #some thing like /dev/sdb not /dev/sdb1.
Download non-free firmware
I use tsinghua mirror. download it and unzip it to extra USB:
https://mirrors.tuna.tsinghua.edu.cn/debian-nonfree/firmware/buster/current/firmware.zip
Install Debian 10 Buster
choose use entire disk with LVM with encryption to make a robust system.
after installation, change /etc/apt/source.list to 163 mirror. also change debian-security source otherwise it will extremely slow.
set font size to 12.
install xfce4
use dwm now.
cd ~/.local/share/applications # here is the startup menu.
cat ~/.bashrc # define some useful alias.
there are a bunch of features in Window Manager & Window Manager tweak:
- use the mouse wheel on the desktop to switch workspaces # opt off
- hide title of windows when maximized # opt off
- click and drag the buttons to change the layout # opt off the scroll up buton
- raise window when clicking inside application window # opt off
- raise windows when any mouse button is pressed # opt off to prevent scrolling another window but lost focus
- use mouse wheel on title bar to roll up window # opt off
set my screen resolution to 1600*900.
if you want to start x from command:
startx
enable tap-to-click on Debian 10
add the following package and change the option in Mouse. then you can touch the touchpad to click.
apt install xserver-xorg-input-synaptics
also you may need to copy
copy /usr/share/X11/xorg.conf.d/70-synaptics.conf /etc/X11/xorg.conf.d/
add follows:
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
MatchDevicePath "/dev/input/event*"
Option "TapButton1" "1" #单指敲击产生左键事件
Option "TapButton2" "3" #双指敲击产生中键事件
# Option "TapButton3" "2" #三指敲击产生右键事件
Option "VertEdgeScroll" "on" #滚动操作:横向、纵向、环形
Option "VertTwoFingerScroll" "on"
Option "HorizEdgeScroll" "off"
Option "HorizTwoFingerScroll" "off"
Option "CircularScrolling" "off"
Option "CircScrollTrigger" "2"
Option "EmulateTwoFingerMinZ" "40" #精确度
Option "EmulateTwoFingerMinW" "8"
Option "CoastingSpeed" "20" #触发快速滚动的滚动速度
Option "PalmDetect" "1" #避免手掌触发触摸板
Option "PalmMinWidth" "3" #认定为手掌的最小宽度
Option "PalmMinZ" "200" #认定为手掌的最小压力值
EndSection
firefox
remove firefox title bar
select Menu -> Customize -> opt off the bottom Title bar box.
set firefox to save no password.
change search engine to duckduckgo.
install more firefox plugins:
lastpass use keepassxc now.
foxyproxy
ublock origin : add china list to fillter.
decentraleyes
mutil-account container
temporary container
video downloadhelper
Disable Notification
always check if firefox is your default browser. # opt in
preferences -> privacy & security -> notifications -> block new requests asking to allow notifications
add shortcut to uxterm
there are 2 places to put the shortcut: 1 is keyboard shortcut; 2 is Window Manager shortcut.
add following to Keyboard / Application Shortcuts:
xfce4-terminal #I prefer to use Ctrl+Alt+z
add a shortcut to show desktop in Window Manager / Keyboard
show desktop # Ctrl+d
screenshooter
add following command to shortcut, I prefer to Ctrl+a.
apt install imagemagick ffmpeg
import -r #parameter -r indicates region cut.
path
then you can run commands: ifconfig, reboot without full path.
/etc/login.defs
/etc/profile #this will work when interactive login.
crontab #this will use its own PATH
add extra path to ~/.bashrc # This will work.
export PATH=$PATH:/
sbin
extra tools
add more packages so that I can use ifconfig, dig, aria2c, ssh, scp, openvpn, vim command.
apt install net-tools dnsutils vim aria2 shadowsocks-libev ssh wget curl whois
apt install tmux
apt install dnscrypt-proxy unbound
apt install nginx
in nginx ‘s conf: location / add : autoindex on;
apt install thunderbird gnucash keepassxc filezilla transmission
GIMP is a tools can edit pictures.
Audacity can modify audio files.
Kdenlive can make simple videos.
apt install audacity gimp kdenlive
apt install bluetooth bluez
firewall
apt install ufw
- ufw default deny incoming
- ufw default allow outgoing
- ufw enable
Enigmail for thunderbird
apt install enigmail
set junk email rules:
nextcloud
apt install nextcloud-desktop
vlc
apt install vlc
apt install libavcodec-extra gstreamer1.0-libav gstreamer1.0-plugins-ugly gstreamer1.0-vaapi
日文输入法
apt install fcitx
apt install fcitx-table-wbpy #五笔拼音输入法
apt install fcitx-mozc #japanese input method
set timezone
dpkg-reconfigure tzdata
use local DNS and hosts
use localhost instead of 127.0.0.1 and config /etc/hosts properly.
chattr +i resolv.conf #change this so that no one can edit it.
virt-manager
VirtualBox is not available in Buster so that the official suggest virt-manager:
apt install firmware-linux
apt install virt-manager
wine
wine & wine-development are both stable versions. wine-development is newer than wine.
apt install wine-development winetricks
also, we will need to enable & install wine 32 bit version.
dpkg --add-architecture i386 && apt update && apt install wine32-development
fix Chinese fonts:
apt install fonts-wqy-microhei
copy windows xp font to /usr/share/fonts/xp, this will make dedian ugly. you can put it to ~/.wine/windows/Fonts.
create a file “ch_font.reg” and copy the following content to it: #pls make sure to use wqy-microhei.ttc instead of wqy-microhei.
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="wqy-microhei.ttc"
"Microsoft Sans Serif"="wqy-microhei.ttc"
"MS Sans Serif"="wqy-microhei.ttc"
"Tahoma"="wqy-microhei.ttc"
"Tahoma Bold"="wqy-microhei.ttc"
"SimSun"="wqy-microhei.ttc"
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
wine regedit ch_font.reg
显示为方框:缺少对应的字体。下载安装字体即可。
显示为问号:使用了错误的编码保存汉字,汉字的编码信息丢失。xp使用codepage来标识编码集。
显示为乱码:编码和解码使用了不同的方式。比如用iso-8859-1显示中文;或者是不存在zh_CN.UTF-8的locale。
wine会尝试3次使用设定的charset,如果3次都失败了则退回使用iso-8859-1(即ANSI-latin-1),则中文显示为乱码。
install zh_CN.UTF-8 :
locale -a # check if zh_CN.UTF-8 exists.
dpkg-reconfigure locales # select zh_CN.UTF-8 then generate it.
mt5
this is a 64 bit program. so it needs wine64.
apt install winbind #fix ntlm_auth error problem
download it:
https://www.metatrader5.com/en/download
wine it.
Gtja
download it: (goutai junan stock software)
https://www.gtja.com/content/download.html
env LANG=zh_CN.UTF-8 wine Setup_Fuyi_simple_200227.exe # use locale -a to make use zh_CN.UTF-8 exists. if not you must use locale-gen to generate it.
use winetricks to install MFC42.DLL
add LANG=zh_CN.UTF-8 to run the gtja command.
download gecko(this is a wine version firefox engine instead of IE, but patched out of Debian distribution) :
wine-development msiexec /i wine_gecko-2.47-x86_64.msi # install it manully. also install x86 architecture wine_gecko-2.47-x86.msi.
or you can put wine_gecko-2.47-x86_64.msi to /usr/share/wine/gecko.
download mono and put it to /usr/share/wine/mono too. Mono is a .Net framework.
Ja: yes; Nein: no.
tty 终端中文为方框:
基本都会遇到默认的TTY终端无法显示中文的情况。
网上有一堆令人迷惑的教程,但无论是调整LOCALE,或者是更改字体配置,都无法解决这个问题。实际上,在SSH下,或者串口输出,桌面DE/WM下是可以正常显示中文字符。
TTY终端无法显示中文字符的原因,是内核无法渲染中文字符,我的理解是:因为中文字符的显示模式、宽度与英文字符不同, 默认输出英文字符的framebuffer(帧缓冲区)无法支持中文的完整显示。如果你使用SSH等其它方式,字符并不是由内核渲染输出,所以正常显示了。
让 linux TTY终端支持中文显示的方法有两种思路:
1、启动单独的虚拟终端程序,实现对中文字体的渲染。常见的zh-con、fbterm就是这个思路。但是这两个软件已经很久没有人维护更新了。
2、对linux内核打补丁,实现内核原生支持中文输出。
补丁名称:cjktty
我找到的最初补丁的制作者文章(这个链接现在显示已经失效了…):https://www.ibm.com/developerworks/cn/linux/l-cn-termi-hanzi/index.htmlwww.ibm.com
作者的思路我简单的理解为把两个英文字符的缓冲区合并成一个字符,相当于在两个英文字符的显示位置上各显示一般中文,拼成一个中文的正常显示。
之前这个补丁沉寂了一段时间,但是近期(2020年末)我惊喜的发现有大佬开始维护这个内核中文补丁了,并且Arch Gentoo(Gentoo-zh) 均有打包好的内核可以使用。(PS:国产银河麒麟V10是一样的方法实现了内核中文输出)
cjktty补丁链接:zhmars/cjktty-patchesgithub.com
Arch 系列发行版在 AUR 中搜索cjktty即可看到打好补丁的内核
Gentoo 配置添加Gentoo-zh源,里面的两个内核也都打好了补丁
其它发行版就只能大家自己动手给内核打补丁了。。。
终端中文名称文件的操作小技巧:
可以使用 ls 配合 awk 选择中文文件操作
我选择 fbterm(bash有一个补全包也可以) 去选择补全中文路径
apt install gopher irssi lynx dillo fbterm fcitx-frontend-fbterm
DEV tools
apt install git pelican uwsgi python3-pip
Django
python3 -m pip install django
apt install mariadb-server mariadb-client
pip
pip freeze > requirements.txt
# make a env file
pip install -r requirements.txt
# prepare the env
polishing
add splash parameter to boot process: /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
copy a beautiful picture to /boot/grub to name it “backgroud.jpg” to make a grub backgroud.
run update-grub to update the boot.
Steam
the debian package manager supplys the steam package. you can also download it from official site.
https://store.steampowered.com/about/
dpkg-deb -c steam_latest.deb # show the content of a package.
apt install steam
how to install deb
- dpkg -i youowndeb.deb
- dpkg -l | grep youowndeb # check if youowndeb installs succesfully
- dpkb -r youowndeb # remove youowndeb
- dpkg -P youowndeb # remove youowndeb & its configuration
- dpkg-deb -c youowndeb.deb # list the content of youowndeb.deb
how to install a dsc
if you want to manipulate the installation manually without apt. you need to:
put your own src to /usr/local/src
- dpkg-source -x yourfile.dsc # regenerate the source files
- dpkg-buildpackage -rfakeroot -b -krainasmoon@126.com # build a own deb package
- dpkg -i ../yourfile_arch.deb # install your own deb
vulkan & dxvk & vkd3d
vulkan: a cut edge technology to implement 3D, the other choices are openGL & Driect3D 11.
dxvk: debian version vulkan. a translation layer to vulkan.
vkd3d: is a graphic library built on vulkan.
VKD3D performance is not the best and usually Direct 3D 11 is running faster on top of DXVK and Vulkan.
apt install vulkan-utils dxvk mesa-vulkan-drivers vkd3d-demos
vkcube # make sure vkd3d works
vulkaninfo # make sure vulkan works
secure boot vs. CSM OS vs. UEFI OS
Other Software
- peek # record the screen
- scratch # make a simple catoon or game
- krita #
- gparted #
- hexedit #
- hexchat #
- audacious # listen to music
- terminology # a terminal
- neofetch # show a summary info of your pc hardwares
- tlp # improve the battery performance
- clamav
- seahorse
- bluez blueman
- nmap
- freetuxtv
- streamtuner2
- goldendict
- minicom
- gpodder
- keepassxc
Music: audacious mixxx clementine hydrogn
Video: VLC kdenlive
Radio: streamtuner2
IPTV: freetuxtv
OFFICE: goldendict gnucash
Download: amule filezilla
Podcast: gpodder
Administration: keepassxc
Development:
Internet: amule hexchat liferea qterm remmina
vnc viewer
https://www.realvnc.com/en/connect/download/viewer/
snap
linux version of app store
apt install snapd
snap install odio
dkms
Pycharm
debian multimedia
https://www.deb-multimedia.org/
kxstudio
retroshare
remmina # a VNC connector
mixxx # a DJ emulator
gpodder # manage podcast
liferea # RSS
goldendict # linux diectionary
clementine # a great music tool
apt install hydrogen remmina mixxx clementine gpodder liferea
rig # make a fake indentity.
qterm # bbs client
cadubi #
amule # linux version of emule
apt install telnet rig qterm cadubi amule
minicom is a seril port that you can connect raspeberry pi via USB-TTL adapter.
apt install minicom
netease music player
my own pc
use neofetch to show the exact model.
apt install xserver-xorg-video-intel # install display driver
cope with dongle wifi adapter
my dongle wifi model is : TL-WN726N
- lsusb
- dmesg
- 查看设备的ID,
- 查看他的芯片组,
- google他的硬件信息,
- 查看debian官方支持的硬件,
- 上硬件官网查找驱动,
- 上github查找开源驱动。
- 下载源码,编译驱动。
一些命令:
- md5sum
- lsmod
- modinfo
- uname -a
- lsb_release -a
- cat /proc/cmdline
- update-initramfs -u
ISSUES
- screen will be totally black after suspend resume. pls see:
https://wiki.debian.org/Suspend
- can’t browse network in Thunar(Files explorer), need to install the following package:
Failed to open “/ on”. Specified location is not supported.
apt install gvfs-backends
failed to retrieve share list from server: no such file or directory
apt install cifs-utils smbclient samba
- when start Virtual Machine encounter this error:
Error starting domain: Requested operation is not valid: network ‘default’ is not active:
Solution: Virtual Machine Manager -> Edit -> Connection Details -> Virtual Networks -> click the start default button.
- su will not run the login process.
su - # the parameter - will make login process run.
- Could not load wine-gecko. HTML rendering will be disabled.
the wine-gecko is not inclueded in Debian buster. you need to install both x86 & x68_64 version manully.
- [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
this is just GnuTLS library reporting that it’s using TLS 1.3 and aria2c
not understanding what “TLS 1.3” is. you need to compile aria2c to newest version manually.
- warn: OpenVR: Failed to locate module
I found “*d3d9” rule setted as native. Disabling this rule solved problem.
- err:ole:CoGetClassObject no class object {2c5bc43e-3369-4c33-ab0c-be9469677af4} could be created for context 0x1
- err:vulkan:wine_vkCreateInstance Failed to create instance, res=-9
workaroud:
https://github.com/doitsujin/dxvk/wiki/Common-issues#vulkan-errors
https://forum.winehq.org/viewtopic.php?t=31400
apt install dxvk
apt install vulkan-validationlayers
apt-get install libvulkan1 libvulkan1:i386
apt-get install mesa-vulkan-drivers mesa-vulkan-drivers:i386
winetricks d3dx11_43 dxvk
WINEDEBUG=-all VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation
- fixme:vkd3d_create_device: Unsupported feature level 0xc100
winedebug=+seh,+dxgi,+d3d12 VKD3D_DEBUG=”trace”
https://forum.winehq.org/viewtopic.php?t=31273
- trace:vkd3d_create_device: create_info 0x32f450, iid {189819f1-1db6-4b57-be54-1821339b85f7}, device (nil)
- “err:ole:CoGetClassObject class {54e211b6-3650-4f75-8334-fa359598e1c5} not registered”
bug: https://bugs.winehq.org/show_bug.cgi?id=44865
set to win7 will fix this error.
- vulkan bug:
vulkanrt install completed, but installed file /home/hht/.wine/dosdevices/c:/windows/syswow64/vulkan-1.dll not found
download it and cope it there.
https://wikidll.com/download/24483
WINEDEBUG=warn+all
install winehq:
https://wiki.winehq.org/Debian
unzip 中文,日文乱码:
LANG=C 7za x your-zip-file.zip
convmv -f GBK -t utf8 --notest -r . # 中文的编码为 GBK
convmv -f Shift_JIS -t utf8 --notest -r . # 日文的编码为 Shift_JIS
use Libreoffice to convert a Windows file to a UTF-8 file to solve the Chinese character problem :
soffice --headless --convert-to csv afile.xls
Spec For Asus laptop:
systemctl disable mysql
systemctl disable smbd
systemctl disable libvirtd
systemctl disable bluetooth
TIPS:
- nslookup 8.8.8.8 #give you a reverse DNS lookups
- update-initramfs -u #It will update the kernel. a batch of update-* command
- find /demo -name “*.js” |xargs cat|grep -v ^$|wc -l # 统计demo目录下所有js文件代码行数,过滤了空行
REF:
- https://prism-break.org/en/
- https://www.gtja.com/content/download/index.html?t=external
- https://quant.gtja.com/
- https://wiki.debian.org/KernelModesetting#Disabling_KMS
- http://linux-wiki.cn/wiki/Wine%E7%9A%84%E4%B8%AD%E6%96%87%E6%98%BE%E7%A4%BA%E4%B8%8E%E5%AD%97%E4%BD%93%E8%AE%BE%E7%BD%AE
- https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/dnscrypt-proxy/example-dnscrypt-proxy.toml
- https://www.linuxbabe.com/command-line/how-to-use-linux-efibootmgr-examples
- https://askubuntu.com/questions/342365/what-is-the-difference-between-grubx64-and-shimx64
- https://superuser.com/questions/1284392/what-exactly-is-uefi-with-csm-boot-mode
- https://www.ibm.com/developerworks/cn/java/analysis-and-summary-of-common-random-code-problems/index.html
- http://www.tuxmachines.org/node/111970
- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1716301
- https://github.com/kuba-moo/mt7601u/issues/64
- https://forum.elivelinux.org/t/how-to-remove-systemd-on-debian-buster-distros-and-switch-to-sysvinit-the-good-way/2278