Results 1 to 1 of 1

Thread: 7.4.2 - KDE fine tuning - windows border and snap

  1. #1
    Member registered user
    Join Date
    Oct 2004
    Posts
    32

    7.4.2 - KDE fine tuning - windows border and snap

    In Knoppix 7.4.2, I personally use LXDE as a session manager, with pcmanfm as desktop manager and Kwin as window manager (instead of the default metacity).

    Because of that, I eventually noticed a strange behaviour of Kwin: when activating window snap (with 20 pixel snap range in my particular case) if I move a window towards the left or right edge of the desktop, the window will snap to desktop edges but the window border will be positioned outside the desktop.

    One thing I don't like about that is that it looks really dumb.
    The other thing is that I lose the option of grabbing that border and resizing the window towards the center of the desktop.

    (OK, some will tell me that there's no point in doing that, but I say the more options you have the more free you are. And since KDE boasts with a "Be Free" logo, it really doesn't make any sense to take more and more of freedom from the user by continuously dumbing down KDE.)

    Another thing is that when you maximize a window, it will completely lose all 4 sides of border.
    Now that's something really bad. I'm used with my old style KDE 3.5.9 where even if you maximize a window you will still have the border visible and be able to grab it and resize the window, "manually" taking it out of the "maximized" state.

    So considering all these things I decided to come up with a fix for these things.

    The kwin version in Knoppix 7.4.2 is 4.11.11-1.

    I took the sources for an older kwin, namely 4.7.4-2, where this behaviour was not yet implemented and I started looking for differences in the source code.
    I spotted some differences and pretty soon I came up with a patch, but the final result still had one drawback: newly created windows were still positioned at left or right desktop edges with the border on that side missing.

    So not really willing to waste a lot of time on this, I sent a message to the KDE developer mailing list and pretty soon I got a very kind answer from Thomas Lubking. He told me what other files needed modifications and even gave me the commits/patches applied at the time this behaviour was implemented.

    So this way I got the complete patch for what I needed.

    Then I wrote a script to install all the dependencies required for a complete rebuild of kde-workspace_4.11.11-1, then get the kde-workspace_4.11.11-1 sources and rebuild everything.

    I will attach this script here (I'm not going to include it in the text of this post because it's really long and boring), but before anyone reading this post uses this script, I need to ask them to carefully read everything below:

    First of all, only use this script if you are running the original Knoppix 7.4.2 DVD!!
    Don't use this script under any other kind of Linux! Doing so will only waste Debian's bandwidth.

    You will also need an internet connection for this.

    1. In order to be of use at any time in the future (for Knoppix 7.4.2 DVD only) this script downloads the dependency packages from the Debian snapshot server. That is about 74 MB of packages. So I want to ask anyone planning to use this script to USE IT RESPONSIBLY: make sure you satisfy all requirements BEFORE running the script. I don't want to publish a script to be used by others to abuse the bandwith of the Debian Snapshot Server. The people maintaining this server already have a lot on their hands, and anyone knows bandwith costs money.

    2. The first step is to download the attached script and the attached patch, uncompress both and put them in an empty directory. IMPORTANT: MAKE SURE YOU HAVE AT LEAST 2GB FREE SPACE IN THAT DIRECTORY BEFORE YOU START THE SCRIPT. If not, you will run out of disk space and you will have to restart the script and redownload 74MB from Debian snapshots. I DON'T WANT THAT TO HAPPEN. IDEALLY YOU WOULD ONLY NEED TO RUN THIS SCRIPT ONCE!!!

    3. Open a console window (for instance "konsole"). set the backscrolling (history) to "unlimited" in case you want to save and keep the log, go to that dir, make sure the script file is executable and the patch file is saved right beside it (UNCOMPRESSED!!, use gunzip) and run it as root.

    4. Next you will see a lot of deb packages downloading, then they will install, you will also see some warnings about downgrading some packages, that's ok, don't worry about it.

    5. Then the kde-workspace_4.11.11-1 sources will be downloaded, extracted, patched and after that you will be prompted to enter a file name for the patch (which is the exact same patch I attached here).
    It doesn't matter what you enter, just type a few letters and then Enter.
    You will be thrown in a text editor showing the patch, just press Ctrl+X to exit and the rebuilding process will start.

    6. The whole process will take about 2 hours on an Intel Core2 duo 2.4 GHz (that's what it took in my case). If you have a faster computer it will take less. At the end of the process, the directory where you had only 2 files (the script and the patch) will look like this:

    Code:
    root@Microknoppix:/home/knoppix/Public# ls -1al
    total 146664
    drwxr-xr-x  5 knoppix knoppix      1180 Feb  1 23:17 .
    drwxr-xr-x 43 knoppix knoppix       500 Feb  1 21:14 ..
    drwxr-xr-x  2 root    root           80 Feb  1 21:19 cmake-bugfixed
    drwxr-xr-x  4 root    root         1440 Feb  1 21:26 deb
    -rw-r--r--  1 root    root        63230 Feb  1 23:14 freespacenotifier_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root        40974 Feb  1 23:14 kdebase-workspace_4.11.11-1_all.deb
    -rw-r--r--  1 root    root        40994 Feb  1 23:14 kdebase-workspace-bin_4.11.11-1_all.deb
    -rw-r--r--  1 root    root        40992 Feb  1 23:17 kdebase-workspace-dbg_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root        40982 Feb  1 23:14 kdebase-workspace-dev_4.11.11-1_all.deb
    -rw-r--r--  1 root    root       397986 Feb  1 23:15 kde-style-oxygen_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root      3948748 Feb  1 23:15 kde-window-manager_4.11.11-1_i386.deb
    drwxr-xr-x 36 root    root         1080 Feb  1 22:57 kde-workspace-4.11.11
    -rw-r--r--  1 root    root        42786 Feb  1 23:14 kde-workspace_4.11.11-1_all.deb
    -rw-r--r--  1 root    root       175656 Feb  1 21:31 kde-workspace_4.11.11-1.debian.tar.gz
    -rw-r--r--  1 root    root       136972 Aug  1  2014 kde-workspace_4.11.11-1.debian.tar.xz
    -rw-r--r--  1 root    root         5426 Feb  1 21:31 kde-workspace_4.11.11-1.dsc
    -rw-r--r--  1 root    root        19392 Feb  1 23:17 kde-workspace_4.11.11-1_i386.changes
    -rw-r--r--  1 root    root     13534816 Aug  1  2014 kde-workspace_4.11.11.orig.tar.xz
    -rw-r--r--  1 root    root      2137796 Feb  1 23:14 kde-workspace-bin_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root      4067696 Feb  1 23:14 kde-workspace-data_4.11.11-1_all.deb
    -rw-r--r--  1 root    root    116307518 Feb  1 23:17 kde-workspace-dbg_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root       149284 Feb  1 23:14 kde-workspace-dev_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root        66986 Feb  1 23:15 kde-workspace-kgreet-plugins_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root       237144 Feb  1 23:17 kde-workspace-randr_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root      2217334 Feb  1 23:14 kdm_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root       551682 Feb  1 23:14 kinfocenter_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root       138576 Feb  1 23:14 klipper_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root       346140 Feb  1 23:15 kmenuedit_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root       263810 Feb  1 23:14 ksysguard_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root        90388 Feb  1 23:14 ksysguardd_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root        53230 Feb  1 23:17 ktouchpadenabler_4.11.11-1_i386.deb
    -rw-r--r--  1 knoppix knoppix     22274 Jan 27 23:33 kwin_border_snap_full.patch
    -rw-r--r--  1 root    root        83054 Feb  1 23:15 libkdecorations4abi2_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root        50296 Feb  1 23:15 libkephal4abi1_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root        51262 Feb  1 23:15 libkscreensaver5_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root        68942 Feb  1 23:15 libksgrd4_4.11.11-1_i386.deb
    -rw-r--r--  1 root    root        70948 Feb  1 23:15 libksignalplotter4_4.11.11-1_i386.deb
    ...............
    
    -rw-r--r--  1 root    root       283074 Feb  1 23:15 systemsettings_4.11.11-1_i386.deb
    -rwxr--r--  1 knoppix knoppix     21146 Feb  1 21:10 update0.sh
    root@Microknoppix:/home/knoppix/Public#
    The only file you need from all this is "kde-window-manager_4.11.11-1_i386.deb". You need to install it over the existing version.
    So PLEASE SAVE AND KEEP THIS FILE FOR LATER SO YOU DON'T HAVE TO RUN THIS SCRIPT AGAIN.

    Stop X like this: go to a tty console with Alt+Fx (x=1...4) and then type "init 2".
    Then do Alt+F5 to go back to LXDE, go to Start Menu, Logout, then again click the Logout button.
    You will be back in the tty console, cd to the dir where you saved the script and patch and type:

    Code:
    dpkg -i kde-window-manager_4.11.11-1_i386.deb
    Open mc and go to /home/knoppix/.config/lxsession/LXDE and in the "config" file change "window_manager=metacity" with "window_manager=kwin".
    Do the same thing in the "desktop.conf" file (in the same dir).

    Then close mc and type "init 5.

    LXDE will start with kwin as window manager and you will be able to check out the window snap behaviour:

    Windows will snap to desktop edges without losing their border, and even when maximized you will still be able to grab the border to resize it. I'm attaching a snapshot of my desktop with LXDE using Kwin and the plastik decoration widget as example

    Of course you can go in the Start Menu -> Knoppix -> Choose/Restart KNOPPIX Desktop and just restart X with KDE Desktop and you will see the same thing.


    Good luck!
    Attached Images Attached Images
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


IBM Type 4869 External 5 1/4in Floppy Disk Drive Mainframe Collection picture

IBM Type 4869 External 5 1/4in Floppy Disk Drive Mainframe Collection

$117.89



IBM 360/50 Mainframe Console Panel picture

IBM 360/50 Mainframe Console Panel

$15000.00



IBM zEnterprise Mainframe BC12 (2828-H06)(103559) picture

IBM zEnterprise Mainframe BC12 (2828-H06)(103559)

$6600.00



Vintage I-O Corporation 2476 terminal mainframe tested to power on picture

Vintage I-O Corporation 2476 terminal mainframe tested to power on

$80.00



Vintage 1970s -- Lot of 10 Mainframe computer 80-column punch cards picture

Vintage 1970s -- Lot of 10 Mainframe computer 80-column punch cards

$7.50



Tektronix 7603 Oscilloscope 100 MHz Non-Storage Mainframe picture

Tektronix 7603 Oscilloscope 100 MHz Non-Storage Mainframe

$29.99



Beam Spring Vintage Keyboard Mainframe Terminal RARE picture

Beam Spring Vintage Keyboard Mainframe Terminal RARE

$1200.99



IBM Z15-T02 Mainframe (8562-T02) - Complete B02 Rack Config picture

IBM Z15-T02 Mainframe (8562-T02) - Complete B02 Rack Config

$86999.00



2 Piece Gamry Instruments PCI4G Controller & 300/750 Potentiostat Series G Board picture

2 Piece Gamry Instruments PCI4G Controller & 300/750 Potentiostat Series G Board

$209.99



DCA MacIRMA 003088 Rev A NuBus 3270 Mainframe Emulation Card Vintage Mac picture

DCA MacIRMA 003088 Rev A NuBus 3270 Mainframe Emulation Card Vintage Mac

$59.00