Resize desktop after resizing framebuffer


#1

Hello, I have x11vnc connection to sparky linux with no monitor attached. Desktop resolution is 1024x768. I resize framebuffer with “xrandr --fb 1920x1080”, it works, I can now place and resize windows in new, bigger framebuffer, but old desktop background remains in upper-left corner of new framebuffer and taskbar remains in old position, which now is roughly in the middle of the screen height. How to resize desktop to follow new framebuffer?


(Pedram Pourang) #2

That’s because Qt doesn’t react to xrandr’s panning; KDE has the same problem (See https://github.com/lxqt/lxqt/issues/1735).

As a workaround, stop and start Desktop and Panel from LXQt Session Settings → Basic Settings


#3

That worked, thank you! Can I do it from command line?


(Pedram Pourang) #4

For desktop:

pcmanfm-qt --quit
pcmanfm-qt --desktop --profile=lxqt

I don’t remember how lxqt-panel can be stopped without being killed – it doesn’t have a quit option.


#5

I have tried that, and clicking gui menus works better. Thank you again! I consider this topic solved.


(Pedram Pourang) #6

Oh, I remembered the panel stopping code. The panel can be stopped and started again in this way:

qdbus org.lxqt.session /LXQtSession stopModule lxqt-panel.desktop
lxqt-panel

NOTE: For a script, see below.


#7

Thank you very much. I had to install qdbus-qt5 for it. So far I have problems with consistent execution of these commands. I also have some problems with long reboot delay after executing of these commands, sometimes. So, script way or GUI way - this is so far inconclusive for me and I will be testing this more. I will let you know of results.


(Pedram Pourang) #8

& was missing in the commands of my previous comment; I added it.

Yes! I forgot to mention it.

The commands don’t have any effect on rebooting.

We had an old problem with menu-cached, which caused long delays with reboot but we fixed it by removing it from panel last year; the latest LXQt release doesn’t have that problem.


(Alf Gaida) #9

@tsujan - it has sometimes - depends on if menucached was active in pcmanfm-qt :smiley:


(Pedram Pourang) #10

@agaida You’re right.


(Pedram Pourang) #11

@foormanek Sorry, you were right about long delays. For now, do it with LXQt Session Settings.


#12

Adding ‘&’ did help with consistency. Reboot delay is still present, but the box eventually reboots. Now I can do it both ways and I am much happier anyway. Thank you!


(Pedram Pourang) #13

The reboot delay is my fault; sorry! It may be because the commands don’t start LXQt panel as a session module.

For now, I’m a little busy with a code but soon, I’ll find better commands and tell you about them.


#14

Waiting :))


(Pedram Pourang) #15

OK, I’m back.

The following Bash script does the job exactly like LXQt Session Settings and so, it has no side effect if run from inside LXQt:


#!/bin/bash

# restart desktop
qdbus org.lxqt.session /LXQtSession stopModule lxqt-desktop.desktop
sleep 3
qdbus org.lxqt.session /LXQtSession startModule lxqt-desktop.desktop &
# restart panel
qdbus org.lxqt.session /LXQtSession stopModule lxqt-panel.desktop
sleep 3
qdbus org.lxqt.session /LXQtSession startModule lxqt-panel.desktop &

exit

Please note that the sleep lines are needed. I set them to 3 sec for the sake of certainty but you could also experiment with smaller values.


#16

It works, reboot time is normal. I just added “xrandr --fb 1920x1080” with sleep 3 at the top and now I have very convenient one click solution. I will keep sleep at 3, that was also my choice when testing previous commands. Once more, thank you very much, I could not wish for better support ever!


(Pedram Pourang) #17

You’re welcome.