调教自己的Debian
1.a).安装conky
apt install conky
b).配置.conkyrc
conky.config = {
background = true,
use_spacer = 'right',
use_xft = true,
font = 'Microsoft YaHei:size=9',
-- font Microsoft YaHei:pixelsize=9,
override_utf8_locale = true,
update_interval = 1.0,
own_window_class = 'conky',-- If own_window is yes, you may use type normal, desktop or override dock
own_window = true,
own_window_type = override,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_argb_visual = true,
-- own_window_argb_value = 100,
own_window_transparent = true,
double_buffer = true,
minimum_width = 206,
minimum_height = 5,
maximum_width = 206,
draw_shades = false,
draw_graph_borders = false,
-- default_color ff0ff
default_shade_color = '#f0f000',
default_outline_color = '#000000',
alignment = 'top_right',
gap_x = 40,
gap_y = 100,
cpu_avg_samples = 2,
uppercase = false,-- set to yes if you want all text to be in uppercase
own_window_transparent = true,
-- own_window_hints undecorate,sticky,skip_taskbar,skip_pager
default_color = 'gray',
draw_borders = false,
draw_outline = false,
own_window_colour = '#000000',
};
conky.text = [[
${font Microsoft YaHei:style=Bold:pixelsize=30}${alignc}${time %H:%M:%S}
${font Microsoft YaHei:pixelsize=18}${alignc}${time %b%d日 星期%a}${font Microsoft YaHei:pixelsize=12}
${color #ffd700}${hr 1}$color
${color #98c2c7}主机名:${color #db7093}$alignr$nodename
${color #98c2c7}内核: ${color #db7093}$alignr$kernel
${color #98c2c7}已开机: ${color #db7093}$alignr$uptime
${color #98c2c7}硬件系统类型 :${color #db7093}$alignr$machine
${color #98c2c7}本机网址: $alignr ${addr enp2s0}
${color #ffd700}${hr 1}$color
${color #98c2c7}CPU 温度: $alignr{color #db7093}${acpitemp}℃
${color #98c2c7}CPU总使用率: ${color #db7093} $alignr${cpu cpu0}%
${color #78af78}${cpubar cpu0}
${color #98c2c7}CPU1 ${cpubar 4,150 cpu1}${cpu cpu1}%
${color #98c2c7}CPU2 ${cpubar 4,150 cpu2}${cpu cpu2}%
${color #98c2c7}CPU3 ${cpubar 4,150 cpu2}${cpu cpu3}%
${color #98c2c7}CPU4 ${cpubar 4,150 cpu2}${cpu cpu4}%
${color #98c2c7}CPU ${cpugraph 15,150 ff0000 00ff00}
${color #98c2c7}总进程数:$processes ($running_processes running)
${color lightgrey} ${top name 1}$alignr ${top cpu 1}
${color lightgrey} ${top name 2}$alignr ${top cpu 2}
${color lightgrey} ${top name 3} $alignr${top cpu 3}
${color lightgrey} ${top name 4} $alignr${top cpu 4}
${color lightgrey} ${top name 5} $alignr${top cpu 5}
${color lightgrey} ${top name 6} $alignr${top cpu 6}
${color #98c2c7}物理内存:${color #4169e1}$alignr ${color}$mem ${color #98c2c7}/${color}$memmax${color #4169e1} ${color #db7093}$memperc%
${color #78af78}${membar}
${color #98c2c7}交换分区:${color #4169e1}$alignr ${color}$swap ${color #98c2c7}/${color}$swapmax${color #4169e1} ${color #db7093}$swapperc%
${color #78af78}${swapbar}
${color #98c2c7}根分区: ${color}${alignr}${fs_free /} / ${fs_size /}
${color #78af78}${fs_bar 4 /}
${color #98c2c7}Home分区: ${color}${alignr}${fs_free /home} / ${fs_size /home}
${color #78af78}${fs_bar 4 /home}
${color #98c2c7}硬盘读写: ${color}${alignr} $diskio_read(R) $color $diskio_write(W)
${color #98c2c7}下载速度:${color} ${downspeed enp2s0}${alignr}${color #db7093} ${totaldown enp2s0}
${color #98c2c7}上传速度:${color} ${upspeed enp2s0}${alignr}${color #db7093} ${totalup enp2s0}
${color #ffd7f0}${hr 1}
]];
c).配置自动启动
配置文件startconky.sh
#!/bin/bash
sleep 8 && conky
2.安装文泉驿字体。
apt install fonts-wqy-microhei fonts-wqy-zenhei xfonts-wqy
3.安装新立得
apt install synaptic
4.添加windows分区
a)
配置/etc/fstab文件
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/sda1 /windows/winC ntfs-3g defaults,locale=zh_CN.UTF-8 0 0
/dev/sda5 /windows/winD ntfs-3g defaults,locale=zh_CN.UTF-8 0 0
/dev/sda6 /windows/winE ntfs-3g defaults,locale=zh_CN.UTF-8 0 0
/dev/sda7 /windows/winF ntfs-3g defaults,locale=zh_CN.UTF-8 0 0
/dev/sda8 /windows/winG ntfs-3g defaults,locale=zh_CN.UTF-8 0 0
/dev/sdb3 /windows/Windows ntfs-3g defaults,locale=zh_CN.UTF-8 0 0
/dev/sdb4 /windows/Data ntfs-3g defaults,locale=zh_CN.UTF-8 0 0
b)
ubuntu给的自动挂载方式
创建组 winfs
sudo groupadd winfs
添加当前用户 用户名 到组
usermod 用户名 -a -G winfs
新建autowinfs文件
配置该文件
mkdir -p /windows/
rmdir /windows/* 1> /dev/null
grep -v '/windows/' /etc/fstab > /etc/fstab.swp
fdisk -l /dev/[hs]d[a-z] | grep 'NTFS' | cut -d' ' -f1 | cut -d/ -f3 | while read WDISKS
do echo "/dev/$WDISKS /windows/$WDISKS ntfs auto,user,gid=winfs,nls=utf8,umask=007,exec,nosuid 0 0" >> /etc/fstab.swp
mkdir "/windows/$WDISKS"
done
fdisk -l /dev/[hs]d[a-z] | grep 'FAT' | cut -d' ' -f1 | cut -d/ -f3 | while read WDISKS
do echo "/dev/$WDISKS /windows/$WDISKS vfat auto,user,utf8,gid=winfs,umask=007,exec,nosuid 0 0" >> /etc/fstab.swp
mkdir "/windows/$WDISKS"
done
mv /etc/fstab.swp /etc/fstab
mount -a
exit 0
rmdir /windows/* 1> /dev/null
grep -v '/windows/' /etc/fstab > /etc/fstab.swp
fdisk -l /dev/[hs]d[a-z] | grep 'NTFS' | cut -d' ' -f1 | cut -d/ -f3 | while read WDISKS
do echo "/dev/$WDISKS /windows/$WDISKS ntfs auto,user,gid=winfs,nls=utf8,umask=007,exec,nosuid 0 0" >> /etc/fstab.swp
mkdir "/windows/$WDISKS"
done
fdisk -l /dev/[hs]d[a-z] | grep 'FAT' | cut -d' ' -f1 | cut -d/ -f3 | while read WDISKS
do echo "/dev/$WDISKS /windows/$WDISKS vfat auto,user,utf8,gid=winfs,umask=007,exec,nosuid 0 0" >> /etc/fstab.swp
mkdir "/windows/$WDISKS"
done
mv /etc/fstab.swp /etc/fstab
mount -a
exit 0
设置该文件为可执行
chmod +x autowinfs
复制该文件到/usr/sbin/ 目录下。
再运行
sudo /usr/sbin/autowinfs
5.ntfs分区只能读无法写入解决
1.关闭windows系统的快速启动(电源设置)
2.使用ntfsfix命令
先卸载该分区
然后再执行命令
sudo ntfsfix /dev/sdXX
再挂载 mount