[Xfce-bugs] [Bug 16559] New: Support for environment variables or desktop files in Preferred Applications

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Mon Mar 16 09:05:58 CET 2020


https://bugzilla.xfce.org/show_bug.cgi?id=16559

            Bug ID: 16559
           Summary: Support for environment variables or desktop files in
                    Preferred Applications
    Classification: Xfce Core
           Product: Exo
           Version: 0.12.11
          Hardware: PC (x86_64)
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: Utilities
          Assignee: xfce-bugs at xfce.org
          Reporter: harish.rajagopals at gmail.com
  Target Milestone: Exo 0.12

I would like to configure default applications using environment variables for
use with exo-open.

In my use case, I want to set Alacritty as the default terminal emulator, but
with the environment variable WINIT_HIDPI_FACTOR=1. The way I've currently
registered this in the Preferred Applications GUI, in the Utilites tab for the
Terminal Emulator, is:

  bash -c 'env WINIT_HIDPI_FACTOR=1 alacritty'

This works if I run the following:

  $ exo-open --launch TerminalEmulator

However, if I pass additional arguments, they are ignored. For example:

  $ exo-open --launch TerminalEmulator htop

This simply opens Alacritty without opening htop. Similarly, when certain
.desktop files are set to open in the terminal, they will not open. Instead,
only an ordinary terminal window opens.

The above setting in the Preferred Applications GUI is the only way in which
the first command can run. I have tried the following setups:

  bash -c 'env WINIT_HIDPI_FACTOR=1 alacritty "%s"'
  bash -c 'env WINIT_HIDPI_FACTOR=1 alacritty' "%s"
  bash -c env WINIT_HIDPI_FACTOR=1 alacritty "%s"

None of them work.

I have already configured the desktop file for Alacritty to have the required
environment variables set. Is there a way to get exo-open to use the desktop
file? Or is there another way to pass environment variables in the Preferred
Applications GUI along with possible command line options ("%s")?

This issue has been discussed here:
https://forum.xfce.org/viewtopic.php?id=13829

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list