Page 1 of 1

Boot into PuTTY automatically

Posted: Tue Jun 25, 2013 9:32 pm
by ela
Hello,
I am pretty green to Linux. I have searched the net and successfully enabled auto login.
I also have been able to create startup script.

It appears the problem I am encountering is that I am not properly setting up the environment to run PuTTy from a command line?
When I try to start it from the start up script I get the error " cannot open display".

Can someone direct me as to what else I need to do to correct this?

I am not using SSH from a remote computer. I am running Putty locally on the the Raspberry Pi ( Raspbian).
I am using PuTTY as a serial terminal to display data from a device connected to a USB port.

The PuTTy terminal is running fine when I run it from LXDE.

I just do not know how to set up the environment for it to run from a command line ( startup script).

Re: Boot into PuTTY automatically

Posted: Tue Jun 25, 2013 10:12 pm
by topguy
Googling for the man page for putty for linux I found this line.
putty is a graphical SSH, Telnet and Rlogin client for X. It is a direct port of the Windows SSH client of the same name.
Meaning that its not made to work without starting X first. You should find another serialport terminal program like which will work without X windows. The one I have used the most is the classic "minicom", but I'm sure that there must be better (easier) programs out there that does the same job.

Re: Boot into PuTTY automatically

Posted: Wed Jun 26, 2013 6:07 am
by rpdom
I use "screen" as a simple serial terminal. That isn't its primary function, but can be used as one quite easily and as I have it installed anyway I don't need to install something else as well.

Re: Boot into PuTTY automatically

Posted: Wed Jun 26, 2013 2:25 pm
by ela
topguy wrote:Googling for the man page for putty for linux I found this line.
putty is a graphical SSH, Telnet and Rlogin client for X. It is a direct port of the Windows SSH client of the same name.
Meaning that its not made to work without starting X first. You should find another serialport terminal program like which will work without X windows. The one I have used the most is the classic "minicom", but I'm sure that there must be better (easier) programs out there that does the same job.
Thanks for the replies.
I also found that statement by googling. I took it that the SSH only had to do with accessing from a remote computer.
I do not mind if I need to start "X" first as long as I can also automatically run putty after "X" is started?

I had changed my start up script to run startX sucessfully but I did not know how to, or if I could, then also run Putty from that script or in some other fashion?

I would like to stick with PuTTy if possible but am willing to try others if I need to. It took some learning/setup to get Putty working as I wanted and would prefer to avoid another learning curve if possible.

Re: Boot into PuTTY automatically

Posted: Wed Jun 26, 2013 3:24 pm
by pluggy
If you're SSHiing to another computer from the Pi, I'd just use the built in SSH client rather than installing Putty and having to run it from X.

From the command line on the Pi

ssh username@ipaddress

eg

ssh root@192.168.1.254

If you set up ssh keys you can dispense with having to put the password in. I always considered Putty a fudge for operating systems that didn't do it themselves.

You'd need to set the Pi to login automatically and put the ssh command in a file .bashrc (google it)

Re: Boot into PuTTY automatically

Posted: Wed Jun 26, 2013 3:32 pm
by fredoll

Re: Boot into PuTTY automatically

Posted: Wed Jun 26, 2013 7:57 pm
by ela
Thank you Fredoll,
I am sure that is what I am looking for however I have been unsuccessful at getting it to work.
There are a few different methods indicated and I tried each. A few hours spent due to my unfamiliarity with this environment.

Would you so kindly offer some more detailed instructions for the preferred method?

I created the ~/.config/autostart directory and tried putting a PuttY.desktop file there with the 3 line text indicated in the one link.

I also tried using the $ ln -s /usr/share/applications/PuTTY.desktop ~/.config/autostart/ to create the link.

There must be a small detail I am missing?

Re: Boot into PuTTY automatically

Posted: Thu Jun 27, 2013 1:56 pm
by ela
Is there an existing, or a configuration that can be set, to create a boot history file?
I would like to review the boot sequence , that normally scrolls off screen, after boot is finished so that I can see if an error is produced.
I am hoping this would provide some insight into why I am failing in this effort.

I can see that the link is created, do I also need to do this?:
"Once .desktop files have been added you can manipulate them with the GUI configuration tool lxsession-edit. "

to be able to complete it? After I create the link it does not appear in the "Desktop Session Settings". I thought that it should without having to use the additional configuration tool?

Re: Boot into PuTTY automatically

Posted: Thu Jun 27, 2013 9:53 pm
by ela
How green am I ?

Finally got it to work adding " @putty " to this file:
~/.config/lxsession/LXDE/autostart file.

Seems I tried too hard to duplicate the PuTTY when it much preferred putty. :?

Thanks for the direction

Re: Boot into PuTTY automatically

Posted: Mon May 27, 2019 3:43 pm
by saxenak
Hi Ela,
I know this is an old post but I am presently in exactly the same situation. I would like to boot into the putty client in my raspberry pi and preferably also auto login to a putty session upon start up. It seems like you have gone through this same learning curve before. Could you please explain to me what you did to accomplish this?
Thanks a lot!

Re: Boot into PuTTY automatically

Posted: Mon May 27, 2019 5:06 pm
by DougieLawson
Don't hold your breath waiting for a reply from Ela. That user hasn't visited the forum since Thu 27 Jun 2013, 22:53. (Which is precisely why you shouldn't bump old threads but should start a new thread with a complete description of your problem, what you've tried, why it doesn't work, what you're planning as a next experiment and your unanswered questions).