Bug 239832 (mate, secpanel, under) - security/secpanel hard-coding of "gnome-terminal" fails under mate-only installation
Summary: security/secpanel hard-coding of "gnome-terminal" fails under mate-only insta...
Status: Open
Alias: mate, secpanel, under
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-gnome mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-13 21:18 UTC by Jim D.
Modified: 2019-08-23 11:41 UTC (History)
1 user (show)

See Also:
w.schwarzenfeld: maintainer-feedback?


Attachments
svn-diff-secpanel (1.18 KB, patch)
2019-08-19 03:59 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-secpanel_v2 (1.18 KB, patch)
2019-08-19 04:01 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-secpanel_v3 (1.18 KB, patch)
2019-08-19 04:08 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-nspr_v4 (2.31 KB, patch)
2019-08-20 13:35 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-secpanel_v5 (2.31 KB, patch)
2019-08-23 06:33 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-secpanel_v6 (2.31 KB, patch)
2019-08-23 11:41 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jim D. 2019-08-13 21:18:37 UTC
usr/local/lib/secpanel/termdefs.txt:set termtype(GNOME-Terminal_path) "gnome-terminal"

and

stage/usr/local/share/secpanel/termdefs.txt:set termtype(GNOME-Terminal_path) "gnome-terminal"

will fail in a mate-only installation where gnome-terminal is not installed (eg; no terminal window opens up and the requested action fails)

Possible solutions:
a) add make code to the Makefile to force a choice of "gnome-terminal", "mate-terminal", or soemthing else (eg; xterm ?)

b) mate system user creates a link between "mate-terminal" and "gnome-terminal" in the path above; this would imply a friendly suggestion in the port "pkg-descr" file

c) mate system user installs "gnome-terminal" and everything thing is "hunkey-dorey"; this probably won't cause any undesirable side affect of installing more of Gnome as all of the gnome-terminal requisites also can be found in the "mate" environment
Comment 1 Jim D. 2019-08-13 21:27:47 UTC
Hmm - spoke too soon about installing gnome-terminal not requiring more non-mate programs. Looking further down the gnome-terminal Makefile I now see:

gnome-shell:x11/gnome-shell

and mention of nautilus.

Suggestions a) and b) offered earlier would seem to be better so as to not "contaminate" a mate-only installation with more "gnome" applications.
Comment 2 Jim D. 2019-08-17 15:33:59 UTC
Hmmm - can't find the reference to "stage/usr/local....." so just the usr/ports/security/secpanel/work/usr/local...." reference is relevant (as it is a subdirectory of "secpanel/work").

One could also apply a 'diff -c' patch to the installed "/usr/local/share/secpanel/termdefs.txt" file, but this is then a user function rather than a port Makefile option.
Comment 3 Walter Schwarzenfeld freebsd_triage 2019-08-17 15:53:38 UTC
(In reply to Jim D. from comment #1)
I don't really understand what happens. 
Does gnome-terminal not install or not start?

Please
Post the exact error-message.
Comment 4 Jim D. 2019-08-18 22:35:31 UTC
It is not a problem of gnome-terminal failing to be installed.

The issue is that secpanel's default configuration specifically uses "gnome-terminal" as its runtime option. I do not have the Gnome desktop installed - I have the Mate desktop installed. Hence - "gnome-terminal" is not installed. This makes secpanel unusable as it attempts to invoke "gnome-terminal" which doesn't exist.

By changing the secpanel default terminal definition to "mate-terminal", I can now get the full secpanel functionality without the Gnome desktop.

The suggestions offered were to modify the Makefile to provide a port installer the option of which terminal application to define for secpanel to use.
Comment 5 Walter Schwarzenfeld freebsd_triage 2019-08-19 03:59:20 UTC
Created attachment 206687 [details]
svn-diff-secpanel

You mean something like that?
Comment 6 Walter Schwarzenfeld freebsd_triage 2019-08-19 04:01:08 UTC
Created attachment 206688 [details]
svn-diff-secpanel_v2

Was a typo in.
Comment 7 Walter Schwarzenfeld freebsd_triage 2019-08-19 04:08:35 UTC
Created attachment 206689 [details]
svn-diff-secpanel_v3
Comment 8 Jim D. 2019-08-19 18:30:54 UTC
Yes - v3 looks good and provides for either/both gnome-terminal and mate-terminal. 
Thanks.

Will that also change the 'work/usr/local/lib/secpanel/termdefs.txt:set termtype(GNOME-Terminal_path) "gnome-terminal"' definition? For Mate it's just replacing "gnome-terminal" with "mate-terminal".

Of course, one could be more explicit and also replace "GNOME-Terminal_path" but that would probably force other changes. It is the later part that is important as it is the system command that gets executed.

I don't know if adding xterm would be useful or not.
Comment 9 Walter Schwarzenfeld freebsd_triage 2019-08-20 13:35:02 UTC
Created attachment 206726 [details]
svn-diff-nspr_v4

You have to test by yourself. Secpanel does not start on my system.
Comment 10 Jim D. 2019-08-22 21:23:42 UTC
Patches are good.
Looking at results...
Am in the middle of massive local ports updates and numereous issues.
Will get back to you when able to.
Have found some things in the runtime script to look at.
Comment 11 Jim D. 2019-08-22 23:12:48 UTC
Now that I have TK and TCL reinstalled, there is one change needed in file patch (case change):

set termtype(Mate-Terminal_...).. => set termtype(MATE-Terminal_...) ..

Application works with patches and local modifications.

Still need to do more testing from application removal to application installation as there seems to be some differences in the "config" file that gets created versus what I had after making simple "Gnome" => "Mate" change in the  "<home>.secpanel/config" file. By default, the inital "config" file has only 2 lines whereas my "in-use config" file has 20 lines. 

FWIW - I also modified the 'set termtype(MATE...path) "mate-terminal"' to include a geometry paramater " --geometry=97x26". Don't know of an easy way to provide another Makefile option to select a "default terminal window size". May be able to specify a mate-terminal profile as defined by user (profile/General "Use custom default terminal size") using the mate-terminal "--profile=" parameter rather than raw geometry parameter.

P.S. I use this application A LOT and it is VERY HANDY. I only have 15 entries ("secpanel profiles") but it saves me a lot of work opening up multiple, concurent, SSH sessions which I use just about every day for my own PHP/Apache development).
Comment 12 Walter Schwarzenfeld freebsd_triage 2019-08-23 06:33:53 UTC
Created attachment 206813 [details]
svn-diff-secpanel_v5

Change set termtype math-terminal to MATE-terminal.
Comment 13 Walter Schwarzenfeld freebsd_triage 2019-08-23 11:41:47 UTC
Created attachment 206821 [details]
svn-diff-secpanel_v6

v5 was the wrong change.