Accessibility: lack of full dark theme for RStudio in Ubuntu 24.04 and 26.04
https://askubuntu.com/questions/1567158/accessibility-lack-of-full-dark-theme-for-rstudio-in-ubuntu-24-04-and-26-04
I am visually impaired and rely on a fully dark user interface in order to work comfortably. I use RStudio for scripting and data analysis, and I am having a dark-mode accessibility problem on Ubuntu.
I have tested this on Ubuntu 20.04 LTS, 24.04 LTS, and 26.04 LTS. On Ubuntu 20.04, RStudio behaved more consistently for me, however from Ubuntu 24.04 LTS onward, RStudio is not fully dark even when both Ubuntu and RStudio are configured for dark mode.
What happens:
Ubuntu/GNOME is set to Dark Mode in the system settings.
RStudio is set to a dark editor theme.
Most of the RStudio interface becomes dark.
However the top title/menu bar, menu dropdowns, and right-click context menus remain bright/light.
This causes accessibility problems for me because I need the whole application interface to be dark, not only the editor area. (It hurts my eyes.)
I already discussed this at the Posit Community forum.
A Posit employee explained that on Linux/GNOME, RStudio’s title bar and menus seem to depend on the operating-system theme rather than only RStudio’s internal theme. They also mentioned that this may be related to a GNOME/Electron theme-handling issue.
On my system, the following command shows that GNOME prefers dark mode:
gsettings get org.gnome.desktop.interface color-scheme
It returns:
'prefer-dark'
I also tried setting the GTK theme manually:
gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-dark'
...however RStudio still starts with a light title/menu bar when launched normally.
The only workaround I found is starting RStudio like this:
GTK_THEME=Yaru-dark rstudio
When I do that, the RStudio title/menu bar becomes dark.
My question is:
How can I make RStudio always use the dark GTK/Yaru theme on Ubuntu when launched normally from the desktop launcher, without having to start it manually from the terminal with GTK_THEME=Yaru-dark rstudio?
Is this likely caused by Ubuntu/GNOME theme settings, the RStudio desktop launcher, Electron, or something else? Interestingly, the Posit Employee set everything up like I did (Ubuntu 26.04 LTS, the same RStudio download link and version), but he was getting everything in dark.
I remember from Ubuntu 24.04 LTS that also other Apps were affected, but I don't have that Laptop anymore. The best would be a workaround and even better, to avoid using a workaround for certain apps, to normally install and use since these topics are not my expertise.
Any help would be appreciated, especially because this affects accessibility in my case.