Window size confguration in LXDE (root prog.)

Please post all general support questions for LXDE here.
Locked
ludo0565
Posts: 11
Joined: Fri May 08, 2020 2:13 pm

Window size confguration in LXDE (root prog.)

Post by ludo0565 »

Hello everyone,

I use : PCManFM 1.3.1, on Debian 10.3 Buster, locale is French.

My aim is to open a gparted window in such a way that it uses the whole width of the screen (now it only uses half of it and I'm not satisfied with that) (but not the whole height - it uses about half of it and that's fine with me).

Here (https://doc.ubuntu-fr.org/tutoriel/open ... s_fenetres) I found help to configure the size of windows in LXDE.

My two questions :

1) Is it fine to have the following declaration in ~/.config/openbox/rc.xml (last section, of course) ?

<applications>
<!-- Places my application gparted -->
<application name="gpartedbin"
class="GParted"
role="*"
title="GParted"
type="normal">
<decor>yes</decor>
<shade>no</shade>
<position force="no">
<x>left</x>
<y>0</y>
<monitor>1</monitor>
</position>
<focus>yes</focus>
<desktop>1</desktop>
<layer>normal</layer>
<iconic>no</iconic>
<skip_pager>no</skip_pager>
<skip_taskbar>no</skip_taskbar>
<fullscreen>no</fullscreen>
<maximized>Horizontal</maximized>
</application>
</applications>

Or do I have any tiny little mistake anywhere ?

2) Am I right to suppose that I have to place this modification in the /root directory, as the programme is called by root (actually sudo with me) ?
Where (there is no such thing as /root/.config/openbox/rc.xml) ?
If not in the root directory, then where else ?

Thanks a lot for your information.

Ludo
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Window size confguration in LXDE (root prog.)

Post by drooly »

gparted needs to run with superuser privileges, but since your normal user's openbox is still handling the window I guess you need to edit your /home/ludo/.config/openbox/rc.xml (actually that path is slightly different on LXDE-systems, but it should be very similar).

Something like this:

Code: Select all

<application name="gpartedbin"
class="GParted"
title="GParted">
<position force="no">
<x>0</x>
<y>0</y>
<monitor>1</monitor>
</position>
<desktop>1</desktop>
<maximized>Horizontal</maximized>
</application>
You have to put this inside the <applications>...</applications> section of rc.xml.
Afterwards you need to reconfigure openbox.
Please refer to http://openbox.org/wiki/Help:Applications
ludo0565
Posts: 11
Joined: Fri May 08, 2020 2:13 pm

Re: Window size confguration in LXDE (root prog.)

Post by ludo0565 »

Hello drooly, hello everyone,

First of all thank you for your answer, drooly.
This makes all sense to me, and I'll try out the procedure, as soon as I get a little more time.
I'll let you know.

Till later.

Ludo
ludo0565
Posts: 11
Joined: Fri May 08, 2020 2:13 pm

Re: Window size config in LXDE (root prog.) - not the right solution yet

Post by ludo0565 »

Hello drooly, hello everyone,


I've just tried the solution you suggested and which I tended to believe is right.
Starting the file with firefox revealed no formatting mistakes, so I was hoping...
But unfortunately, it did not change anything (after an OB reconfig and a restart). :?

So I'm still very much open to other suggestions... ;-)

Many thanks in advance

Ludo
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Window size config in LXDE (root prog.) - not the right solution yet

Post by drooly »

ludo0565 wrote:Starting the file with firefox revealed no formatting mistakes, so I was hoping...
Firefox has nothing to do with it.
Please use a code editor (e.g. geany) to edit XML files.
But unfortunately, it did not change anything (after an OB reconfig and a restart). :?
No errors either?
Please show us the file in question.
Please remember that the actual file you need to edit might be a different one on your machine (I don't use LXDE, just plain openbox, and currently don't have a virtual machine to test it).
ludo0565
Posts: 11
Joined: Fri May 08, 2020 2:13 pm

Re: Window size confguration in LXDE (root prog.)

Post by ludo0565 »

Hello drooly, hello everyone,
No errors either?
No errors either - that's guaranteed.

I found ~/.config/openbox/rc.xml without any difficulty.
I can't enclose it: the forum system keeps telling me "Invalid extensionl" - no matter what extension I use (or none) !
I'll just copy the contents in the next post.
I even edited rc.xml one more time to test with evince .pdf reader : to see if this plain just normal user programme could behave the way I want (this time fully maximised) - nothing changed either (evince kept its - according to me - fully erratic behavior).

So I'm not much advanced... :(

Thanks anyway.

ludo
ludo0565
Posts: 11
Joined: Fri May 08, 2020 2:13 pm

Re: Window size confguration in LXDE (root prog.)

Post by ludo0565 »

<applications>
<application name="gpartedbin"
class="GParted"
title="GParted">
<position force="no">
<x>0</x>
<y>0</y>
<monitor>1</monitor>
</position>
<desktop>all</desktop>
<fullscreen>yes</fullscreen>
<maximized>true</maximized>
</application>
<application class="Evince">
<position force="no">
<x>0</x>
<y>0</y>
<monitor>1</monitor>
</position>
<desktop>all</desktop>
<fullscreen>yes</fullscreen>
<maximized>true</maximized>
</application>
</applications>
</openbox_config>
ludo0565
Posts: 11
Joined: Fri May 08, 2020 2:13 pm

Re: Window size confguration in LXDE (root prog.)

Post by ludo0565 »

Hello again drooly and everybody,

well, I thought that file is really a bit huge, so I only enclosed the <applications> part.

If you give me green light for enclosing the whole thing (it includes comments), I'll do it.
But even removing comments won't mean removing much...

See you later...

ludo
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Window size confguration in LXDE (root prog.)

Post by drooly »

Are you sure you're using the name, class and title attributes correctly?
You need to check beforehand with

Code: Select all

obxprop
It also seems you did not incorporate my previous suggestions, or check for the existence of an LXDE-specific rc.xml or read the openbox wiki on that subject.
ludo0565
Posts: 11
Joined: Fri May 08, 2020 2:13 pm

Re: Window size confguration in LXDE (root prog.)

Post by ludo0565 »

Hello everybody, hello drooly,

Oh, excuse me for the disturbance !

Best regards.

ludo
Locked