Libreoffice Calc windowsize is 1x1 cm ..

355 views
Skip to first unread message

Dave

unread,
May 25, 2020, 3:19:03 PM5/25/20
to qubes-users
When i open libreoffice Calc in my work vm, the only thing i can see of the window is the "X" mark of the window.
So the window opens up like 1x1cm.. When i drag it bigger to a normal window size and restart calc, its back to a little 1x1 cm box and just showing the close window 'X'..
How can i get calc to open up normal window size ..?

unman

unread,
May 25, 2020, 8:11:21 PM5/25/20
to qubes-users
It's a known bug, not only restricted to libreoffice.
The best I can suggest is making sure that calc is large, but not full
screen, when closing - that seems to fix it for me (sometimes).

Dave

unread,
May 26, 2020, 10:26:27 PM5/26/20
to qubes-users
The first time after a fresh install calc opens normal, but after that i cant get it to open up bigger dan 1x1cm. Doesnt matter if i resize the window to whatever size before closing.But it only seems to affect calc, other apps from libreoffice open normal. Isnt it possible to force open it with specific window size perhaps..?

unman

unread,
May 26, 2020, 11:07:29 PM5/26/20
to qubes-users
On Tue, May 26, 2020 at 07:26:27PM -0700, Dave wrote:
> The first time after a fresh install calc opens normal, but after that i cant get it to open up bigger dan 1x1cm. Doesnt matter if i resize the window to whatever size before closing.But it only seems to affect calc, other apps from libreoffice open normal. Isnt it possible to force open it with specific window size perhaps..?
>

I also see this with xterm windows on occasioni, so not just a librecalc
issue.

palet...@gmail.com

unread,
May 28, 2020, 12:11:14 PM5/28/20
to qubes-users
I had the same problem. I used devilspie2 to solve it.

Install it to dom0:
sudo qubes-dom0-update devilspie2

then create a .lua file in .config/devilspie2 with the following text:

window = "LibreOffice";
windowname = get_window_name();
if (string.match(windowname, window)) then
    maximize();
end
 
Here is a nice tutorial about devilspie2, if you are interested: https://www.linux-magazine.com/Issues/2017/205/Tutorial-Devilspie2

Dave

unread,
May 28, 2020, 2:34:45 PM5/28/20
to qubes-users
Ok thanks for the tip, i just tested you suggestion and it resizes the window perfectly.
Do you autostart devilspie2 at boot .. or how do you use it ..?

palet...@gmail.com

unread,
May 28, 2020, 3:27:14 PM5/28/20
to qubes-users


Am Donnerstag, 28. Mai 2020 20:34:45 UTC+2 schrieb Dave:
Ok thanks for the tip, i just tested you suggestion and it resizes the window perfectly.
Do you autostart devilspie2 at boot .. or how do you use it ..?


 I start it via .desktop file in .config/autostart.

It really is a handy tool. I use it for other things like mapping domains to certain workspaces.

Steve Coleman

unread,
May 29, 2020, 6:29:52 PM5/29/20
to qubes-users
I loved the idea of the macros to manage the desktop in general as I would really like to pin Qubes Manager to desktop 1 and not have it start on whatever desktop the person last logged out from.  But that is obviously fixable now.

I did do a little digging into this LO window size issue just because I wanted to understand what was actually happening. I have had several VMs act up, but not all of them in the same way, so I dug deeper to see what the differences might be.

The answer is  that window size information is stored in the file: .config/libreoffice/4/user/registrymodifications.xcu

> grep ooSetupFactoryWindowAttributes .config/libreoffice/4/user/registrymodifications.xcu

This will give you several lines like:

<item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.sheet.SpreadsheetDocument']"><prop oor:name="ooSetupFactoryWindowAttributes" oor:op="fuse"><value>61,61,1807,982;5;38,56,1807,982;</value></prop></item>

By opening any Libreoffice app you can navigate to see/edit the same values from the Tools menu:
Tools
   Advanced
      click [Open Expert Configuration]
         Search for: "ooSetupFactoryWindowAttributes"
Then scroll right to see the values set for each component as a string value, eg:  "61,61,1807,982;5;38,56,1807,982;"

The window position values are specified as:
x-pos,y-pos,width,height ; window-state ; maximized-x-pos,maximized-y-pos,maximized-width,maximized-height ;

In my VMs that were broken (two pixel window size) this file was missing all but one ooSetupFactoryWindowAttributes line in this file, where as there were many lines, one for each libraOffice app in the working VMs. As a test, I cut-n-pasted the group of lines from a working VM into the broken xcu file using gedit and saved, and tried again. Everything worked! The window size problem was gone. So then I started looking more closely with gedit and meld to watch what was changeing.

As each LO app is run it adds its line to the xcu file with x-pos,y-pos,2,2,... as the default width,height values of only two pixels. Changing those values to any valid set of Width,Height numbers will make the window open with that predefined size. Upon exiting the app with any manually adjusted size does not save that new value back to the xcu file. Its width,height values are apparently read at the start and completely ignored on exit, even though the xcu file will be rewritten with many other modified values.  For instance if you open and manually resize the window and then click maximize just before before exiting then the 0,0 for the maximized-width,maximized-height will be updated to that new set of values but the origional width,height values will remain unchanged. It appears that manually editing these width,height values from 2,2 to 'something more reasonable' is the only way to perminantly change them.

Steve.






--
You received this message because you are subscribed to the Google Groups "qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/3e39d011-8d2b-474e-818a-ed0b6058ef40%40googlegroups.com.

Dave

unread,
Jun 3, 2020, 2:52:29 PM6/3/20
to qubes-users
thanks for your research and the extra info about the cause of the issue!
To unsubscribe from this group and stop receiving emails from it, send an email to qubes...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages