Xfce Forum

Sub domains
 

You are not logged in.

#1 2016-09-18 14:43:10

Przemas
Member
Registered: 2016-09-18
Posts: 18

Initial issues - moving windows, their positions, ICC

Hello there! Humbly admit I've neglected Xfce for far too long - I have finally taken a deeper dive and it seems that with some tweaks it gets the job done for me smile (on Fedora 24). Especially when coupled with compton.
There are some issues I'm having trouble solving - would greatly appreciate tips from someone more experienced with XFCE.

1. Window positions - not all window positions are remembered (I'm running a multi screen setup and it is a major pain). I've read that sadly it is expected - is that correct? Can you make those unruly windows remember the position somehow?

2. Moving windows / apps between screens. Can't find a way to do it. Ideally there would be a shortcut that would move window to the next screen. Is it achievable somehow?
This coupled with issue 1 is a really annoying thing for me. Lets say the game starts and goes fullscreen - I'm not able to make it run on correct display.
It is even more painful in 3d graphics apps I use.

3. ICC profile. I see there is no color profiles setup in Xfce. Do you know any Linux application (prefarably with GUI, but in the worst case scenario can be a cli too - I'll set it once and will have it out of the way for at least half a year) that would allow me to assign color profiles for my monitors when I use Xfce?

4. One of the "unruly" apps I use is set up pretty badly on Linux. It does not have WM_CLASS set up (neither WM_ICON). Thus I don't see icon set in the .desktop file after I launch the app (see it in the menu, but not in the window list applet). On Cinnamon I've been able to get around it by launching the app with the --name option, which set up WM_CLASS. This trick does not work in Xfce though. Is there a workaround for Xfce ?

Offline

#2 2016-09-18 15:14:45

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,969

Re: Initial issues - moving windows, their positions, ICC

Hello and welcome.

Przemas wrote:

1. Window positions - not all window positions are remembered (I'm running a multi screen setup and it is a major pain). I've read that sadly it is expected - is that correct? Can you make those unruly windows remember the position somehow?

Xfce itself does not remember window positions. If an application is programmed to do so, it will work. Otherwise, you can use a program such as devilspie to force window positions.

2. Moving windows / apps between screens. Can't find a way to do it. Ideally there would be a shortcut that would move window to the next screen. Is it achievable somehow?

Have a look at this script.

This coupled with issue 1 is a really annoying thing for me. Lets say the game starts and goes fullscreen - I'm not able to make it run on correct display.
It is even more painful in 3d graphics apps I use.

I'm not sure about full-screen apps. You could try with devilspie and specifying a geometry that puts it on the second screen.

3. ICC profile. I see there is no color profiles setup in Xfce. Do you know any Linux application (prefarably with GUI, but in the worst case scenario can be a cli too - I'll set it once and will have it out of the way for at least half a year) that would allow me to assign color profiles for my monitors when I use Xfce?

There is a recent post about colour profiles here. I don't have any experience with colour profiles but running "xcalib -d :0 /usr/share/color/icc/colord/Gamma5500k.icc" changes the colours on my system. Not sure what that means though.

4. One of the "unruly" apps I use is set up pretty badly on Linux. It does not have WM_CLASS set up (neither WM_ICON). Thus I don't see icon set in the .desktop file after I launch the app (see it in the menu, but not in the window list applet). On Cinnamon I've been able to get around it by launching the app with the --name option, which set up WM_CLASS. This trick does not work in Xfce though. Is there a workaround for Xfce ?

xfwm and the window buttons plugin use icons from EHWM properties. In the cases where I need to change these icons, I use the xseticon helper program. See this thread for more info.

Offline

#3 2016-09-18 17:42:14

Przemas
Member
Registered: 2016-09-18
Posts: 18

Re: Initial issues - moving windows, their positions, ICC

Thank you ToZ.

ToZ wrote:

Xfce itself does not remember window positions. If an application is programmed to do so, it will work. Otherwise, you can use a program such as devilspie to force window positions.

ouch. So window managment looks a tad tricky on Xfce hmm .
Looked at DevilsPie (and its successor). Don't know what exactly it does and how it works. Looks a tad complex - I hope that at least I can get moving the windows somehow. Shame there's not a gui for those. Will give a try when I find more time tough - looks quite powerful. If anyone knows easier solution please chime in.
Don't get me wrong - I can tweak config files etc , but I've just spent a weekend setting things up and it will be a while till I'll have time to delve into various cli apps and manuals hoping they might work sad . Daily duties take precedence.

Have a look at this script.

Tried it. Sadly does not work out of the box. Instead of moving the window to the next screen it gets moved into various places around all displays (both vertically and horizontally). I guess that something that is set in the script does not match my monitors resolutions (also that I have displays with different res might make things a tad trickier).

There is a recent post about colour profiles here. I don't have any experience with colour profiles but running "xcalib -d :0 /usr/share/color/icc/colord/Gamma5500k.icc" changes the colours on my system. Not sure what that means though.

In short and simplifying a tad - if you have profiles for your monitors calibrated to the same profile colors on them will be identical/close as you're trying to force them to match industry standard. Also if you have a calibrated printer what you see on the screen will match what you'll get printed. Quite crucial for graphics work (and also if differently tinted screens annoy you wink ).
Can't find docs for xcalib - it seems development of it finished quite a long time ago (can't open readme file on sourceforge, fails to load).
But I'm checking this one out, along with dispwin which is part of Argyll.
There's one question - as I have more than one monitor how do I pass profile to correct monitor.  Dispwin has "-display displayname"  or "-d n" options , but how can I get those names / numbers?

xfwm and the window buttons plugin use icons from EHWM properties. In the cases where I need to change these icons, I use the xseticon helper program. See this thread for more info.

This looks like an awesome solution. Hope I'll be able to work out as elegant start script as the one you did in the mentioned thread. Thank you!

Offline

#4 2016-09-18 18:03:35

Przemas
Member
Registered: 2016-09-18
Posts: 18

Re: Initial issues - moving windows, their positions, ICC

tried getting xseticon . Got this during make command hmm :
gcc -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I /usr/X11R6/include -c xseticon.c -o xseticon.o
xseticon.c:31:16: fatal error: gd.h: No such file or directory

Offline

#5 2016-09-18 19:53:08

Przemas
Member
Registered: 2016-09-18
Posts: 18

Re: Initial issues - moving windows, their positions, ICC

Thanks to the help over Fedora forums I was able to install a missing piece and got xseticon compile and install smile .

@ToZ : your solution with xseticon is awesome. I've tweaked timing in your script and now icon gets assigned correctly.
Almost perfect! There's only small annoyance left with it. I have modified .desktop file so it now directs to the .sh script . It works. But the app is set to open certain filetypes (I've set mimetypes). After redirecting to .sh script double clicking on such filetype opens the app , but does not open a given file.
Is there a way to tweak the things so the appropriate parameter gets passed and opening files works again?

Offline

#6 2016-09-18 21:25:15

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,969

Re: Initial issues - moving windows, their positions, ICC

Przemas wrote:

Thank you ToZ.

ToZ wrote:

Xfce itself does not remember window positions. If an application is programmed to do so, it will work. Otherwise, you can use a program such as devilspie to force window positions.

ouch. So window managment looks a tad tricky on Xfce hmm .

Xfwm uses a different concept - smart placement - when it comes to window placement. It also allows a program to set its own window position if its programmed to do so.

Looked at DevilsPie (and its successor). Don't know what exactly it does and how it works. Looks a tad complex - I hope that at least I can get moving the windows somehow. Shame there's not a gui for those. Will give a try when I find more time tough - looks quite powerful. If anyone knows easier solution please chime in.

Here is a quick devilspie primer:
1. Install devilspie.
2. Create a ~/.devilspie folder.
3. Create separate ds file for every application you want to manage. For example, I want mousepad to start in the top right of my screen with a dimension of 500x500. I would use a geometry string of "500x500-0+0". The first minus -0 start the x position from the right, 0 pixels in and the +0 means start the y position from the normal top position 0 pixels in. Therefore, I would create a mousepad.ds file with the following content:

(if
        (matches (window_class) "Mousepad")
        (begin
                (geometry "500x500-0+0")
        )
)

This means, if the window class matches on the string "Mousepad", the set the geometry as "500x500-0+0".
4. Start up devilspie and start mousepad and watch the magic happen.
5. You can then use any geometry string for any application. For firefox, using "500x500+100+100" will force firefox to open at a size of 500x500 at x position 100 and y position 100.

Note: I believe there is a graphical GDevilspie application that allows to configure devilspie from a graphical interface.

Have a look at this script.

Tried it. Sadly does not work out of the box. Instead of moving the window to the next screen it gets moved into various places around all displays (both vertically and horizontally). I guess that something that is set in the script does not match my monitors resolutions (also that I have displays with different res might make things a tad trickier).

Unfortunately I don't have a second monitor with me today. I'll test it tomorrow when I'm at work.

There is a recent post about colour profiles here. I don't have any experience with colour profiles but running "xcalib -d :0 /usr/share/color/icc/colord/Gamma5500k.icc" changes the colours on my system. Not sure what that means though.

In short and simplifying a tad - if you have profiles for your monitors calibrated to the same profile colors on them will be identical/close as you're trying to force them to match industry standard. Also if you have a calibrated printer what you see on the screen will match what you'll get printed. Quite crucial for graphics work (and also if differently tinted screens annoy you wink ).
Can't find docs for xcalib - it seems development of it finished quite a long time ago (can't open readme file on sourceforge, fails to load).
But I'm checking this one out, along with dispwin which is part of Argyll.

There's one question - as I have more than one monitor how do I pass profile to correct monitor.  Dispwin has "-display displayname"  or "-d n" options , but how can I get those names / numbers?

Running "xrandr" will let you see the exact numbers, but it uses the term "Screen" instead of display.

Thanks to the help over Fedora forums I was able to install a missing piece and got xseticon compile and install smile .
@ToZ : your solution with xseticon is awesome. I've tweaked timing in your script and now icon gets assigned correctly.
Almost perfect! There's only small annoyance left with it. I have modified .desktop file so it now directs to the .sh script . It works. But the app is set to open certain filetypes (I've set mimetypes). After redirecting to .sh script double clicking on such filetype opens the app , but does not open a given file.
Is there a way to tweak the things so the appropriate parameter gets passed and opening files works again?

Interesting. Try this - name the script file the same name as the executable but put it in /usr/local/bin (most executables end up in /usr/bin). /usr/local/bin takes precedence when searching for an executable and it will be launched in lieu of the real one when you click on a document.

Offline

#7 2016-09-18 21:58:12

Przemas
Member
Registered: 2016-09-18
Posts: 18

Re: Initial issues - moving windows, their positions, ICC

You rock ToZ. Will get back to playing with those tomorrow. One last not for today:

Interesting. Try this - name the script file the same name as the executable but put it in /usr/local/bin (most executables end up in /usr/bin). /usr/local/bin takes precedence when searching for an executable and it will be launched in lieu of the real one when you click on a document.

I'm pretty sure it is the script that launches as the icon gets assigned (so when proper mimetype is used assigned .desktop file is called and it launches the script). But it looks a filename is not getting passed through.

Offline

#8 2016-09-19 22:12:07

alcornoqui
Member
Registered: 2014-07-28
Posts: 487

Re: Initial issues - moving windows, their positions, ICC

Nice read.

Online

#9 2016-09-22 16:19:36

Przemas
Member
Registered: 2016-09-18
Posts: 18

Re: Initial issues - moving windows, their positions, ICC

still no clue how can I apply display color profile. Xrandr gives me following output:

Screen 0: minimum 8 x 8, current 4480 x 1440, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected 1920x1080+2560+0 (normal left inverted right x axis y axis) 509mm x 286mm
   1920x1080     60.00*+
   1600x900      60.00 
   1280x1024     75.02    60.02 
   1152x864      75.00 
   1024x768      75.03    60.00 
   800x600       75.00    60.32 
   640x480       75.00    59.94 
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
   2560x1440     59.95*+
   1920x1200     59.88 
   1920x1080     60.00    59.94    50.00    23.97    60.05    60.00    50.04 
   1680x1050     59.95 
   1600x1200     60.00 
   1280x1024     75.02    60.02 
   1280x800      59.81 
   1280x720      60.00    59.94    50.00 
   1152x864      75.00 
   1024x768      75.03    60.00 
   800x600       75.00    60.32 
   720x576       50.00    50.08 
   720x480       59.94    60.05 
   640x480       75.00    59.94    59.93 
DP-5 disconnected (normal left inverted right x axis y axis)


- so I don't see name s for specific display. Instead I have screen 0 which seems to encompass both monitors. Would love if you can shed some light on this.

Offline

#10 2016-09-22 17:02:45

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 5,969

Re: Initial issues - moving windows, their positions, ICC

Have you had a look at DisplayCal?

Offline

#11 2016-09-25 18:53:51

Przemas
Member
Registered: 2016-09-18
Posts: 18

Re: Initial issues - moving windows, their positions, ICC

ToZ , thank you - sadly I'm still struggling. I've tried DisplayCal , but seems there's an issue with Argyll backend it uses and nvidia drivers. When I try to load a profile I get:

We don't have access to the VideoLUT for loading

Arch wiki made me aware of xcalib that should do the trick, but I have no clue howto apply a profile for specific monitor with it. Xcalib profilename.icc applies profile to both of my screens which obviously is terrible - each monitors should get its own icc profile.

edit: here's a topic on Nvidia forums about problems with Argyll
https://devtalk.nvidia.com/default/topi … y-profile/

Last edited by Przemas (2016-09-25 18:55:42)

Offline

Board footer

Powered by FluxBB