2

In KDE there's a setting Scale factor:

enter image description here

enter image description here

(image source)

Once Scale is set this way -- it is found in ~/.config/kdeglobals:

[KScreen]
ScaleFactor=1
ScreenScaleFactors=eDP-1=1;HDMI-1=1;

This scale affects all programs which are started after it has been set.

I have an app, where I can't find a way to control font size. So I set the scale to 1.4, run that app, and set the scale back to 1. It works, but it is tedious.

If I set the scale to 1.4 thru the dialog above, the only changes I notice are

[KScreen]
ScaleFactor=1.4
ScreenScaleFactors=eDP-1=1.4;HDMI-1=1.4;

However, if I set these manually (that is using text editor instead of the dialog) -- they don't affect the programs I'm starting. So, obviously, it has to be a call to dbus or something like this.

Do you happen to know a way to set scale with a CLI call? I'd call it to set scale to 1.4, start the troubling app, and call it again to set scale back to 1.

Edit

Found

qdbus org.kde.KScreen

using qdbusviewer. However, I don't see setScaleFactor there.

Edit 2

I'm using Kubuntu 17.04, but I guess that this option has been around from about 15.04.

Adobe
  • 3,791
  • 4
  • 28
  • 46
  • I think `xrandr ` has been replaced by `kscreen`, I am using probably a different version of Kubuntu, I use 16.04.2. This will make my answer probably pretty useless. Please let me know which version you use, so I can install the same version for further testing and have the chance to edit my answer. Thanks... – mook765 May 05 '17 at 07:22
  • @mook765 See *edit 2*. – Adobe May 05 '17 at 07:30

1 Answers1

2

I dont know a method to scale only a single window, but you can use the command xrandr.

First use the command without options to see the name of the output-device, then use the options --output and --scale. Here an example:

mook@MookPC:~$ xrandr
Screen 0: minimum 8 x 8, current 1366 x 768, maximum 32767 x 32767
VGA1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 410mm x 230mm
   1366x768      59.79*+
   1024x768      75.08    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    60.00  
   720x400       70.08  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

mook@MookPC:~$ xrandr --output VGA1 --scale 1.4x1.4
mook@MookPC:~$ xrandr --output VGA1 --scale 1.0x1.0

A restart is not required.

mook765
  • 14,911
  • 5
  • 35
  • 67
  • Thanks. However it worse than setting KScreen's ScaleFactor because xrandr scales all windows. KScreen method allows to scale a single window -- only I'm looking for a way to do it from CLI. – Adobe May 05 '17 at 07:26