.Xresources无法在屏幕中显示分散的窗口 [英] Unable to have no Scattered windows in Screen by .Xresources

查看:122
本文介绍了.Xresources无法在屏幕中显示分散的窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

尝试解决该问题:

  1. 不可能:提高Mac终端代码的显示刷新率
  2. 向.Xresources添加内容
  1. Impossible: to increase the Display Refreshing Rate for Mac's terminal code
  2. to add something to .Xresources

替代文本http://dl.getdropbox.com/u/175564/bugWithScreen .png

Unix Power Tools -book说,该问题可以在.Xresources中解决. 但是,它没有明确说明如何.

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

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

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)

推荐答案

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

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.

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

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

查看已加载的内容.

对于Mac,我不知道〜/.Xresources是什么,什么地方,什么时候出现的.因为X11的东西是运行以使用显示器的程序,而不是所有图形的母版,所以它可能很小,并且默认情况下不这样做. xrdb -query会有所帮助.

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.

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

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.

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

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.

我自己,我的〜/share/xapps/XTerm文件将菜单背景色设置为可怕的黄色;这样,当我在XTerm中 control-< left | middle | right>-单击时,我立即知道是否出了问题并且没有加载我的资源.

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

这篇关于.Xresources无法在屏幕中显示分散的窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆