Skip to content

Conversation

@GWRon
Copy link
Contributor

@GWRon GWRon commented Jul 28, 2017

This should work an many distributions. Without "notify" just does nothing except printing the text to the standard console (not visible in all cases).

@GWRon
Copy link
Contributor Author

GWRon commented Oct 20, 2017

Someone should decide if this PR is worth to get merged or not.

@GWRon
Copy link
Contributor Author

GWRon commented Feb 13, 2018

Bump.

@GWRon
Copy link
Contributor Author

GWRon commented May 14, 2019

@woollybah
Maybe we should fall back to "print" if xmessage is not installed?

@GWRon
Copy link
Contributor Author

GWRon commented May 14, 2019

For NG we would of course need to do the same in "brl.mod/systemdefault.mod"

@woollybah
Copy link
Member

Presumably xmessage may not be installed?

@GWRon
Copy link
Contributor Author

GWRon commented May 14, 2019

It's like saying x11 is not installed but relaying on it. Some modules here wont work on ALL linux platforms - but on the majority.

There is no cross-platform message-window-solution - which is why I thought of using the one which might be installed on the most desktop linux systems: x11 (and so we can access xset, xmessage ...). If the system call fails we can still print out the message.

I also know that there are other things (confirm, request...) which are not tackled by it but I assume that notify() is among the most used of these unsupported functions.

@GWRon
Copy link
Contributor Author

GWRon commented May 14, 2019

OpenUrl-code for Linux contains this (including my recent fix):

	Method OpenURL:Int( url$ ) Override
		'environment variable is most likely set for desktop environments
		'working with the freedesktop.org project / x.org
		'So this works at least for KDE, Gnome and XFCE
		If getenv_("XDG_CURRENT_DESKTOP")
			system_("xdg-open ~q"+url+"~q")
		'Fallback for KDE/GNOME
		ElseIf getenv_("KDE_FULL_DESKTOP")
			system_("kfmclient exec ~q"+url+"~q")
		ElseIf getenv_("GNOME_DESKTOP_SESSION_ID")
			system_("gnome-open ~q"+url+"~q")
		EndIf
	End Method

If wished I could come up with a similar solution for the notifier (try to find "gnome"/"kde" specific commands)

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

Successfully merging this pull request may close these issues.

2 participants