full dark theme for Rstudio within Ubuntu 24.04 and 26.04 LTS

Dear community and developers,
as a visual impaired person, I rely on some features to be able to work efficiently and I am glad that Rstudio has implemented some that I am making use of, such as Dark mode themes.

Since I am using Rstudio on Ubuntu 20.04 lts, 24.04. lts and just tried it on 26.04. lts, I realized that Rstudio is not 100 % in Dark Mode from 24.04. LTS onward.
While by default Rstudio is in White Mode, meaning everything is very bright and hurts my eyes (maybe this can be adapted to global OS setting?), even after changing to a Dark Theme in-app, the "global environment" setting are still bright and the font small. Also, the Top bar of the window always stays bright, which with my eyes can still be okay, but I rely on a whole interface Dark Theme.
I wondered if this can be changed from developer's point of view? It would be great : )
And with my retinal degeneration progressing in the next few years towards blindness, I will come up with more and more inquiries and ideas to help make Rstudio and other products more accessible, since accessibility does not begin with/for legally blind people.
cheers.

2 Likes

The most recent release of RStudio (2026.04.0+526) has made progress in supporting dark mode for more of the UI (when you choose a dark theme via Tools > Global Options > Appearance > Editor Theme) .

Things like Global Options and other dialogs will now have a dark appearance. We didn't get to everything, the Git window is still brighter than the sun, and a few other odds and ends, but we'll be continuing to fix these in subsequent releases.

1 Like

Thank you for this update. Looks nice!
So left are "only" the top bar with all it*s menu dropdowns as well as the right-click dropdown it seems for the dark-mode to be fully established. That is great. I hope these can be implemented in the next or so release of RStudio.
Thanks again for the effor.

Yeah, on Ubuntu, the RStudio titlebar and menus show in dark mode based on the operating system setting (and not based on RStudio's theme).

So with Ubuntu desktop (26.04 LTS) set to regular theme and RStudio using a dark theme, I see:

Switching Ubuntu to dark gives me this:

It would make sense to have all of RStudio switch based on its own theme, I think that's how it behaves on other platforms (need to double-check). This might be a Linux-only Electron quirk, I'll have to look closer.

Confirmed that this is a GNOME-specific Electron quirk. Currently the only way we could work around this would be to draw our own title bar and menus, instead of using the ones supplied by GNOME. So for the foreseeable future you'd need to switch the whole desktop to dark mode for RStudio's titlebar and menus to also be dark.

Here's one of the Electron issues that mentions this: [Bug]: `nativeTheme.themeSource = 'dark'` does not work on Ubuntu 20 · Issue #28887 · electron/electron · GitHub

Thanks for the help.

I’m on Ubuntu 26.04 LTS with GNOME dark mode enabled. Initially I had:

gsettings get org.gnome.desktop.interface color-scheme
'prefer-dark'
gsettings get org.gnome.desktop.interface gtk-theme
'Yaru'

I then changed the GTK theme to dark:

gsettings set org.gnome.desktop.interface gtk-theme 'Yaru-dark'

After restarting RStudio normally, the title/menu bar was still bright/light.
However, launching RStudio from terminal with:

GTK_THEME=Yaru-dark rstudio

DID work, the RStudio window decorations/menu/title bar became dark.

So it seems the system dark mode and GTK dark theme are present, but RStudio/Electron is not picking them up correctly when launched normally from the desktop launcher.

Also interesting: when launched this way (in termina with yaru dark), RStudio first briefly shows a white loading window, with dark top menu, before the UI becomes fully dark.
Terminal output during launch:

[14606:0514/191337.861526:ERROR:media/gpu/vaapi/vaapi_wrapper.cc:1631] vaInitialize failed: unknown libva error

(not sure if related or just harmless Electron GPU/v i d e o acceleration noise)

This seems to confirm the Electron/GNOME theme detection issue you mentioned earlier, because forcing GTK_THEME=Yaru-dark per-process works immediately.

I find it fascinating that in your case, changing Ubuntu to Dark theme in the GUI Settings also changed whole Rstudio to dark mode (including the top menu bar). In my case this did not help.

Since i am doing this with help of an LLM, I still rely on info on your side on what is possible on Rstudio's side and when would it be time to contact developers of Ubuntu, Electron, or others.

p.s. why am i not allowed to write "v i d e o" on here? ^^

Right, setting dark theme via the OS GUI Settings made RStudio's titlebar and menus adopt the dark mode when I tried it on Ubuntu 26.04 LTS.

The rest of the RStudio UI is not aware of OS settings and only changes based on the RStudio Editor Theme selection in RStudio settings.

As for why it's not working for you, I'm not familar with customing via gsettings, etc., so don't know if that's a factor. My system is a clean install of Ubuntu 26 plus the tools needed for building RStudio from source. I tend to use the GNOME settings as-is since I frequently nuke and rebuild this machine.

Thanks, that helps clarify the difference.
I am not building RStudio from source. I downloaded RStudio Desktop directly from Posit (since I have not found the Ubuntu 26.04 lts, I used the 24.04 lts files) and installed the official package, and I am using the official Ubuntu 26.04 LTS image, not a modified distribution or custom desktop environment.

My system is set to Dark mode through the normal GNOME Settings GUI. I also tried checking/changing this with gsettings , but RStudio still launches with a light title/menu bar by default, both from the desktop launcher and from the terminal.

The only way I can make the title/menu bar dark is by explicitly launching it with:

GTK_THEME=Yaru-dark rstudio

So maybe the difference is the Posit-provided binary/package versus your local source build, or that the Posit package is not picking up the system GTK theme unless GTK_THEME is forced.

From here on, I don't know why this won't work. Since this is the third laptop this does not work (previously on Ubuntu 24.04 LTS OS).
Any further idea? Can this be tackled by Posit team alone? Or do I need to contact someone else?

I was using the official release of RStudio (the 24.04 lts version), not one I had built myself.

Just tried it again and still obeying the setting. No idea what is different on your system.

I would guess this is either a long-standing issue in Electron and/or maybe some competing GNOME settings on your system, but I don't know anything about GNOME beyond the basics so not sure what to suggest next.