I'm using Damn Small Linux (or "DSL") (which is based "non-purely" on Debian - I have access to apt-get) in a Virtual Machine.
I installed telnet server (telnetd + xinetd).
I'm also running another Virtual Machine, this time with installed telnet client in it (Linux distribution AntiX).

When I'm connecting with telnet from AntiX to DSL, I'm prompted about login+password, which is ok.
But then, when I log-in it's just shows a message and then freezes. By "freezes" I mean:

  1. I can type anything I want, but when I press ENTER the commands are not executed. Instead the cursor just moves to the next line.
  2. The line "dsl@dsl$ " (which prompts for entering a command) does not show.
  3. In the server side (DSL) the windows flash (close) when the login happens.

It seems like some process is running, but the problem is that it never stops. I have to type "Ctrl+C" to stop it and continue with the command line.

Here is a screenshot when it freezes:telnet freeze screenshot

There is also a warning in DSL's site which says that if you install the wrong application via apt-get, then you can break something, "for Instance the X server"? Could this be X server?

My questions are:

  1. Can I find out which process is running? I'm intended here only to try and make it not start again.
  2. Can I make this process not start upon telnet connection?

Logging in with root also reproduces the error.

1 Answer 1


According to this wiki page about /home/dsl/.bash_profile, the default contents of this file check if you are logging in from ssh, and if not it uses the command startx to start the X11 graphics server:

RUNLEVEL=`runlevel|cut -f2 -d' '`
if [ -z "$SSH" ]; then
   if [ $RUNLEVEL -eq 5 ]; then

So when you login from telnet, ssh is not detected, and you are probably doing startx and running X11. The simplest solution is for you to edit this file to make the command a comment, : startx, or somehow detect your telnet connection. Telnet doesn't usually set any special environment variables. You could perhaps use the command tty to see that you are on a pseudo-tty instead of a real console. Eg after the SSH= line add:

case `tty` in
/dev/pts*) SSH=telnet ;;

For a user different to dsl such as root, you need to look in its home directory to see if it is different to /home/dsl, and check out both .profile and .bash_profile. Find the directory with eg:

awk -F: '$1=="root"{print $6}' /etc/passwd
  • Well running "sudo startx" in the command line reproduces the error in server! For editing the /home/dsl/.bash_profile (which was a bit different) I added the lines you suggested for detecting the telnet connection and it worked! Now rebooting starts the GUI, while telneting does not. Thanks for searching this. Did now know .bash_profile runs at login.
    – gthanop
    Oct 16, 2017 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.