Magnifier that follows your mouse around Kmag [solved]

18 risposte [Ultimo contenuto]
arielenter

I am a member!

I am a translator!

Offline
Iscritto: 08/25/2010

Hi:

I wanted to shared what I found while looking for a magnifier for trisquel.

I wanted a magnifier that followed my mouse around, without using compiz and full screen zoom. Ideally I would have liked that the magnifier window also followed my mouse, but the solution I found was good enough for me.

What I found was kmag. It is true that it will be needed to install a lot of kde libraries to use it in trisquel's default gnome fallback, but I was already using those libraries for kdenlive anyway, and I was unable to find any other magnifier with the characteristics I wanted. If somebody knows of a better program please let me know.

I'm using kmag 4:4.8.2-0ubuntu2 from Toutatis, because the newest version has this bug where the magnifier starts in window mode instead of mouse mode even if you configure it to start in mouse mode, which is the one I really want. This is a bug that hasn't been solved in the latest release I found even thought it has been reported already.

I created the following bash file that makes kmag behave as a panel, reserving some space in the screen:

#!/bin/bash
kmag -caption "KMag" & #opens kmag with the window title KMag
sleep 1 #waits 1 sec for the program to load
xprop -name "KMag" -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0" #gets rid of the title and window decoration
xprop -f _NET_WM_WINDOW_TYPE 32a -name "KMag" -set _NET_WM_WINDOW_TYPE _NET_WM_WINDOW_TYPE_DOCK #converts kmag to a dock
wmctrl -r "KMag" -e 0,0,695,1024,60 #moves kmag to the bottom of the screen
xprop -f _NET_WM_STRUT_PARTIAL 32c -name "KMag" -set _NET_WM_STRUT_PARTIAL " 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 1024" #reserves space for kmag so that it beahves like a panel and maximied window can not cover it or go under it

You can play with the values to adjust them to your screen resolution and give kmag another position other than the bottom of the screen. My resolution is 1024x768 for intense. I moved trisquel's main panel to the top so that kmag could be in the bottom. I'm sending a picture to show you how it looks.

I got interested on finding a good magnifier because I'm using a computer connected to a CRT TV through S-Video, and if anybody can remember it, small letters are impossible to read on those TV. For me, Using a magnifier was a better option than increasing the gnome Scaling Factor, but it is another option if somebody is interested.

Hope this can help some one out there.

AllegatoDimensione
Screenshot from 2016-10-21 16:46:08.png238.68 KB
arielenter

I am a member!

I am a translator!

Offline
Iscritto: 08/25/2010

Also, in kmag you can hide all the tool bars and the menu so that it shows just the magnifier as it looks on my screen shot.

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

"Zoom" in the "Seeing" tab of the "Universal Access" (in the "System Settings") has "Options". In particular, the magnifier does not have to be full screen. It can take half of it (and you can choose which half). And it can "Follow mouse cursor".

arielenter

I am a member!

I am a translator!

Offline
Iscritto: 08/25/2010

You know, I looked for it but I just couldn't find that option. I'll attach a picture of that. I don't know if it has something to do with some "peculiar" changes I have made on my system. I'll check a freshly new trisquel I have in another system. I also notice that gnome-mag is not on the repos and I thought that it may had something to do with it.

BTW. That picture I'm attaching is on Spanish but the English session doesn't show the zoom either.

Captura de pantalla de 2016-10-21 21.38.17.png
arielenter

I am a member!

I am a translator!

Offline
Iscritto: 08/25/2010

Nope, I just tested in my other system and I have the same problem. No zoom option. I think I read somewhere about ubuntu not being good with people with disabilities, specifically about gnome-mag not being present I believe. But I don't know if it has something to do with zoom not being present in the "Seeing" section. Maybe it's just a package that I need to install?

P.S. In case you got curious with what I was referring as "peculiar" changes on my system I was referring to the following post. All though I'm trying to avoid using compiz for the system I'm trying to get a magnifier for since it's a very old computer.

https://trisquel.info/es/forum/bring-compizs-animations-add-back-aka-compiz-plugins-extra-solved

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

I do not use Compiz. I have been using GNOME Shell since Trisquel 6 and it may have additional dependencies for accessibility.

See the attached files for screenshots.

Universal Access.png Zoom Options.png
arielenter

I am a member!

I am a translator!

Offline
Iscritto: 08/25/2010

I'm guessing that it won't work with gnome fall back am I right? How light is it gnome shell? is it the same to trisquel's default gnome fall back? may be lighter?

I get where trisquel's design is coming from, and it gives a distinguished look to trisquel that difference it from ubuntu and other distros. But gnome shell looks pretty cool, I probably would have use it in may main machine if I had seen it before, considering my current setup uses a dock too.

The computers I'm setting up is for some friends of mine and I'm trying to send a clear message of free software to them, and design helps with that. I'll hate if they think it's the same thing as ubuntu. But I guess that in the end, the only really powerful symbol is the Trisquel logo and explain to them the importance of free software.

arielenter

I am a member!

I am a translator!

Offline
Iscritto: 08/25/2010

Yep, I just tested gnome shell and it's awesome. The zoom is just as you described and it even have an option so that the window magnifier its self follows the mouse around. I hoped that installing gnome shell would give the zoom option to gnome fallback as well, but that was not the case.

I think there should be a work around so that it may be possible to establish a height and width for the zoom. There isn't any option in the gui that I could find for that. Right now its height covers half the screen and it's width goes back to back, left to right of the entire screen even if you select the option for making the window follow the mouse. I'm sending a picture. I'm sure there must be a way to change that never the least.

Even thought gnome shell looks pretty good, it seems it does uses 3d acceleration am I right? So I will think that gnome fallback without compton should be lighter than gnome shell right? I don't now how light would be to use kmag since I think it probably has to load a lot of kde libraries to use it. I'll test it on my old computer and see how it behave.

For my regular computer, I think I'm still too emotional attached to compiz-plugins-extra xD which doesn't seem to work with gnome-shell very well at all.

I wonder if compiz-plugins-extra would be back in the next Trisquel release, or else I probably would keep using my work around if it still works https://trisquel.info/es/forum/bring-compizs-animations-add-back-aka-compiz-plugins-extra-solved

Captura de pantalla de 2016-10-22 12.52.55.png
Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

GNOME Shell uses 3D acceleration if available, software rendering otherwise: https://fedoraproject.org/wiki/Features/Gnome_shell_software_rendering

GNOME Fall back certainly is lighter. That said, my wife uses GNOME Shell on her laptop with 2 GB of RAM and does not seem to ever swap.

Two links to visit to enjoy GNOME Shell to its full potential:

Misty
Offline
Iscritto: 03/22/2016

I really like GNOME Shell, I'll use it when I convert my Mac.

Mangy Dog

I am a member!

I am a translator!

Offline
Iscritto: 03/15/2015

Misty here's a Trisquel 7 Gnome shell :)

Trisquel_7_Gnome_Shell_Mutter_2.png Trisquel_7_Gnome_Shell_Mutter_3.png
Misty
Offline
Iscritto: 03/22/2016

Oh how I miss that, but my machine's memory isn't as much as I thought, as you may know, you were in my thread about removing Trisquel, you explained something technical to me there, which I really appreciate.

When I convert my mac, I will be able to use GNOME Shell on it :)

Misty
Offline
Iscritto: 03/22/2016

Something I noticed about kmag, I had it running and tried to open Synaptic, but it wouldn't load till I restarted and ran it without kmag running. Considering my computer's low disk space and RAM, that's why.

I'd like to tweak it like arielenter says, but I need more guidance on it first. When I convert the mac I'll be able to use GNOME Shell so it'll have the better zoom features.

arielenter

I am a member!

I am a translator!

Offline
Iscritto: 08/25/2010

Misty, you will need to install x11-utils and wmctrl packages to use the code I'm sharing.

You could try to run line by line in terminal (except for the header #!/bin/bash which won't do anything) to see what each one do and maybe debug it if needed.

A bash file run all those lines for you instead of you having to run them one by one. Then, you could add the bash file to you start up application list so that it's executed when ever you start the your user session.

If you need help with any of this let me know and I'll be happy to help you :) , it is not difficult at all.

Misty
Offline
Iscritto: 03/22/2016

Thank you. I'd love to learn this stuff. When I'm feeling adventurous I may try it.

arielenter

I am a member!

I am a translator!

Offline
Iscritto: 08/25/2010

BTW. Here is the version of kmag I was talking about. I made a mistake, it's from Taranis and not from Toutatis as I first said.

http://us.archive.trisquel.info/trisquel/pool/main/k/kmag/kmag_4.8.2-0ubuntu2_amd64.deb

I recommend to install kmag from the repos first to get all it's dependencies needed first, uninstall just kmag, download the package from the link, and install it. I recommend installing gdebi to help you install the downloaded package. Gdebi is a gui for installing deb packages very easily by just double clicking them once gdebi has been installed :)

Finally, lock the version of kmag in synaptic so that it won't get updated. Just look for kmag in synaptic, select it and then go package>Lock version on the menu, and that's it. Good to go.

Misty
Offline
Iscritto: 03/22/2016

OK and thank you. I got kmag from synaptic but when I'm feeling up to it, I'll follow your instructions.

Misty
Offline
Iscritto: 03/22/2016

Thank you arielenter. This is a bit overwhelming for me, so many instructions, and I really appreciate it. I already got it so for now I will keep it this way.

arielenter

I am a member!

I am a translator!

Offline
Iscritto: 08/25/2010

I wasn't going to spend so much time in this, but I was happy to see that some people like Misty were interested on my code. So I ended up improving the code to the end.

I'm Up loading my bash file which can be downloaded and given run privileges.

Here are some of the improvements I made:

- It waits for kmag to load just the necessary time needed. Before, one second some times was not enough.
- It automatically fits on your screen without having to tamper with the values.
- You can change the the position of kmag in the screen to bottom, left, right or top by just changing a single value.
- The code can be use with the kmag version on the repos and up.
- It automatically gives a F12 keyboard press every time kmag opens which makes it go to mouse mode when started.
- Checks if all the necessary packages (kmag, xdotool, wmctrl and x11-utils) are installed and gives you a warning if not.
- Starts kmag with menu and tool bars hidden.
- Hides the scroll bars of kmag out of the screen or they are left out of the reserved area so that they are cover by the maximized windows.

I might made a video on how to use it, although is the easiest thing to do. Just download the file, change its extension from .txt to .sh, give it run permissions, and add it to your starting programs. You can also run it from terminal or just by double clicking in the file if you configure nautilus correctly. That's what the video I might do would be about anyway.

See you around guys.

BTW. Don't trust all the codes downloaded from the internet xD . Mine doesn't need any root privileges and it really easy to understand, so make sure to just give it a look and you'll see there isn't nothing fishy.

AllegatoDimensione
improved_magnifier.txt 4.17 KB