Version: (using KDE KDE 3.5.4) Installed from: Compiled From Sources Compiler: gcc version 4.1.1 OS: Solaris Applications like "konsole" cannot create utmpx(4) entries on Solaris systems because kdelibs/kdecore/kpty.cpp seems to require the utempter which is usually not available on Solaris (maybe other SystemV based OSes as well?). This breaks for example Sun's mass storage device management scripts like utdiskadm(1M) (when called from konsole) which rely on logname(1). Patch follows shortly.
Created attachment 17366 [details] kdelibs/kdecore/kpty.cpp Proposed patch to add utmpx support in libkdecore (KDE 3.5.x). This is currently protected by #ifdef USE_SOLARIS but may be usable on other OSes without utempter as well?
From pututxent(3C): "When called by a non-root user, pututxline() invokes a setuid() root program to verify and write the entry, since the utmpx database is normally writable only by root." Looks like Solaris utmpx management had the functionality of utempter built in. Other OSes could be checked for similar descriptions to find out if the solution would apply there as well. The presence of utmpx.h alone is not enough; on Linux that header and the used functions all exist as well, and still they will only work for users with direct write access to utmp. I know your patch doesn't really check for the header, just wanted to make this point clear.
SVN commit 748812 by ossi: try to write utmp even if neither utempter nor login() are found. includes utmpx support. BUG: 132376 M +15 -5 ConfigureChecks.cmake M +5 -0 config-pty.h.cmake M +89 -10 kpty/kpty.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=748812