centos - 错误 'bad pad value "2m": must be positive screen distance' when using tk_messageBox on a wayland display (CentOS)

标签 centos tcl tk wayland

我的 Tcl 脚本在 Ubuntu 上运行良好,但现在我已将一个脚本复制到 CentOS Linux 8 并收到上述错误。
即使我刚开始希望并输入 tk_messageBox 命令,也会出现错误。
安装的版本是 tk.x86_64 1:8.6.8-1.el8
有没有办法解决这个错误?

最佳答案

在 Wayland 上,您必须设置 tk scaling手动。
我有这样的代码来设置默认值:

  # fedora 25 has a bug where 'Inf' is returned
  # but once set is ok...
  set tkscale [tk scaling]
  if { $tkscale eq "Inf" } {
    tk scaling -displayof . 1.3333
    set tkscale 1.3333
  }
我的评论不正确,它应该说 Tcl 在
屏幕尺寸为 0。
我找到了我打开的票:
https://core.tcl-lang.org/tk/tktview?name=2524085333

关于centos - 错误 'bad pad value "2m": must be positive screen distance' when using tk_messageBox on a wayland display (CentOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64027429/

相关文章:

linux - 不同 rsyslog 设施上的多个 apache 虚拟主机

centos - 在 centos 中设置 Docker_Opts

php - Laravel 5.2 .htaccess 和 500 内部错误

tcl - 使用 Tk Tcl 捕获对 'x' 按钮的点击

linux - 在内部使用AWK命令包装TCL/TK文件

laravel - 在服务器上运行 Cboden Ratchet Websocket

tcl - 读取tcl中的缓冲流

windows - 为什么tcl期望意外退出?

format - TCL:将负整数转换为十六进制?

r - 使用 tcltk 在 R 脚本中添加弹出文本框