Invert screen

40 risposte [Ultimo contenuto]
sebasarena
Offline
Iscritto: 10/02/2019

Hey! I'm a new user of Trisquel. My previous OS was Ubuntu MATE.

So, the thing that I need help with is this: I frequently work late and for long time, so I need to rest my eyes a little. That's why I used some tools before to invert the colors of the screen.

1) The first tool I use was «xcalib». But it doesn't work for me anymore, for a bug detected but not resolved.

2) The second one was «Redshift». But that tool didn't allow me to do what I want: put the my screen in negative mode, with all the colors inverted, specially the white.

3) The third one was «Compiz». The window manager has the «Negative» mode as a plugin, and was really helpful.

I tried the first and third tools in Trisquel, installing them in Synaptic. But the first (xcalib) didn't work. About the third, Compiz in fact can be installed and use, but it doesn't show any of the main buttons (minimize, maximize and close) and doesn't allow me to re-size the windows. The only thing I can do with the windows is close them with Alt + F4.

I'll put some screenshots to illustrate the main issue. But I need to know a way to fix this problem with Compiz or an alternative solution to invert the colors of my screen (negative mode).

AllegatoDimensione
Screenshot at 2019-11-06 20:10:58.png126.4 KB
Screenshot at 2019-11-06 20:11:30.png1006.42 KB
Screenshot at 2019-11-06 20:11:45.png1.01 MB
Screenshot at 2019-11-06 20:12:40.png1.01 MB
chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> So, the thing that I need help with is this: I frequently work late
> and for long time, so I need to rest my eyes a little. That's why I
> used some tools before to invert the colors of the screen.

Inverting the screen colors isn't something I've done before, but here's
my approach to minimizing eye strain:

I find a high-color-contrast low-brightness-contrast color theme like
Solarized or (my preference) Zenburn to be easier on the eyes than
bright white text on a dark black background (which is probably
approximately what you get when inverting everything), based on how much
pain I feel when looking at a screen while I have a headache or am
working late at night. I don't know anything about the science of this,
but my best guess is that different brightnesses require different
amounts of pupil dilation, so keeping everything at around the same
brightness and instead relying on color contrast to tell objects apart
causes less train. I don't know though. I've just observed what
is/isn't painful for me.

I use Numix-Zenburn[1] as my GTK theme, use this Zenburn vim theme,[2]
have set mate-terminal to use a Zenburn colors, and have modified
Abrowser/Icecat color preferences to strip out background images, use
Zenburn's background color for all webpages, Zenburn's blue shade for
links, and Zenburn's white for all other text. With all this,
everything on my screen is easily readable, and always at a constant and
pretty low level of brightness, which I find pretty easy to work with.

[1] https://github.com/williamkray/Numix-Zenburn

[2] https://github.com/jnurmine/Zenburn

GNUbahn
Offline
Iscritto: 02/18/2016

Chaosmonk, thanks for the tip which I wish to tryout. I have installed the numix-zenburn theme, but how do you modify Abrowser/Icecat color preferences to strip out background images, use Zenburn's background color for all webpages, Zenburn's blue shade for links, and Zenburn's white for all other text"?

When modify Abrowser -> preferences -> Genral -> Colors and set Bacground to e.g. a dark gray and text color to a light gray I just get an all white background and black text.

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> When modify Abrowser -> preferences -> Genral -> Colors and set
> Bacground to e.g. a dark gray and text color to a light gray I just
> get an all white background and black text.

You need to also change "Never" to "Always" in the dropdown for the
changes to take effect.

However, an Abrowser update (I forget which one) messed this up for me a
while ago, at which point I switched to Icecat.

GNUbahn
Offline
Iscritto: 02/18/2016

Thanks. It now works in Icecat, but one consequence is that for instance the graphical element on the landing page of trisquel.info is not visible. In some case this may not be a problem, in others it might...

Anyway, I like the theme, so thanks for sharing.

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> Thanks. It now works in Icecat, but one consequence is that for
> instance the graphical element on the landing page of trisquel.info is
> not visible. In some case this may not be a problem, in others it
> might...

Yeah, all background images get removed. I like it. It makes most
pages cleaner. It's usually not a problem, but sometimes a website
incorrectly implements something important like a button as a background
image. Every now and then I do have to go back to normal colors to get
certain pages to work.

Btw, although about:preferences only lets you choose between a fixed set
of colors, you can set them to the exact Zenburn colors in about:config.
Just set

"browser.display.background_color" to #3F3F3F
"browser.display.background_color" to #DCDCCC
"browser.anchor_color" to #8CD0D3
"browser.visited_color" to #8CD0D3

That's assuming that you want all links to be blue. If you want visited
links to be a different color, then use a different color for that
fourth option. For example, for Zenburn red set

"browser.visited_color" to #CC9393

GNUbahn
Offline
Iscritto: 02/18/2016

Yeah, all background images get removed. I like it. It makes most
pages cleaner

I agree and will try this out for some time.

What is the difference between changing the settings under Preferencens and "set them to the exact Zenburn colors in about:config."

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> What is the difference between changing the settings
> under Preferencens and "set them to the exact Zenburn
> colors in about:config."

Preferences gives you a limited number of colors to choose from, and
Zenburn's colors are not among them. In about:config you can define
whatever colors you want.

GNUbahn
Offline
Iscritto: 02/18/2016

I see.

Can you by chance recommend a nice set of icons for xfce which matches zenburn?

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> Can you by chance recommend a nice set of icons for
> xfce which matches zenburn?

Icon themes are not desktop-specific, so these aren't "for" Xfce, but I
find that Ghost Flat works well (see the fourth screenshot here[1]). I
think I found them here.[2]

[1]
https://trisquel.info/en/forum/share-your-desktop-again?page=1#comment-143904

[2]
https://www.noobslab.com/2014/10/hackstation-theme-ghost-flat-icons-for.html

GNUbahn
Offline
Iscritto: 02/18/2016

I'll try it out, thanks.

I am having some difficulty to add a new set of icons, though.
Adding them to /usr/share/icons did not work.

One developer/designer at Github instructed to put the folder (with the icon software) in /usr/share/xfce4/weather/icons/folder of new icons, but that too did not help me.

GNUbahn
Offline
Iscritto: 02/18/2016

Following e.g. these instructions http://tipsonubuntu.com/2016/09/11/install-gtk-icon-themes-ubuntu-16-04/ have no effect. The icon themes do not appear under Pereferences -> Appearance -> Icons

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> I am having some difficulty to add a new set of icons, though.
> Adding them to /usr/share/icons did not work.

Weird. Perhaps the icon theme is came contained in a directory, so the
subdirectory containing the actual icon theme is nested too deep?

See if index.theme is in the expected location, i.e. if the icon theme is
called foo, you should have

/usr/share/icons/foo/index.theme

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

I use https://addons.mozilla.org/fr/firefox/addon/dark-background-light-text/ with the colors in the image below, the same dark colors in Emacs (Pluma, Trisquel's default text editor, has a black background by default) and GNOME Terminal, the dark theme for Abrowser (which comes by default, disabled), the "Monterail Full Dark" theme for Icedove, Ctrl+I to invert the colors of a document in Atril, a dark wallpaper. That is most of what I look at on my screen (I do not use LibreOffice but I guess there must options too). Well, except for pictures and videos but I do not think anybody wants to see that with inverted colors (and the "Dark Background and Light Text" keeps them unchanged, in the Web browser).

My "Dark Background and Light Text" colors.png
chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> I use
> https://addons.mozilla.org/fr/firefox/addon/dark-background-light-text/

This was what I used before I learned that the browser has native color
settings. IIRC, the reason I switched was that the addon does not have
permission to modify every page, such as pages like about:home or a
newly opened tab in the split second before a page begins to load, so I
was often getting annoying flashes of bright white.

> the dark theme for Abrowser (which comes by default, disabled)

Does the dark theme cause pages to default to something other than white
before the addon kicks in? If so, that might fix the problem I was
having.

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

about:newtab has a dark background here. about:blank has not. And, yes, there are white flashes when a new page is loaded.

GNUbahn
Offline
Iscritto: 02/18/2016

By the way, is it advised only to use only the default theme of the Tor Browser, or will changing that have no effect on the matters of security/privacy?

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> By the way, is it advised only to use only the default theme of the
> Tor Browser, or will changing that have no effect on the matters of
> security/privacy?

I have wondered this. If it's possible for websites to tell then it
could be used for fingerprinting, but I have no idea whether this is the
case.

GNUbahn
Offline
Iscritto: 02/18/2016

After applying the new settings to Abrowser, when starting Abrowser or opening a new tab, the background is shortly coloured according to the new setting, but then returns to white/default.

sebasarena
Offline
Iscritto: 10/02/2019

Hey,

I already use an application in the panel to change the brightness of my screen (screenshot included).

But what I want is to invert the color. That's the only thing I need in Trisquel.

I even changed to cable network because I already knew that my Wi-Fi wouldn't run (private software). But the negative mode is something that I use frequently in my daily work and I can't do it without it.

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> But what I want is to invert the color. That's the only
> thing I need in Trisquel.

Try installing the package "xcalib"

$ sudo apt install xcalib

and then run

$ xcalib -alter -invert

to invert the screen colors. Run the same command to go back to normal.
If this is the behavior you're after, go to Control Center -> Keyboard
Shortcuts and map the command "xcalib -alter -invert" to whichever
keyboard shortcut you want to use to invert the screen colors.

andyprough
Online
Iscritto: 02/12/2015

> Try installing the package "xcalib"

He said in the original post that he's used xcalib, but it has a bug and he needs something else.

Have you heard of a little app called xrandr-invert-colors?
https://github.com/zoltanp/xrandr-invert-colors

I don't think it's in Trisquel repos, but I could be wrong.

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> He said in the original post that he's used xcalib, but it has a bug
> and he needs something else.

Sorry, I missed that.

@OP What did you use in Ubuntu MATE? Were you using Ubuntu MATE 16.04
or 18.04? Is it specifically Trisquel 8's version of xcalib that has
the bug? If so, let me know what the bug is and I'll try to find and
backport the patch that fixes it.

sebasarena
Offline
Iscritto: 10/02/2019

I forget to attach the last screenshot of the application I use for brightness in Trisquel and back then with MATE... So here it is:

Screenshot at 2019-11-07 16:00:58.png
sebasarena
Offline
Iscritto: 10/02/2019

About the bug with «xcalib»:

1) I had experimented the bug inside Ubuntu MATE, and it was this one: «Error - unsupported ramp size 0».

2) In Trisquel, I have installed «xcalib» two times. The first one was in Synaptic and the second in the terminal. When I run «xcalib -alter -invert» it doesn't change the colors in the screen. It is like I never run a command. But it doesn't show any code of error.

Screenshot at 2019-11-07 20:09:01.png
sebasarena
Offline
Iscritto: 10/02/2019
sebasarena
Offline
Iscritto: 10/02/2019

I would really like to know how to install «XRandR Invert Colors» step by step.

I don't know much about compiling a program myself. So I really need a fully detailed explanation of every command I need to «make install» something.

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> I would really like to know how to install «XRandR Invert Colors» step
> by step.
>
> I don't know much about compiling a program myself. So I really need a
> fully detailed explanation of every command I need to «make install»
> something.

In case you don't have git installed,

$ sudo apt install git

and then clone the repository.

$ git clone https://github.com/zoltanp/xrandr-invert-colors.git

Change directories into the repository you just cloned

$ cd xrandr-invert-colors

Get dependencies, as per the README

$ sudo apt install libxcb-randr0-dev
$ sudo make deps-apt

Build and install

$ make
$ sudo make install

I haven't tested this, just followed the README and added in the implied
stuff a beginner might not know to do. If you run into errors let me
know.

andyprough
Online
Iscritto: 02/12/2015

chaosmonk is almost right, but here's a couple corrections, and I'll give you the newbie friendly way instead of dealing with cloning git:

1. Download xrandr-invert-colors-master.zip - go to https://github.com/zoltanp/xrandr-invert-colors.git, and hit the green "Clone or Donwload" button. Select "Donwload ZIP", and tell it to download to your Downloads director

2. Open a terminal, and copy the following commands
cd ~/Downloads/
unzip xrandr-invert-colors-master.zip
cd xrandr-invert-colors-master/
sudo apt install libxcb-randr0-dev
sudo make deps-apt
make
sudo make install

Now, you should be able to invert your colors with:
xrandr-invert-colors
from the terminal, and the same command from the terminal to return to the normal colors

Let us know anything that doesn't work. It looks good on my system

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

He may not have GCC and Make installed, i.e., the 'apt install' command should be completed:
sudo apt install gcc make libxcb-randr0-dev

nadebula.1984
Offline
Iscritto: 05/01/2018

What about the package "build-essential"? It includes gcc, g++, and make.

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

It includes dpkg-dev too, to build DEB package. And there is no C++ in XRandR Invert Colors (as far as I saw). So, sebasarena only needed GCC and Make. But, sure, there is little harm in installing additional software you never run.

GNUbahn
Offline
Iscritto: 02/18/2016

Hi Magic Banana,

Here, https://trisquel.info/en/forum/changing-abrowsers-buttons-font-color-solved#comment-120787, you offered a command line to help with some color settings for Abrowser. Can you help make one which will solve the problem, that when adding e.g. Numix-Zenburn theme OR changing colors manually in about:config, I just get a white background?

Chaosmonk said he had a similar issue with Abrowser (in this thread) and I haven't been able to solve the issue. According to the monk, these colors are used in the Zenburn theme:

"browser.display.background_color" to #3F3F3F
"browser.display.foreground_color" to #DCDCCC
"browser.anchor_color" to #8CD0D3
"browser.visited_color" to #CC9393

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

That command line substituted a seven-step fix that arielenter designed to a problem all Abrowser users faced at that time. To be honest, I am not really following what changes you are trying to apply. But if it does not work manually (editing values in about:config, as far as I understand), a command line doing the same would not work either.

GNUbahn
Offline
Iscritto: 02/18/2016

I am sorry - I get it that my formulations are not clear enough. And of course I don't expect you to just fix this problem whether or not it is a lot of work (I have no idea if it is).

Anyway, the problem is that I have installed a new theme called Numix-Zenburn (which chaosmink introduced earlier in this thread). On a system level it works without issues.

To make Abrowser adopt the theme, one needs to change the setting under Preferences -> General -> Colors to "Use system colors" and to "Always" 'override the colors specified by the page with your selections above'.

The problem is that the last part doesn't work: Abrowser does not adopt the theme which the system uses.

According to chaosmonk's suggestions, colors for the different graphical elements of Abrowser can be changed in about:config under 'browser.display.whatever_the_sort_of_element_one_wants_to_set_the_color_for.

I have tried this too, but it also lead to no change.

The reason I asked you was that I suppose you would know whether this problem can be solved via the terminal or not. In which case you would either say it's not possible, that it is but you don't have the time to do it or that you would suggest a solution. Of course it is also a possible fallout that you do not know.

Please don't consider my request as a demand but rather as an enquiry. And with no other expectations than your usual kindness.

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

The reason I asked you was that I suppose you would know whether this problem can be solved via the terminal or not.

You can certainly alter Abrowser's configuration files through command lines, rather than through the Preferences or through about:config. But the result would be the same.

I had never clicked on that "Colors..." button in the "Preferences". I see the colors defined there are actually part of those I defined through the preferences of the extension "Dark Background and Light Text". You may find the use of that extension acceptable (you can know the exact color of any pixel on your screen with tiny programs such as gcolor2, which is Trisquel's repository).

But I am actually unsure whether you refer to the content of the Web page (as I do in the paragraph above) or to the "chrome" (the rest of Abrowser's window). In the latter case, you may find and install a Firefox theme of your choice.

GNUbahn
Offline
Iscritto: 02/18/2016

Since I have installed Numix-Zenburn as a theme, the chrome of Abrowser has dark colors as preferred. It is the colors of web pages that are tricky. Using the 'dark background and light text' addon for firefox compensates for the problem, but the color settings of the addon and the theme are not exactly the same.

To sum up the problem: Abrowser adopts the colors of the Numix-Zenburn theme for the chrome, but it does not so for web pages.

Since Icecat adopts the color settings of the theme for both chrome and web pages it appears to be theoretically possible for Abroswer as well (chaosmonk also reported this to be successful until a given update of Abrowser).

In the end, the actual question seems to be: is there a way to make Abrowser obey the theme completely?

chaosmonk

I am a member!

I am a translator!

Offline
Iscritto: 07/07/2017

> Since Icecat adopts the color settings of the theme for both chrome and
> web pages it appears to be theoretically possible for Abroswer as well
> (chaosmonk also reported this to be successful until a given update of
> Abrowser).

I think the regression I ran into upon upgrading was this one.[1] Until
it's fixed, I don't think that setting the native color preferences will
work in Abrowser. An addon like the one Magic linked to might be
necessary.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1570450

GNUbahn
Offline
Iscritto: 02/18/2016

Thanks. Of course I do not understand the technicalities but that has to do with my lack of knowledge.

Once again, thanks for the efforts.

Magic Banana

I am a member!

I am a translator!

Offline
Iscritto: 07/24/2010

Using the 'dark background and light text' addon for firefox compensates for the problem, but the color settings of the addon and the theme are not exactly the same.

Again (and sorry if either I was not clear the first time or if I misunderstood the sentence above):

  • You can know the exact color of any pixel on your screen (in particular the colors defined in Numix-Zenburn) with tiny programs such as gcolor2, which is Trisquel's repository;
  • You can set six of these colors in the preferences of the extension "Dark Background and Light Text".
sebasarena
Offline
Iscritto: 10/02/2019

THANKS!!!

It works perfectly! Now I can do my reading without any problems.

Thanks a lot to all of you, guys!

:-D