OpenBOX Openbox: let rc.xml program execution settings be the same as the X.org root screen

While trying to create a default xterm menu screen for different computers, I noticed that executing an xterm from within openbox causes the output window specs to be different than from X.org itself. It seems to become a much larger 4:3 window from openbox...
Example: starting an xterm with font size 30 with a configured openbox keyboard shortcut results in a different xterm than when running the identical command in X.org from a terminal.
Who knows where I can find the screen configuration of openbox that causes this to be different? Why is it different?
 
I have xterm settings in .Xresources and in .xinitrc I have xrdb -merge ~/.Xresource and I do not have problems in Openbox and in JWM.
The .Xresources values have to do with it?
No problems either but I'm trying to start a program in a window that has the same monitor-relative dimensions on different systems. 80x25 in fullscreen xterms everywhere would be nice. Starting from openbox or a terminal program shouldn't cause different window sizes. (As far as I know, at least. Does openhox have its own output screen properties? What does it pass to X when a program has to be executed?)
 
Its probably something in your /user/.config/openbox/rc.xml that needs tweaking.

<size>
# the size to make the window.
<width>20</width>
# a number like 20, or 'default' to use the size given by the application.
# you can use fractions such as 1/2 or percentages such as 75% in which
# case the value is relative to the size of the monitor that the window
# appears on.
<height>30%</height>
</size>
 
In openbox I open the alacritty terminal. I configure said terminal in $HOME/.config/alacritty/alacritty.toml. Previously, I used urxvt which I *think* had a default size of 80x24, and I had some stuff configured in $HOME/.Xdefaults but not the geometry, only fonts and foreground/background. I don't see anything like what Phishfry showed about size to make the window. However, this is VERY old rc.xml that has been taken from machine to machine through the ages, probably from 2008 or so. That is, it's a config that I'd save and when installing a new machine, copy it there.
 
In openbox I open the alacritty terminal. I configure said terminal in $HOME/.config/alacritty/alacritty.toml. Previously, I used urxvt which I *think* had a default size of 80x24, and I had some stuff configured in
Same here, I think my version is 15 years old or so but since openbox is very senstive about the config file and crashes on the tiniest error, I assume it's good. It's also really long. Maybe I have to merge all my custom settings with a recent default file.
 
I can only tell you my experience. What I've found is that if there's an error, something like a custom keyboard shortcut might not work. Then, I kill X and look for the error---but again, this hasn't happened in possibly years. So, in my experience, it will start,but things below the error might not work. As MG says, it's a long file. Mine is 954 lines, and every time I think of of doing what MG mentions, merging with a default, I say to myself, "Self? Nahhh". Actually on my main machine I'm using the tiling dwm but my secondary machine as well as laptops use openbox. Sometimes fluxbox if I feel like a change. (Flux's file is a LOT simpler)
 
I'm like scottro, I've been running openbox with the same configs for years. I do try to stick to core apps, particualary in OpenBSD where they have been audited, leading to an approach where I attempted to configure xterm to mostly work like urxvt.
I'll also point out that .Xdefaults and .Xresources function the same with the exception that .Xresources has to be specifically invoked.

My .Xdefault for xterm:
Code:
XTerm*termName: xterm-256color
XTerm*background: #161E2A
XTerm*foreground: white
XTerm*scrollBar: true
XTerm*rightScrollBar: true
XTerm*multiScroll: on
XTerm*jumpScroll: on
XTerm*locale: true
XTerm*faceName: DejaVuSansMono
XTerm*faceSize: 16
XTerm*eightBitInput: true
XTerm*pointerShape: left_ptr
XTerm*showBlinkAsBold: true
XTerm*colorBDMode: true
XTerm*ActiveIcon: true
XTerm*scrollbar.foreground: #2A3144
XTerm*scrollbar.background: #5D5D67
XTerm*scrollbar.thumb: black
XTerm*VT100.scrollbar.translations:  #override \n\
        <Btn5Down>:     StartScroll(Forward) \n\
        <Btn1Down>:     StartScroll(Continuous) MoveThumb() NotifyThumb() \n\
        <Btn4Down>:     StartScroll(Backward) \n\
        <Btn1Motion>:   MoveThumb() NotifyThumb() \n\
        <BtnUp>:        NotifyScroll(Proportional) EndScroll()
XTerm*VT100.color1: #2F4F4F
 
I'm a OpenBox user, no problem in my setup. xterm windows and font have the same size when opened from OpenBox keyboard shortcut or command line.

The color faded xterm window in the image down below is opend with the grep'ed openbox/rc.xml keyboard shortcut, the top layer xterm window is opend from command line.

Nothing xterm related in ~/.Xdefaults.

I would try the OpenBox key shortcut and command line execution from a fresh created or pristine user account, with a default rc.xml, copied from/usr/local/etc/xdg/openbox/rc.xml.sample.

xterm-openbox.png
 
Back
Top