Hello, In the Unix environment, I open a window by x11(). May I specify the position of this window by specifying the position of the top left of the window as in Windows environment? Or some other parameters can be used to do that? Thank you, Shengzhe
Help: x11 position in the Unix environment
3 messages · Shengzhe Wu, Marc Schwartz (via MN), Barry Rowlingson
On Mon, 2005-09-26 at 17:45 +0200, Shengzhe Wu wrote:
Hello, In the Unix environment, I open a window by x11(). May I specify the position of this window by specifying the position of the top left of the window as in Windows environment? Or some other parameters can be used to do that? Thank you, Shengzhe
I don't believe so. In general, under Unix/Linux, the Window Manager determines window positioning upon startup unless the application overrides this behavior. Some applications let you specify application window positioning via command line 'geometry' arguments or via the use of an .Xresources file. Some WM's provide more or less functionality for this behavior relative to user customization. For example, Sawfish provides quite a bit, whereas Metacity hides much of it. You may want to check the documentation for the WM that you are using. There is also an application called Devil's Pie: http://www.burtonini.com/blog/computers/devilspie which provides additional Sawfish-like customization for window positioning, etc. However, this is global for a given window, not on a per instance basis. HTH, Marc Schwartz
Marc Schwartz (via MN) wrote:
I don't believe so. In general, under Unix/Linux, the Window Manager determines window positioning upon startup unless the application overrides this behavior. Some applications let you specify application window positioning via command line 'geometry' arguments or via the use of an .Xresources file.
Splus used to have extensive control of the graphics window via X resources - here's a chunk from an old Xresources file of mine: splus*background: blue splus*Canvas.height: 632 splus*Canvas.width: 800 splus*Command*background: red splus*Command*foreground: cyan splus*Label*background: cyan splus*Label*foreground: red splus*Text*background: #a0f splus*Text*foreground: yellow splus*colors: white black white 54 black - and so on and so forth. Sadly I dont think such customisation is coded into R's X11 graphics window. Looking at the code there is no sign of it playing with X11's resource database. Shame. Baz