Re: OT: logname?
To quote "Christopher W. Aiken" <cwaiken@telerama.com>,
#
# Slightly off topic. There is a utility, /usr/bin/logname
# that returns the "login name" of the user. The problem is:
#
# 1) in xterm, Eterm, kterm logname works OK
# 2) in gnome-terminal and kconsol logname always returns
# "logname: no login name"
#
# Why doesn't "logname" work correctly all of the time?
#
# We have an application what depends on the "logname"
# function to return the correct value. If a user installs
# Gnome or KDE the activity bar at the bottom has a "gnome-terminal"
# or "kconsol" by default. If they use those Icons to open up a
# work space, logname will not work. We shouldn't have to instruct
# our customers to setup an xterm, Eterm, of kterm just so that the
# logname function will work.
#
# Any ideas?
Well, I've got a WORKSFORME first; in gnome-terminal, 'logname' works
perfectly. However, I do see the error in Konsole. I'm using stock
Debian packages, through and through. No Helix or anything else(running
Sid).
I don't know what the problem is, but $USER works too. Also, the source
for both the trouble emulators is available.
Dave
Reply to:
- References:
- OT: logname?
- From: "Christopher W. Aiken" <cwaiken@telerama.com>