ela
Posts: 5
Joined: Tue Jun 25, 2013 9:22 pm

Boot into PuTTY automatically

Tue Jun 25, 2013 9:32 pm

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).

User avatar
topguy
Posts: 5946
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Boot into PuTTY automatically

Tue Jun 25, 2013 10:12 pm

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.

User avatar
rpdom
Posts: 15582
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Boot into PuTTY automatically

Wed Jun 26, 2013 6:07 am

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.

ela
Posts: 5
Joined: Tue Jun 25, 2013 9:22 pm

Re: Boot into PuTTY automatically

Wed Jun 26, 2013 2:25 pm

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.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Boot into PuTTY automatically

Wed Jun 26, 2013 3:24 pm

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)
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......


ela
Posts: 5
Joined: Tue Jun 25, 2013 9:22 pm

Re: Boot into PuTTY automatically

Wed Jun 26, 2013 7:57 pm

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?

ela
Posts: 5
Joined: Tue Jun 25, 2013 9:22 pm

Re: Boot into PuTTY automatically

Thu Jun 27, 2013 1:56 pm

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?

ela
Posts: 5
Joined: Tue Jun 25, 2013 9:22 pm

Re: Boot into PuTTY automatically

Thu Jun 27, 2013 9:53 pm

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

saxenak
Posts: 2
Joined: Mon May 27, 2019 3:33 pm

Re: Boot into PuTTY automatically

Mon May 27, 2019 3:43 pm

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!

User avatar
DougieLawson
Posts: 36557
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Boot into PuTTY automatically

Mon May 27, 2019 5:06 pm

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).
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Beginners”