Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change term overriding variable and improve error handling? #98

Open
MakiseKurisu opened this issue Sep 12, 2023 · 4 comments
Open

Change term overriding variable and improve error handling? #98

MakiseKurisu opened this issue Sep 12, 2023 · 4 comments

Comments

@MakiseKurisu
Copy link

I was troubled by an stupid issue where I can launch other desktop entries but not the Looking Glass Client. Today I decided to investigate it.

Initially I though the desktop entry was bad but it worked with gkk-launch. I then launch nwg-drawer in terminal and found that it is trying to run xterm-kitty to launch a console program (which looking-glass-client is). I then realized that nwg-drawer uses $TERM as the default terminal, which is almost never going to give you a executable file name, since this variable denotes the terminal capabilities, not the binary itself.

Unfortunately there is no standard way to indicate the preferred default terminal, but whatever that would be, it is not gonna be $TERM, and such silent failure is confusing, as there is no error in main menu, and no graphical error message when the terminal failed to launch.

I think we could use $TERMINAL as overriding variable instead (used by i3 and suggested in another post, and actually check if this is a valid terminal and tell the user. Or show a graphical error message when the terminal failed to launch.

@MakiseKurisu
Copy link
Author

BTW I'm currently using -term to workaround this issue. The issue's topic is improving user experience, not how to make nwg-drawer working.

@nwg-piotr
Copy link
Owner

nwg-piotr commented Sep 12, 2023

Have you tried nwg-drawer -term xterm-kitty?

BTW: xterm-kitty should not be in the Exec= line. Terminal=true should be enough.

@MakiseKurisu
Copy link
Author

I'm currently using nwg-drawer -term kitty since xterm-kitty is not an executable on NixOS.

Here is the content of looking-glass-client.desktop, which is already defined according to your suggestion:


[excalibur@nixos:~]$ cat /nix/store/ymm52bjb2nv3smzm8vjpd670si7gvzhj-looking-glass-client.desktop/share/applications/looking-glass-client.desktop
[Desktop Entry]
Exec=looking-glass-client
Icon=lg-logo
Name=Looking Glass Client
Terminal=true
Type=Application
Version=1.4

@nwg-piotr
Copy link
Owner

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants