.Xresources 无法在屏幕中没有分散的窗口

发布于 2024-07-18 15:40:15 字数 1318 浏览 5 评论 0原文

初始问题:当我在屏幕内的 Vim 中使用 vspilt 时没有分散的窗口

尝试解决问题:

  1. 不可能:增加显示刷新Mac 终端代码向
  2. .Xresources 添加内容的

比率alt text http://dl.getdropbox .com/u/175564/bugWithScreen.png

Unix Power Tools -book 说这个问题可以在.Xresources 中解决。 但是,它没有具体说明如何进行。

我已将以下代码收集到我的 .Xresources 中

     mrxvt*scrollBar: true 
     mrxvt*loginShell: true
     mrxvt*syncTabTitle: true
     mrxvt*font: Monaco
     mrxvt*faceSize: 11 
     mrxvt*xft: True
     mrxvt*xftFont: Monaco
     mrxvt*xftSize: 12 
     mrxvt*xftAntialias: True
     mrxvt*termName: xterm-256color

     XTerm*VT100.metaSendsEscape: True                                                                                                                                                                        

     # translations used to coordinate xterm with xcilpboard
     # Unix Power Tools: p.117
     *VT100.Translations: #override\
         Button1 <Btn3Down>: select-end(primary,CUT_BUFFER0,CLIPBOARD)\n\
         !Shift <Btn2Up>: insert-selection(CLIPBOARD)\n\
         ~Shift ~Ctrl ~Meta <Btn2Up>: insert-selection(primary,CUT_BUFFER0)

Inital Problem: to have no scattered windows when I use vspilt in Vim inside Screen

Attemps to solve the problem:

  1. Impossible: to increase the Display Refreshing Rate for Mac's terminal code
  2. to add something to .Xresources

alt text http://dl.getdropbox.com/u/175564/bugWithScreen.png

Unix Power Tools -book says that the problem can be solved in .Xresources.
However, it does not specify exacly how.

I have collected the following codes to my .Xresources

     mrxvt*scrollBar: true 
     mrxvt*loginShell: true
     mrxvt*syncTabTitle: true
     mrxvt*font: Monaco
     mrxvt*faceSize: 11 
     mrxvt*xft: True
     mrxvt*xftFont: Monaco
     mrxvt*xftSize: 12 
     mrxvt*xftAntialias: True
     mrxvt*termName: xterm-256color

     XTerm*VT100.metaSendsEscape: True                                                                                                                                                                        

     # translations used to coordinate xterm with xcilpboard
     # Unix Power Tools: p.117
     *VT100.Translations: #override\
         Button1 <Btn3Down>: select-end(primary,CUT_BUFFER0,CLIPBOARD)\n\
         !Shift <Btn2Up>: insert-selection(CLIPBOARD)\n\
         ~Shift ~Ctrl ~Meta <Btn2Up>: insert-selection(primary,CUT_BUFFER0)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暮年慕年 2024-07-25 15:40:15

当您运行 Tlist 或重新连接到先前打开的会话时是否会发生这种情况?

如果是后者(并且您的窗口大小有所不同),则可能是因为启动时使用的选项屏幕。 尝试使用这些选项“-aADR”启动屏幕。 “-a”和“-A”将强制屏幕在重新连接时重绘。

Is this occurring when you run Tlist, or when reconnecting to a previously opened session?

If it's the latter (and your window size varies), it may be because of the options screen was launched with. Try launching screen with these options "-aADR". "-a" and "-A" will force screen to redraw upon reconnection.

英雄似剑 2024-07-25 15:40:15

~/.Xresources 的解析是在 X11 服务器启动时完成的,作为 X11 会话初始化脚本的一部分。 如果您编辑 ~/.Xresources,则需要使用 xrdb(1) 加载新文件以告知正在运行的 X11 服务器有关更改的信息。

请注意,默认情况下 xrdb(1) 将替换当前资源而不是覆盖它们,并且默认从 stdin 读取,因此不要在没有参数的情况下调用它! 因此,您想使用

xrdb -merge ~/.Xresources

来加载更改的文件。您可以使用

xrdb -query

来查看已加载的内容。

对于 Mac,我不知道 ~/.Xresources 可能会在何时何地查看什么内容; 因为 X11 的东西是一个运行以使用显示器的程序,而不是所有图形的主人,所以它可能相当小,并且默认情况下不这样做。 xrdb -query 会有所帮助。

可能有帮助的一件事是将 XAPPLRESDIR 设置为导出的 shell 变量; MacOS 中的某个地方有一些旋钮可以将环境变量设置为会话,所有程序都可以看到它,而无需点击用户 shell,但我忘记了在哪里(在设置 SSH 钥匙串时找到了它)。 XAPPLRESDIR 是一个 env 变量,用于指向用户自己的应用程序资源覆盖。 它的值应该是一个目录(例如 $HOME/share/xapps/)。 每个与 X Intrinsics 库 (libXt) 链接的 X11 应用程序都会在 X11 初始化时在该目录中查找与应用程序类名匹配的文件。 这样就不用担心加载资源等问题; 编辑app文件,启动程序。

因此 xterm 的资源进入文件 XTerm 等; 要找出任意程序的类,您可以使用不带参数的 xprop(1),在指针为十字线时单击目标窗口,然后从 xprop 中查看 stdout 以获取 WM_CLASS 属性。 对于一些较旧的工具(例如 xterm),您还可以使用 editres(1) 来通过远程检查以交互方式查看正在运行的 X 应用程序的小部件; 有一个“获取树”菜单项,可让您单击目标应用程序,还有另一个菜单项可显示类名称。

我自己,我的 ~/share/xapps/XTerm 文件将菜单背景颜色设置为丑陋的黄色; 这样,当我在 XTerm 中control--click时,我会立即知道是否出现问题并且我的资源未加载。

#ifdef COLOR
XTerm.SimpleMenu*background: yellow
#endif

Parsing of ~/.Xresources is done when the X11 server is started, as part of the X11 session init scripts. If you edit ~/.Xresources then you need to use xrdb(1) to load in the new file to tell the running X11 server about the changes.

BEWARE that xrdb(1) will, by default, replace the current resources instead of overwriting them and read from stdin is the default, so don't invoke it with no parameters! So you want to use

xrdb -merge ~/.Xresources

to load the changed file in. You can use

xrdb -query

to see what's already loaded.

For the Mac, I don't know what, where or when, might be looking at ~/.Xresources; because the X11 stuff is a program run to use the display, rather than the master of everything graphical, it might be rather minimal and not doing so by default. xrdb -query will help.

One thing that might help is to instead set XAPPLRESDIR as an exported shell variable; there's some knob somewhere in MacOS to set environment variables as a session thing, visible to all programs without hitting the user shell, but I forget where (found it when setting up the SSH Keychain once). XAPPLRESDIR is an env variable variable to point to a user's own overrides of application resources. It's value should be a directory ($HOME/share/xapps/ for instance). Every X11 application linked against the X Intrinsics library (libXt) will, at X11 init time, look in that directory for files matching the application class name. This way, you don't need to worry about loading resources, etc; edit the app file, start the program.

So resources for xterm go into a file XTerm, etc; to find out the class of an arbitrary program, you might use xprop(1) with no arguments, click in the target window while the pointer is a cross-hair and then look at stdout from xprop for the WM_CLASS property. For some older tools like xterm you can also use editres(1) to be able to interactively view the widgets of a running X application via remote inspection; there's a Get Tree menu item, to let you click on the target app and another menu item to show the class names.

Myself, my ~/share/xapps/XTerm file sets the menu background colour to a hideous yellow; that way, when I control-<left|middle|right>-click in an XTerm I immediately know if something is wrong and my resources weren't loaded.

#ifdef COLOR
XTerm.SimpleMenu*background: yellow
#endif
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文