Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-01-31 18:15:37

Mitt
Member
Registered: 2014-08-05
Posts: 26

Change window sizes

Hi,

I created something like control centre by putting necessary items in Settings Manager and I would like to have Settings Manager window bigger on opening, like in Mate, or even fullscreen, any thoughts?

Thanks

Offline

#2 2015-01-31 20:18:41

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Change window sizes

When xfce4-settings-manager starts, it uses it's last saved geometry settings. They are stored here:

xfconf-query -c xfce4-settings-manager -p /last/window-width
xfconf-query -c xfce4-settings-manager -p /last/window-height

...you can also view them through the settings editor.

If you want it to start a specific dimension, just set those values first:

xfconf-query -c xfce4-settings-manager -p /last/window-width -s 1366
xfconf-query -c xfce4-settings-manager -p /last/window-height -s 768

In fact, to automate this, create a new "xfce4-settings-manager" executable in /usr/local/bin, that looks something like this:

#!/bin/bash
xfconf-query -c xfce4-settings-manager -p /last/window-width -s 1366
xfconf-query -c xfce4-settings-manager -p /last/window-height -s 768
/usr/bin/xfce4-settings-manager

...and make the file executable. It will take precedence over the real xfce4-settings-manager executable, set the dimensions, then execute the real file.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2015-02-01 12:58:01

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: Change window sizes

ToZ wrote:

When xfce4-settings-manager starts, it uses it's last saved geometry settings. They are stored here:

xfconf-query -c xfce4-settings-manager -p /last/window-width
xfconf-query -c xfce4-settings-manager -p /last/window-height

...you can also view them through the settings editor.

If you want it to start a specific dimension, just set those values first:

xfconf-query -c xfce4-settings-manager -p /last/window-width -s 1366
xfconf-query -c xfce4-settings-manager -p /last/window-height -s 768

In fact, to automate this, create a new "xfce4-settings-manager" executable in /usr/local/bin, that looks something like this:

#!/bin/bash
xfconf-query -c xfce4-settings-manager -p /last/window-width -s 1366
xfconf-query -c xfce4-settings-manager -p /last/window-height -s 768
/usr/bin/xfce4-settings-manager

...and make the file executable. It will take precedence over the real xfce4-settings-manager executable, set the dimensions, then execute the real file.

Doesn't work,  I tried different things

Offline

#4 2015-02-01 13:26:30

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Change window sizes

Mitt wrote:

Doesn't work,  I tried different things

Like what?

Did you try it manually? Did you create the file? Is it executable?

Can you post back the results of:

xfconf-query -c xfce4-settings-manager -p /last/window-width
xfconf-query -c xfce4-settings-manager -p /last/window-height

Can you post back the contents of the file and a listing of its permissions?

Also, which version of Xfce are you using?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2015-02-01 13:43:48

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: Change window sizes

ToZ wrote:
Mitt wrote:

Doesn't work,  I tried different things

Like what?

Did you try it manually? Did you create the file? Is it executable?

Can you post back the results of:

xfconf-query -c xfce4-settings-manager -p /last/window-width
xfconf-query -c xfce4-settings-manager -p /last/window-height

Can you post back the contents of the file and a listing of its permissions?

Also, which version of Xfce are you using?

4.10.1, I created an executable in /usr/local/bin with window size 1150x600 so this is the output, in root it didn't have xfce4-settings-manager channel, so I added it.
Here's that exec:

#!/bin/bash
xfconf-query -c xfce4-settings-manager -p /last/window/width -s 1150
xfconf-query -c xfce4-settings-manager -p /last/window/height -s 600
/usr/bin/xfce4-settings-manager

chmod +x = chmod 755

Offline

#6 2015-02-01 15:56:39

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Change window sizes

Mitt wrote:
#!/bin/bash
xfconf-query -c xfce4-settings-manager -p /last/window/width -s 1150
xfconf-query -c xfce4-settings-manager -p /last/window/height -s 600
/usr/bin/xfce4-settings-manager

The property settings are incorrect. They should be "/last/window-width" and "/last/window-height" (note the dash instead of the slash).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2015-02-01 17:10:11

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: Change window sizes

ToZ wrote:
Mitt wrote:
#!/bin/bash
xfconf-query -c xfce4-settings-manager -p /last/window/width -s 1150
xfconf-query -c xfce4-settings-manager -p /last/window/height -s 600
/usr/bin/xfce4-settings-manager

The property settings are incorrect. They should be "/last/window-width" and "/last/window-height" (note the dash instead of the slash).

It's a typo, in that file I have with dash. I'm typing from smartphone, because of horrible internet (router that has 1970 year in system settings and you can't change it) so I can't post messages from my machine.

Offline

#8 2015-02-01 17:16:01

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Change window sizes

Can you first try it as a regular user, to see if it works (it works fine here running as root, though I did have to create the properties in the root account).

Can you also post back:

xfconf-query -c xfce4-settings-manager -p /last/window-width
xfconf-query -c xfce4-settings-manager -p /last/window-height

- as a regular user
- while logged in as as root
- running the commands using sudo

BTW, how are running this as root? Are you logging in as root, or sudo'ing in?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2015-02-01 17:39:23

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: Change window sizes

ToZ wrote:

Can you first try it as a regular user, to see if it works (it works fine here running as root, though I did have to create the properties in the root account).

Can you also post back:

xfconf-query -c xfce4-settings-manager -p /last/window-width
xfconf-query -c xfce4-settings-manager -p /last/window-height

- as a regular user
- while logged in as as root
- running the commands using sudo

BTW, how are running this as root? Are you logging in as root, or sudo'ing in?

I tried it logging in as root, tried via sudo.
Output is 1150 for width and 600 for height the same in root, sudo and my account.

Last edited by Mitt (2015-02-01 17:40:17)

Offline

#10 2015-02-01 17:46:33

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Change window sizes

While logged in as root, what does the following return?

xfconf-query -c xfce4-settings-manager -p /last/window-width
xfconf-query -c xfce4-settings-manager -p /last/window-height

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2015-02-01 17:56:25

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: Change window sizes

ToZ wrote:

While logged in as root, what does the following return?

xfconf-query -c xfce4-settings-manager -p /last/window-width
xfconf-query -c xfce4-settings-manager -p /last/window-height

as I said, 1150 and 600

Offline

#12 2015-02-01 18:13:23

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Change window sizes

Hmmm.

Just fired up an older version 4.10 of Xfce and yup, it doesn't work. Then I found this: http://git.xfce.org/xfce/xfce4-settings … 3f6565a323. Looks like it was added to version 4.11.1 - which is later than the version that you are running. Sorry about that.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#13 2015-02-01 19:00:22

Mitt
Member
Registered: 2014-08-05
Posts: 26

Re: Change window sizes

ToZ wrote:

Hmmm.

Just fired up an older version 4.10 of Xfce and yup, it doesn't work. Then I found this: http://git.xfce.org/xfce/xfce4-settings … 3f6565a323. Looks like it was added to version 4.11.1 - which is later than the version that you are running. Sorry about that.

Alright, thank you, I thought there were only 4.8, 4.10 and 4.12 that was never released. What is that code? I can understand only some C lines.

Offline

#14 2015-02-01 19:06:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Change window sizes

Mitt wrote:

Alright, thank you, I thought there were only 4.8, 4.10 and 4.12 that was never released.

True, but you can still build from the git tree. Some distros actually package 4.10 plus cherry-picked enhancements to make it like a 4.10+ or 4.11 release.

What is that code? I can understand only some C lines.

The code actually adds the capability to use the xfconf system to save, load and use the geometry parameters.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#15 2015-02-01 19:18:11

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: Change window sizes

you could also use wmctrl to maximize that window eg:

#!/bin/sh
LANG=C xfce4-settings-manager  &
sleep 0.4
wmctrl -r Settings -b toggle,maximized_vert,maximized_horz

Offline

Board footer

Powered by FluxBB