To fix an issue I was having with GTK apps on Wayland (KDE Plasma 6) I went to /usr/share/applications found the .desktop file I wanted to change, right clicked, went to enviornmental variables and added Exec=env GDK_BACKEND=x11 to force the app to use X11. This fixed my problem. However, I checked .zshrc, .bashrc expecting to see the change there but did not. I don’t have /etc/environment or .profile on my system it seems. I’d like to know where these changes were saved. I also tried opening the .desktop file in a text editor to no avail. This was supposed to be a temporary fix while waiting for the developer to fix a scaling issue on Wayland. I’m not sure how to revert it.

  • devfuuu@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 days ago

    nowadays the place to put environment variables to apply to the session is at .config/environment.d/. just put files like waylandfix.conf with the content want.

  • A_norny_mousse
    link
    fedilink
    arrow-up
    1
    ·
    1 day ago

    I’d like to know where these changes were saved.

    what you describe isn’t changed anywhere but in the desktop file and in the environment (i.e. somewhere in RAM) of the application while it runs.

    Are you saying you reverted the edit and the app still runs in Xorg instead of wayland? In that case there might be a setting inside the app that does that (the full set is not always accessible via gui)?

  • sorrybookbroke@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 days ago

    Huh, odd you can’t edit that file. You may be able to change it in the ‘menu editor’ (KMenuEdit) application however which is my goto. In the future I’d add any application specific environment variables in there instead of editing it the way you’ve done. This is likely causing issue. I could be wrong though.

    As for where is it stored, it’s usually stored in that .desktop file. It won’t be in your bashrc, or anything like it, as what you’ve done isn’t changing your system as a whole. All it does is tell plasma when you want to launch this application, first run that bit of code you’ve given in the same bash context (or whatever your default shell is. The shell that runs when you use the sh command normally). This is good because I doubt you want all GDK apps to use x11 and this environment variable should only exist for the app you want it to.

    Edit: wait, what .desktop filedid you edit? Are all GTK apps now x11? Have you tried the right click method you did before? To what effect?

    • daggermoon@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      KMenuEdit was the solution. Not all GTK apps are x11. Only a few that won’t work with my global menu bar and the before mentioned app with scaling issues. Thank you!