FreeBSD security settings and KDE Konsole

Konsole has this neat feature where you can automatically title each tab in the terminal-emulator window with information from the foreground process running in that tab. Useful if you have lots of shells opened to different directories in the system.
Screenshot of konsole tab bar
It’s configurable, of course, by editing the tab’s profile (Settings -> Edit Current Profile -> Tabs). There’s a printf-ish configuration widget. I usually cut it down to just %d, the working directory.

When I switched over to FreeBSD 12.0, I enabled some extra security features from the installer, and noticed that konsole was being less informative than usual:Screen shot of konsole tab bar without directories

The reason is simple: konsole uses the debugging interface (e.g. ptrace) to query its child processes, and I have turned off debugging support for unprivileged processes. A quick sysctl security.bsd.unprivileged_proc_debug=1 restores the show-current-directory functionality in konsole, although that does, of course, switch off that security feature. Set it in /etc/sysctl.conf to make it permanent.

Comments are closed.