Re: telnet logins

From: Randy (yates_at_ieee.org)
Date: 01/12/05


Date: 12 Jan 2005 06:07:05 -0800


> "Randy" <y...@ieee.org> writes:
>
> >> Randy <y...@ieee.org> wrote:
> >> > Is it conventional to exclude the x-client directory (on my
system
> >> > its /usr/openwin/bin) from the path when logging in over a
telnet
> >> > session?
> >>
> >> *exclude*, no. However it's pretty common to not have it in the
> >> default path, but add it when logging in via a graphical
interface,
> >> or when starting X windows.
> >
> > Semantics. Are we "excluding" or "choosing not to add"?
>
> It may be semantics, but it accurately describes what happens.

I presume you mean that in the system login scripts the path is never
modified by subtraction, i.e., by forming a path and then taking away
components. Rather, it is built by choosing what to add by
accretion. Is this correct?

> >> > The problem I'm having is that I often like to telnet into my
unix
> >> > account from my pc in order to start up an x-client, usually an
> >> > xterm. However, on our system the xclient directory is not
> >> > concatenated to the path when the source of login is via telnet.
> >>
> >> But with telnet, you don't have any display.
> >
> > Wrong. I have an x-display server running on my pc.
> >
> >> So you're already having to set up your DISPLAY variable.
> >
> > You mean interactively? Maybe. Then again maybe I've created a
login
> > script segment that automatically extracts it from my session info
and
> > assigns DISPLAY.
>
> The telnet protocol allows clients to send environment variable
settings
> to the server. Many clients use this to send the DISPLAY variable. I
> can't remember if Solaris' is one of them, since it's so long since I
> used telnet.

I don't know either.

> >> If you can do that, you can add the path to the X clients, right?
> >
> > I can rewrite the solaris operating system instead of using what's
> > already available too. Does that mean I should do it?
>
> Changing your PATH in a login file is a standard configuration
> operation. If I responded like that to you telling me how to change
the
> desktop colour on my Windows machine it would be just as
inappropriate a
> response.
>
> "Right click?? Dialog box?? Why don't I just re-write the OS!"

Your judgements are in error, in my opinion.

This is a matter of structure. We don't duplicate modules in software
for some very good reasons. Similarly it doesn't make sense to ask
users to make changes to their path for common usage options. One of
the reasons we don't is that it becomes a maintenance problem. Another
reason is that it is common sense: Why ask N users to make changes to
their path when 1 sysadmin can do it in the system login script?

Even if this is a simple one-line change to the user's login script,
this logic still holds. To argue otherwise is to invite chaos.

> > Consider the following scenarios:
> >
> > 1. I'm at home on the pc. I remotely telnet (or ssh - I get the
same
> > problem in having an incomplete path either way) to my machine at
> > work so that I don't have any other access to my unix machine. Now
> > I want to start an xterm. Where were those darned binaries? Let's
> > see - /home/... - no. /apps/... - no. /usr/bin - no. /usr/X - no.
> > etc., etc., etc.
>
> So put the directories in your PATH when you know where they are,
then
> you don't _have_ to remember.

See reasons why this is not a good idea above.

> > 2. I memorized my x-client path to be /abc/xyz. The sysadmin
changes
> > things and doesn't bother to tell me (nor should he/she need to).
> > Next time I login it's not where I expected it. Goto scenario 1.
>
> Firstly, I'd be surprised if your admin moved xterm somewhere
> else. Secondly, if the admin is moving programs that users are using
> from place to place then they should indeed be either:
> - notifying users, or
> - putting symlinks in place, or
> - updating the system default path to reflect the new location.
> Probably all three.

Why is this preferable to simply establishing the paths in the login
scripts? That way these band-aids aren't required.

> >> If you use ssh with X forwarding, not only do you prevent clear
text
> >> over the wire, you automatically set up (an encrypted) DISPLAY and
a
> >> proper PATH.
> >>
> >> > If this startup behavior for telnet logins is conventional, then
> >> > how do folks typically start xclients on a remote machine? It
seems
> >> > unreasonable to require people to know where these applications
are
> >> > kept (i.e., in order to specify a fully-qualified path to the
> >> > x-clients).
> >>
> >> So change your default PATH.
> >
> > That's a hack. See scenario 2 above. The proper thing to do is
> > set it up in the system login files, is it not? If not, why not?
>
> There is an argument that says that on a text login, like telnet, the
> path shouldn't include directories that are only useful with an X
> server.

Why does a telnet login imply there is no X server associated with the
agent logging in?

> I'm not saying it's right, but it is the default on Solaris.

If it isn't right, then let's stop doing it.

> It's not a hack. It's normal.
It may be normal, but it's still a hack if it doesn't make sense.

--RY



Relevant Pages

  • Expect, telnet, frozen console.
    ... telnet into remote host, provide username/password, surrender control to ... This script will eventually be tied into /etc/inittab so that it ... app called 'loe' which presents a login screen in 80x24 ASCII a la ...
    (comp.lang.tcl)
  • Re: Automated login, but run in a telnet console? possible?
    ... it took way too much resources for my embedded system. ... But I thought by simply automate login and select some console (telnet ... >> I have developed an embedded Linux system (app) which does its job well. ...
    (comp.os.linux.embedded)
  • Re: RSC, ALOM configuration issue
    ... Telnet escape character is '^e'. ... RSC version 2.2.1 ... Please login: admin ... I just can't close the telnet session to get ...
    (SunManagers)
  • Re: uid- task_struct --The results of the code sent by you
    ... In the case of telnet, it's a bit more complicated than that. ... with the I/O from the network going to/from ... forkptyforked child becomes the login task which eventually ... made it necessary to create virtual terminals and a separate ...
    (Linux-Kernel)
  • Re: telnet logins
    ... >> or when starting X windows. ... >> So you're already having to set up your DISPLAY variable. ... The telnet protocol allows clients to send environment variable settings ... Changing your PATH in a login file is a standard configuration ...
    (comp.unix.solaris)