惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
U
Unit 42
Y
Y Combinator Blog
I
InfoQ
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
量子位
Microsoft Security Blog
Microsoft Security Blog
B
Blog
The Cloudflare Blog
F
Fortinet All Blogs
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
C
Check Point Blog
S
SegmentFault 最新的问题
爱范儿
爱范儿
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
T
Tailwind CSS Blog

LanYunのBlog

优化macOS Dock栏的显示与隐藏 解决macOS全屏模式下某些情况显示原始鼠标指针的问题 Yarn从Classic迁移到Modern nginx自编译 用santa对二进制进行监控和授权 ESXI 8.0安装黑群晖DSM 7.x openwrt编译过程记录 编译monero For macOS ARM 自建busuanzi不蒜子平台统计平台 浅记博客更新日志 (机翻)Kubo配置文件 修改brew services中服务的启动参数 技术杂记📝 解决Surge模块不能同步问题 为Arch Linux配置邮件服务 自编译NutClient-ESXI,更改邮件逻辑 解决ESXI和群晖使用SSH密钥登录问题 为J4125软路由ESXI中群晖提供UPS服务 在arch linux上搭建rustdesk server 解决虚拟机扩容中GPT PMBR大小不符问题 搭建Tuic V5 优雅地为macOS提供python多版本的支持 修复root路径下文件权限问题 解决macOS 14上利用Whisky运行steam时有关问题 在macOS中用PhpStorm配置Xdebug调试 利用CloudFlare Workers快速自建一个IP获取器 如何自动续期证书? 从0开始速配VPS用于网站等 搭建一个基于ChatGPT的QQ机器人(Yunzai-Bot) For Mac 010 Editor For Mac 13.0.1 Crack 破解
解决Kali Linux启动分辨率异常等问题
LanYun · 2022-04-25 · via LanYunのBlog

前言

发现在有些时候启动Kali Linux时,识别不到正确的分辨率,或者开机分辨率异常.

本文就来解决这个问题.(下文提到的方法可也用于自定义分辨率)

查询显示设备

输入命令

1
xrandr

image-20220425224810223

我们可以看到当前分辨率,显示器名称(Virtual-1)以及支持的分辨率.

目前这个是识别正常的状态,如果识别有问题,那么就不会有这些分辨率.

查询分辨率对应的信息

输入命令

1
cvt xxx xxx 

image-20220425230604614

我们需要的是这个 "3456x2100_60.00" 622.00 3456 3736 4112 4768 2100 2103 2113 2175 -hsync +vsync

设置分辨率

1
sudo xrandr --newmode "3456x2100_60.00"  622.00  3456 3736 4112 4768  2100 2103 2113 2175 -hsync +vsync && sudo xrandr --addmode Virtual-1 "3456x2100_60.00" && sudo xrandr --output Virtual-1 --mode "3456x2100_60.00" 

xrandr命令用法如下:

xrandr --output eDP-1 --auto --output HDMI-1 --auto --panning [C*E]x[D*F]+[A]+0 --scale [E]x[F] --right-of eDP-1

xrandr官方wiki:https://wiki.archlinux.org/index.php/Xrandr
HiDPI官方wiki:https://wiki.archlinux.org/index.php/HiDPI

挖一个坑,我还不知道怎么用命令弄缩放,所以想弄缩放可以去参考上面的wiki.我是直接修改,它下次貌似默认就记住了.

如果需要开机应用的话.

/etc/profile 文件末尾添加以下代码:

1
2
3
xrandr --newmode "3456x2100_60.00"  622.00  3456 3736 4112 4768  2100 2103 2113 2175 -hsync +vsync
xrandr --addmode Virtual-1 "3456x2100_60.00"
xrandr --output Virtual-1 --mode "3456x2100_60.00"

reboot重启即可~

补充

若你与我一样通过Parallels Desktop虚拟机来运行的Kali

建议调整好最佳分辨率后,以设置里的分辨率为准.例如我的:

image-20220816173101973

那么,分别应该这样设置:

/etc/profile 文件末尾添加以下代码:

1
2
3
xrandr --newmode "3360x2100_60.00"  605.25  3360 3632 4000 4640  2100 2103 2109 2175 -hsync +vsync
xrandr --addmode Virtual-1 "3360x2100_60.00"
xrandr --output Virtual-1 --mode "3360x2100_60.00" --rate 120

reboot重启即可~

  • WeChat

    WeChat

  • AliPay

    AliPay