You are not logged in.
Pages: 1
I would like to configure exo-open to open Alacritty using the environment variable `WINIT_HIDPI_FACTOR=1`. I entered the following in Preferred Application in the Utilites tab for Terminal Emulator:
env WINIT_HIDPI_FACTOR=1 alacritty "%s"
However, it isn't working at all. Launching exo-open in the termnial simply prints all environment variables, as if it is only running "env", and ignoring everything else.
I have already configured the desktop file for Alacritty to have this behavior. Is there a way to get exo-open to use the desktop file?
Offline
I think there are some clues in this thread. It'd be great if you followed up with your results, good luck!
Offline
The workaround mentioned is to export the environment variable in a shell before calling the exo-open function. Also, this is inside a ".desktop" launcher file. I'm simply looking to integrate this inside exo-open itself, so that I don't have to export it everytime. Further, in some cases, like the "Open Terminal Here" option in Thunar, I don't have the liberty of exporting the environment variable, as it directly calls exo-open.
Offline
Doesn't this work?
bash -c 'env WINIT_HIDPI_FACTOR=1 alacritty "%s"'
I just tried something similar now (passing a different language value to Thunar as default file manager, editing the preferred applications item), and it worked.
Offline
Nope, doesn't work. I entered the exact same command in the "Preferred Applications" GUI, and then running exo-open via the command line didn't give me any output. Nothing occurs at all. Could you list the steps that you've followed for Thunar?
Offline
This works for me:
bash -c 'env WINIT_HIDPI_FACTOR=1.5 alacritty'
Don't enter the "%s". It seems to get added to the string automatically I believe. If you edit the content of the text field, delete the displayed "%s" before clicking okay. Probably a bug here.
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
Thanks a lot! The "%s" was the culprit. Should I file a bug?
Offline
Great!
[Off-topic] For the record, the command I used to test was:
bash -c 'LC_ALL=C thunar'
I have LC_ALL=C aliased to 'eng', so that I can take screenshots in english for forum posting, and that's the only env tweak I know of
Offline
Should I file a bug?
Probably, yes. I thought there was one, or a similar one, but I can't find anything.
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
I found a side-effect of omitting the "%s". If a desktop file is set to launch via the terminal, using "Terminal=true", then it simply launches the default terminal (Alacritty) without launching htop. This can also be replicated via the CLI as follows:
exo-open --launch TerminalEmulator htop
This simply launches Alacritty w/o htop. I'll add the details to the bug that I'll file.
Offline
For reference, the bug is filed here: https://bugzilla.xfce.org/show_bug.cgi?id=16559
Offline
I found a workaround to this. I created a new script to export any environment variables and control the "%s" options passed to exo-open. The contents are as follow:
#!/usr/bin/bash
export WINIT_HIDPI_FACTOR=1
if [ -z "$*" ]; then
alacritty
else
alacritty -e $@
fi
By passing the path to the script in the Preferred Applications GUI, I now have a workaround to the absence of desktop file support in the GUI. The only missing thing is a nice icon the GUI, but I'm not bothered by it.
Offline
Pages: 1
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 561.05 KiB (Peak: 577.9 KiB) ]