Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-01-21 02:15:24

golinux
Member
Registered: 2011-11-19
Posts: 127

[SOLVED] Possible to disable hidden scrollbars from within a theme?

The hidden scrollbar thing is driving me crazy.  When I'm working, I often glance at the scrollbar to see where I am in a long page of code.  It is a royal pain to have to activate a visible scrollbar every few seconds.

I am doing the theming for Ascii, the next Devuan release. I saw in other threads that it is possible to disable the hidden scrollbar 'feature' <sarcasm> on a per-user basis. But I would like to disable it globally from within the Clearlooks-Phenix theme if possible.  Any suggestions if/how that could be done?

Or will it have to be done in GTK3?

Any input is greatly appreciated.

golinux

Last edited by golinux (2018-01-24 00:50:31)

Offline

#2 2018-01-21 15:17:14

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

add GTK_OVERLAY_SCROLLING=0 to you environment

Offline

#3 2018-01-21 15:31:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,931

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

I'm not sure it can be done on a per-theme basis. The GTK commit that added the functionality only referenced the environment variable method.

If it was possible, you would be able to use a pseudo-class definition like:

* {
-GtkScrolledWindow-overlay-scrolling: false;
}

...but that has no effect.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#4 2018-01-21 17:07:02

golinux
Member
Registered: 2011-11-19
Posts: 127

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

@sixsixfive and @T0Z . . . Thanks for confirming what I had surmised from my investigations.  The gnome folks continue to break things that don't need fixing . . . they are a "gift" that just keeps giving. </sarcasm> . . . I guess I'll just include a README to the theme including this and a few other caveats in GTK3-land.

Last edited by golinux (2018-01-21 17:07:50)

Offline

#5 2018-01-21 21:24:39

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

golinux wrote:

The gnome folks continue to break things that don't need fixing . . . they are a "gift" that just keeps giving.

that feature isnt bad if you use a touchscreen device, however i tried all x11 and wayland desktops and all still suck badly on touchscreens. I am not a huge fan of windows 10 but i have to admit it is light years ahead of any linux desktop on touchscreen devices the only linux based desktops that currently worked for me are chromiumos and android x86 and they come with the google pill...

PS: to disable it globally add it to /etc/environment(shouldnt make much a difference, since devuan is almost impossible to install on tablet devices)

Last edited by sixsixfive (2018-01-21 21:28:01)

Offline

#6 2018-01-21 23:02:40

golinux
Member
Registered: 2011-11-19
Posts: 127

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

sixsixfive wrote:
golinux wrote:

The gnome folks continue to break things that don't need fixing . . . they are a "gift" that just keeps giving.

that feature isnt bad if you use a touchscreen device, however i tried all x11 and wayland desktops and all still suck badly on touchscreens. I am not a huge fan of windows 10 but i have to admit it is light years ahead of any linux desktop on touchscreen devices the only linux based desktops that currently worked for me are chromiumos and android x86 and they come with the google pill...

PS: to disable it globally add it to /etc/environment(shouldnt make much a difference, since devuan is almost impossible to install on tablet devices)

That worked!  It's nice to have the scrollbars back.  Well, I don't own a touchscreen device (and unlikely I ever will),  In fact, I just got a shiny new 24" IPS monitor to play with.

Just wish there were a way to tie that fix to the theme . . .

Last edited by golinux (2018-01-21 23:09:56)

Offline

#7 2018-01-21 23:26:12

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

>Well, I don't own a touchscreen device (and unlikely I ever will)

I don't think so, It probably will become a standard feature on all newer displays just like 2k, retina, hd ready, full hd etc. in the past...

>Just wish there were a way to tie that fix to the theme . . .

just fix it with the packages postinstall for example i did this here:

https://github.com/sixsixfive/DarK/blob … ostinst#L4
https://github.com/sixsixfive/DarK/blob … n/prerm#L3

Offline

#8 2018-01-22 00:01:54

golinux
Member
Registered: 2011-11-19
Posts: 127

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

sixsixfive wrote:

>Well, I don't own a touchscreen device (and unlikely I ever will)

I don't think so, It probably will become a standard feature on all newer displays just like 2k, retina, hd ready, full hd etc. in the past...

Well, I have two really nice monitors and at 75+ I don't know that I'll be needing any replacements.  wink

>Just wish there were a way to tie that fix to the theme . . .

sixsixfive wrote:

That's exactly what we're thinking of doing.

Thanks for your help.  There is another issue related to the Clearlooks-Phenix theme but I'll open a new topic for that.  I posted an issue on github weeks ago but there has been no response from the developer.

Offline

#9 2018-01-22 07:30:12

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

sixsixfive wrote:

>Well, I don't own a touchscreen device (and unlikely I ever will)

I don't think so, It probably will become a standard feature on all newer displays just like 2k, retina, hd ready, full hd etc. in the past...

OtOH, might not be included soon on (for example) a 48" television that a person decides to also use as a computer monitor. And might serve no useful purpose even if it did come to be included, unless the person was sitting a bit closer than I suspect most people do, lol.

I'm really only commenting because I've also griped about the Gtk developers seeming intention to add useless things, remove useful things, and break everything at every opportunity - and it's nice to read that they actually appear to be operating (at least at times) with good intentions, and are attempting to add features that at least some people find useful.

Maybe I have been a bit harsh towards them in the past?

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#10 2018-01-23 00:33:51

golinux
Member
Registered: 2011-11-19
Posts: 127

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

MountainDewManiac wrote:

I'm really only commenting because I've also griped about the Gtk developers seeming intention to add useless things, remove useful things, and break everything at every opportunity - and it's nice to read that they actually appear to be operating (at least at times) with good intentions, and are attempting to add features that at least some people find useful.

Good intentions?  I don't think so!  Their goal is to lock down and brand the desktop.  This says it all. Case in point . . . I recently upgraded to Devuan Ascii (stretch).  I installed and chose my mouse cursor to be DMZ (white).   So I go to play a game of solitaire.  As soon as the mouse hits the game, the cursor flips to adwaita.  I thought I'd just uninstall adwaita since I never have and never will use it.  Ha!  It wanted to remove a good chunk of my desktop.  So I got creative and renamed the adwaita directory to adwaita.old and that solved the problem.  It seems that gnome is as invasive and domineering as systemd . . .

Maybe I have been a bit harsh towards them in the past?

You can never be too harsh on gnome and/or the Red Hat hooligans.  wink

Offline

#11 2018-01-23 02:30:31

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

Maybe I have been a bit harsh towards them in the past?

You can never be too harsh on gnome and/or the Red Hat hooligans.  wink

wink

But to play Devil's Advocate for a moment:

golinux wrote:

While I don't like it when they do things that screw with MY computer's OS/DE/configuration/etc., I do vaguely recall way back around late 2001 something like (paraphrased due to the fog of time), "The vast majority of things linux are FOSS (free and open source). This means that you can, among other things, use them as you see fit; if you wish to modify them to suit your own needs, feel free to do so. If you want the developers to modify them to suit you, this might happen - but it is important to remember that said developers create code for their own reasons." Or something like that.

In short, if you like something, great. If not, it's a free (and open source) world - go off and modify the code into what you want, or write something completely different.

And I think that seems to get ignored "from time to time." The Gtk+ and GNOME developers are not the Xfce developers. They are not the ones who decided that Xfce will use Gtk+ (AFAIK). Griping about how it affects us, lol... I'm mildly surprised that the standard reply isn't "Go write your own toolkit, then." Every... single... time.

"WONTFIX" translates to "I, the person who wrote and/or maintains this piece of code, like it this way."

Or, to put it another way: You are a nice person. I am looking for a place to stay. You allow me to come stay in your home - and to do so for free. If I decide that all of the walls should be painted flat black and the ceilings should be fur that is dyed purple, but you happen to feel that this is not the way YOUR HOUSE should be decorated...

I can b**ch and moan all I want to. But I probably won't see YOU going to the paint - and animal hide - store, then expending YOUR labor towards making changes to YOUR house that YOU don't want.

I don't like some (much?) of the changes that have occurred over time. I don't expect people who've written it for a different distro/DE than the one I use to change their code according to my wishes. I still gripe, though - it helps keep the real-world shouting down to a minimum, lol.

"Simple" solution: Xfce developers stop using someone else's toolkit and write their own. Once upon a time (when it was XFCE), our favorite desktop environment used the XForms toolkit instead of Gtk+.

Regards,
MDM

Last edited by MountainDewManiac (2018-01-23 02:32:07)


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#12 2018-01-23 05:23:33

golinux
Member
Registered: 2011-11-19
Posts: 127

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

MountainDewManiac wrote:

In short, if you like something, great. If not, it's a free (and open source) world - go off and modify the code into what you want, or write something completely different.

That's exactly why I have supported and worked with the Devuan team since the fork was announced.  In our camp we definitely walk the talk.   wink

The few aesthetic gripes that I've batted my head against in the process of theming the next release are minimal compared to the challenges needing attention that lie deep within the core of Debian.  But all of it matters and we all do our part.

The Gtk+ and GNOME developers are not the Xfce developers. They are not the ones who decided that Xfce will use Gtk+ (AFAIK).

I was quite surprised that Xfce jumped the GTK3 shark.  If in time that does not suit Devuan, we will switch to another default desktop or WM.  We are very fluid and like water will always find a crack to slip through to "freedom" to have it OUR way.  We are a very stubborn bunch indeed . . .

Offline

#13 2018-01-23 17:54:24

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

Sorry but i think its a general issue of Linux: there is just too much arrogance and people who want to do something better

years ago i bought a copy of SuSE 7.1 and tried it - I was just impressed how easily i could work with it and how responsive and customizable(KDE2) it was. I decided to install it side by side to windows 98 to try it out, then a few years later i made a full switch because everything just worked the way i want so i had no use for windows anymore.

But nowadays Linux is just stuck for me somewhere maybe i am just getting old, but there are things i just can't figure out eg:

* pulseaudio has become a defacto standard
* systemd is almost anywhere
* same as packagekit
* flatpak? whats the point of that? I thought the main advantage of of linux were its package managers?
* Linus shows a finger to nvidia( a company that provided excellent linux support since decades)

Once Linux was the OS of choices but they seam to have nearly all gone - there are dozens of linux distros but in the end they are all the same and only differ by their default package selection only a few try really different things(eg gentoo, nixos, alpine linux, gobolinux or puppy)

Years ago i struggled to get X11 running but once it was done - it worked! nowadys I am afraid to reboot after a system upgrade because I am afraid of "a start/stop job is running.... ...for the next 2 minutes or so". I even installed windows in dual-boot again because it simply works!

well, to make it short the last 3/2 years of linux were more devolution for me than evolution...

Last edited by sixsixfive (2018-01-23 17:56:43)

Offline

#14 2018-01-23 20:56:48

golinux
Member
Registered: 2011-11-19
Posts: 127

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

You've got a pretty good grasp of the landscape.  If you don't like what's happening - I certainly don't - follow your own advice and DO something about it!.  Turn the devolution into a revolution!

Offline

#15 2018-02-03 16:27:12

golinux
Member
Registered: 2011-11-19
Posts: 127

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

Thought I would post Devuan's solution for dealing with the hidden scrollbars in case it might be useful for someone else.

Putting the fix into /etc/environment worked but there was an objection to allowing the theme to put it there.  So we are directing our solution to /etc/X11/Xsession.d/52gtk3-nooverlayscrollbar-nocsd instead.  Here's the magic:

# This file is sourced by Xsession(5), not executed.

# This file configures the global behavior of GTK3 "hidden" overlay 
# scrollbars and client side decorations. These settings may be overridden
# by individual users by setting the same variables to different values in
# in their ~/.xsessionrc.

BASESTARTUP=${STARTUP%% *}
BASESTARTUP=${BASESTARTUP##*/}
if [ "$BASESTARTUP" = x-session-manager ]; then
    BASESTARTUP=$(basename $(readlink /etc/alternatives/x-session-manager))
fi
case "$BASESTARTUP" in
  gnome-session*)
      # This is GNOME, make sure settings are left at their defaults.
      unset GTK_CSD
      unset GTK_OVERLAY_SCROLLING
      unset LIBOVERLAY_SCROLLBAR
      ;;
  *)
      # Not GNOME, and the user didn't specify settings themselves, 
      # so set them to 0.
      if [ -z "$GTK_OVERLAY_SCROLLING" ] ; then
          GTK_OVERLAY_SCROLLING=0
      fi
      export GTK_OVERLAY_SCROLLING
      if [ -z "$LIBOVERLAY_SCROLLBAR" ] ; then
          LIBOVERLAY_SCROLLBAR=0
      fi
      export LIBOVERLAY_SCROLLBAR
      if [ -z "$GTK_CSD" ] ; then
          GTK_CSD=0
      fi
      export GTK_CSD
      ;;
esac

Some comments from the author:

This *MUST* go *AFTER* ~/.xsessionrc is sourced!
I shamelessly stole the basic logic from the nocsd package, which does something _very_ similar anyway.
Actually, that package is named "gtk3-nocsd", FWIW

And here's the antidote to reverse it:

# To disable the Clearlooks-Phénix-Purpy GTK3 hack
# place the following lines in ~/.xsessionrc:

GTK_OVERLAY_SCROLLING=1
export GTK_OVERLAY_SCROLLING
LIBOVERLAY_SCROLLBAR=1
export LIBOVERLAY_SCROLLBAR
GTK_CSD=1
export GTK_CSD

Offline

#16 2018-02-03 16:49:46

sixsixfive
Member
From: behind you
Registered: 2012-04-08
Posts: 579
Website

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

putting that in your xsession file works too and is needed for some display managers that don't use /etc/environment(hello LXDM). however it has the downside that all applications that run as a different user will have overlay scrollbars(eg: Synaptic)

Offline

#17 2018-02-03 22:12:14

golinux
Member
Registered: 2011-11-19
Posts: 127

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

@sixsixfive . . . I'm thinking that a README for the theme explaining all this might be a good idea.

Offline

#18 2019-07-17 13:26:13

fsmithred
Member
Registered: 2019-07-06
Posts: 10

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

I'm resurrecting this thread because I'm helping golinux with packaging the new desktop theme for the next devuan release - beowulf (=buster).

The fix for the scrollbar works in the new system just as it did in the previous release - i.e. it works correctly for the user, but it doesn't work if you run root applications from the menu, such as synaptic.

I tried running synaptic in different ways and found the following:
- "su" to get root in a terminal and run /usr/sbin/synaptic and the scrollbar fix works.
- Run synaptic from menu (it executes synaptic-pkexec) or run synaptic-pkexec as user in a terminal and the fix does not work.

If I log into an xfce session as root (for testing purposes only!) I get the same behavior as for user. It works by starting /usr/sbin/synaptic in a terminal but not from the menu.


sixsixfive wrote:

all applications that run as a different user will have overlay scrollbars(eg: Synaptic)

man pkexec says:

pkexec allows an authorized user to execute PROGRAM as another user.

I'm not optimistic about a solution, but I thought I'd check anyway. If you have any ideas for a way around this block, I'd love to hear it.

The only ways I can think of would be outside the scope  of a desktop theme, (Like hacking synaptic's .desktop file or polkit file.) Hacking on policykit itself might be an option, because we do repackage that for devuan. (I'll talk to the maintainer.)

Any ideas are welcome. Thanks.

Offline

#19 2019-07-17 16:25:40

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,931

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

It appears that this restriction is by design. See this bug report for more info. This report contains a patch to the pkexec executable to allow the passing of extra environment variables.

diff -Npur polkit-0.113.orig/src/programs/pkexec.c polkit-0.113/src/programs/pkexec.c
--- polkit-0.113.orig/src/programs/pkexec.c	2015-06-18 22:20:50.000000000 +0200
+++ polkit-0.113/src/programs/pkexec.c	2016-06-29 00:17:11.024044939 +0200
@@ -483,6 +483,13 @@ main (int argc, char *argv[])
      */
     "DISPLAY",
     "XAUTHORITY",
+    "KDE_FULL_SESSION",
+    "KDE_SESSION_VERSION",
+    "GNOME_DESKTOP_SESSION_ID",
+    "XDG_CURRENT_DESKTOP",
+    "QT_STYLE_OVERRIDE",
+    "QT_XCB_FORCE_SOFTWARE_OPENGL",
+    "QT_QPA_PLATFORMTHEME",
     NULL
   };
   GPtrArray *saved_env;

In lieu of ones listed you could use GTK_OVERLAY_SCROLLING to pass that environment variable along with the default DISPLAY and XAUTHORITY.

Naturally this is not encouraged because it potentially weakens the security framework created by polkit.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#20 2019-07-17 22:43:01

fsmithred
Member
Registered: 2019-07-06
Posts: 10

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

Thanks. I shared that information with someone who can do something about it, and we're going to experiment with policykit and see if we can do it safely. I'll let you know how it turns out.

Offline

#21 2019-07-23 11:56:21

fsmithred
Member
Registered: 2019-07-06
Posts: 10

Re: [SOLVED] Possible to disable hidden scrollbars from within a theme?

Looks like we fixed it. I tested new packages and root now gets normal scrollbars in synaptic.

Here's a diff for anyone interested in the code:
https://git.devuan.org/amesser/policyki … 8486ca51f0

Thanks again for helping with this.

Offline

Board footer

Powered by FluxBB