issues

First Post:

Last Update:

Word Count:
683

Read Time:
3 min

日常问题大全

[0x001] 如何将md格式转doc

1
2
sudo pacman -S pandoc

使用方式

1
pandoc -s test.md -o test.docx

[0x002] How to disable kwallet service

You could also edit file ~/.kde/share/config/kwalletrc: adding to [Wallet] section just one line

1
Enabled=false

would disable kwallet popups.

If you have ~/.config/kwalletrc file, do the same with it.

https://stackoverflow.com/questions/29594260/how-to-disable-kwallet-in-kde-plasma-5

[0x003]Vim设置Tab宽度/替换Tab为空格

用户配置:

在/home/logan/.vimrc中添加以下代码后,重启vim即可实现按TAB产生4个空格:
set ts=4 (注:ts是tabstop的缩写,设TAB宽4个空格)
set expandtab

对于已保存的文件,可以使用下面的方法进行空格和TAB的替换:
TAB替换为空格:
:set ts=4
:set expandtab
:%retab!

空格替换为TAB:
:set ts=4
:set noexpandtab
:%retab!

加!是用于处理非空白字符之后的TAB,即所有的TAB,若不加!,则只处理行首的TAB。

[0x004] System settings won’t open after changing Application style

Title. I was wondering if there was a way to change the Application style without opening System Settings.

Trying to open System settings from the terminal gives me this:

1
2
3
4
5
6
7
Cyclic dependency detected between "file:///usr/lib/qt/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml" and "file:///usr/lib/qt/qml/org/kde/kirigami.2/styles/org.kde.desktop.plasma/Units.qml"
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = systemsettings5 path = /usr/bin pid = 2255
KCrash: Arguments: /usr/bin/systemsettings5
KCrash: Attempting to start /usr/lib/drkonqi
qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 454, resource id: 0, major code: 20 (GetProperty), minor code: 0
[1] + 2255 suspended (signal) systemsettings5

start up

1
systemsettings5 --style=Breeze

[0x005] Failed to start Load/Save Screen Backlight Brightness

1
systemctl status systemd-backlight@backlight:acpi_video0.service

Just added acpi_backlight=vendor to the arguments of the kernel and everything seems to work now!

/etc/default/grub:

1
GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_backlight=vendor"

Do not forget to run sudo update-grub afterwards.

ref: https://bbs.archlinux.org/viewtopic.php?id=211967

ref: https://bbs.archlinux.org/viewtopic.php?id=261613

ref: https://unix.stackexchange.com/questions/393185/backlightacpi-video0-no-such-device

[0x007] Backlight and add kenel module

https://wiki.archlinux.org/index.php/backlight

https://bbs.archlinux.org/viewtopic.php?id=257810

Add kenel module

vim /etc/mkinitcpio.conf
I added amdgpu to modules
Now it looks like this:

MODULES=(amdgpu)
Then I regenerated initframs:

mkinitcpio -P

[0x008] Pyinstaller throwing AttributeError: ‘NoneType’ object has no attribute ‘groups’ error

Update Pyinstaller from github can solve this problem.

1
pip install https://github.com/pyinstaller/pyinstaller/tarball/develop

ref:

https://stackoverflow.com/questions/66297374/pyinstaller-throwing-attributeerror-nonetype-object-has-no-attribute-groups

https://github.com/pyinstaller/pyinstaller/issues/5552#ref-issue-804386339

[0x009] How to save root file by vim when opened with no-root user

Input command in vim

1
:write !sudo tee % > /dev/null

ref: https://www.cnblogs.com/jackie-astro/p/13295584.html

virtualbox6.1.34无法启动问题

问题如下

1
2
Failed to load R0 module C:\Program Files\Oracle\VirtualBox/VMMR0.r0: Signature #2/3: Expected at least 2 valid paths, not 1.: \Device\HarddiskVolume2\Program Files\Oracle\VirtualBox\VMMR0.r0 (VERR_SUP_VP_UNEXPECTED_VALID_PATH_COUNT).
Failed to load VMMR0.r0 (VERR_SUP_VP_UNEXPECTED_VALID_PATH_COUNT).

是vitualbox 6.1.34的一个bug,下载 6.1.32即可,https://www.virtualbox.org/download/testcase/VirtualBox-6.1-6.1.33_150501_el8-1.x86_64.rpm
解压后进入到usr/lib/virtualbox/,然后替换文件。

sudo cp ./VBoxDDR0.r0 /usr/lib/virtualbox/VBoxDDR0.r0

打赏点小钱
支付宝 | Alipay
微信 | WeChat