Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

功能请求:更新时保留原来的 dpi 配置 #173

Closed
CyrusYip opened this issue Dec 5, 2021 · 11 comments
Closed

功能请求:更新时保留原来的 dpi 配置 #173

CyrusYip opened this issue Dec 5, 2021 · 11 comments

Comments

@CyrusYip
Copy link
Contributor

CyrusYip commented Dec 5, 2021

每次更新完之后都要重新设置 dpi,有没有办法可以保存呢?

@choyy
Copy link

choyy commented Dec 7, 2021

我也想问有没有简单的解决办法

@abcfy2
Copy link

abcfy2 commented Dec 9, 2021

/etc/environment文件(全局配置,对所有用户生效,修改需要root权限)或~/.pam_environment(没有可以创建一个,无需root权限,仅对当前用户生效)添加一行:

DEEPIN_WINE_SCALE=1.25

即可,这个值具体设置多少可以参考Windows10的那个显示设置(125%, 150%, 200%等等,一般win10会给你推荐一个最合适的,直接用win10推荐的设置就行了)。

或者你之前在winecfg设置的DPI值确定,用你的DPI / 96算出来,如之前DPI设置120对应的就是1.25, 144对应的1.5等等

修改完毕之后重启系统即可生效。

注意如果通过环境变量设置DPI之后,就不要再通过winecfg去设置DPI了,如果已经设置过请还原winecfg的DPI为默认值96

@CyrusYip
Copy link
Contributor Author

CyrusYip commented Dec 11, 2021

@abcfy2
我把 DEEPIN_WINE_SCALE=1.5 写入 ~/.pam_environment,执行 /opt/apps/com.qq.weixin.deepin/files/run.sh winecfg 将 dpi 改为 96,然后重启。打开微信发现没有缩放为 150%。

@abcfy2
Copy link

abcfy2 commented Dec 11, 2021

~/.pam_environment/etc/environment 应该都是系统启动的时候才会加载,你在env | grep DEEPIN_WINE_SCALE检查下有没有这个环境变量,没有重启系统之后看看有没有。

@CyrusYip
Copy link
Contributor Author

我重启过了,有这个环境变量。

❯ env | grep DEEPIN_WINE_SCALE
DEEPIN_WINE_SCALE=1.5

@abcfy2
Copy link

abcfy2 commented Dec 11, 2021

这个环境变量只对deepin-wine有效,检查你的/opt/apps/com.qq.weixin.deepin/files/run.sh使用的APPRUN_CMD是不是deepin-wine6-stable或者deepin-wine5?

如果是的话应该没问题。你也可以试试删除wine容器路径重新初始化 rm -fr ~/.deepinwine/Deepin-WeChat/

@choyy
Copy link

choyy commented Dec 12, 2021

@vufa 建议把这个方法加入README

@CyrusYip
Copy link
Contributor Author

@abcfy2 我的 /opt/apps/com.qq.weixin.deepin/files/run.sh 里面的是 deepin-wine5

export APPRUN_CMD="deepin-wine5"

删除容器之后重新初始化,现在 dpi 变成 150% 了,谢谢!

@WWWzq-01
Copy link

@abcfy2 我的 /opt/apps/com.qq.weixin.deepin/files/run.sh 里面的是 deepin-wine5

export APPRUN_CMD="deepin-wine5"

删除容器之后重新初始化,现在 dpi 变成 150% 了,谢谢!

我想问问重新初始化就是重新安装嘛

@CyrusYip
Copy link
Contributor Author

@WWWzq-01 是执行 rm -fr ~/.deepinwine/Deepin-WeChat/ 之后再打开微信。

@276562578
Copy link

我的run.sh是

export APPRUN_CMD="deepin-wine6-stable"

但只有winecfg能调节,删除rm -fr ~/.deepinwine/Deepin-WeChat/ 之后重新安装无效

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants