Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh client issues with uploading text
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cslyon
n00b
n00b


Joined: 21 Apr 2004
Posts: 68
Location: California

PostPosted: Wed Apr 21, 2004 11:52 pm    Post subject: ssh client issues with uploading text Reply with quote

I have installed Gentoo and so far so good. I have everything running that I need to have running but there is one problem that I noticed. I am trying to cut and paste some perl scripts that I have into the system using either PuttySSH or F-SecureSSH's client and the text is getting all messed up when I upload it. Is this a problem with a setting on the system. I have done this before with other linux system but have not seen this problem.

Any ideas?
Back to top
View user's profile Send private message
Andersson
Guru
Guru


Joined: 12 Jul 2003
Posts: 525
Location: Göteborg, Sweden

PostPosted: Thu Apr 22, 2004 12:56 am    Post subject: Reply with quote

What kind of problem? It sounds like you're pasting from windows, are you talking about the line feeds ("^M" on each line)? If so, there are several scripts to convert between unix and windows line feeds. In portage there is something called app-text/dos2unix.

If not, please describe the problem again :)
Back to top
View user's profile Send private message
cslyon
n00b
n00b


Joined: 21 Apr 2004
Posts: 68
Location: California

PostPosted: Thu Apr 22, 2004 4:56 am    Post subject: Reply with quote

You are correct, I am pasting from windows and the text turns out looking like this:


Source:
This is text on line one
This is text on line two (tab out)
This is text on line three (tab out)
This is text on line four (tab out)

Once Pasted into vi or nano
This is text on line one
----------This is text on line two (tab out)
-----------------This is text on line three (tab out)
------------------------This is text on line four (tab out)

The '-' are spaces!
So it seems to be just a problem in vi and not so much nano.

Sorry, should have put this in the orignal post.


Last edited by cslyon on Thu Apr 22, 2004 5:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Valhlalla
Apprentice
Apprentice


Joined: 22 Sep 2003
Posts: 161
Location: Sydney, Australia.

PostPosted: Thu Apr 22, 2004 5:01 am    Post subject: Reply with quote

Maby you need to switch paste on and off in Vi, cant remember the command off the top of my head sorry.

[edit] in vimrc put
Code:
set pastetoggle=<F8>

or whatever key you want

see if that helps
_________________
Pork Chop Sandwiches, Oh Sh*t!
Back to top
View user's profile Send private message
cslyon
n00b
n00b


Joined: 21 Apr 2004
Posts: 68
Location: California

PostPosted: Thu Apr 22, 2004 5:26 am    Post subject: Reply with quote

OK,
I didn't have a .vimrc but I put just that line in and it is still doing it.
It is tabbing out everything that I paste into vim for some reason.
Back to top
View user's profile Send private message
Valhlalla
Apprentice
Apprentice


Joined: 22 Sep 2003
Posts: 161
Location: Sydney, Australia.

PostPosted: Thu Apr 22, 2004 6:27 am    Post subject: Reply with quote

when you press the pasttoggle key did vim show "paste mode on" or whatever it is?
_________________
Pork Chop Sandwiches, Oh Sh*t!
Back to top
View user's profile Send private message
Andersson
Guru
Guru


Joined: 12 Jul 2003
Posts: 525
Location: Göteborg, Sweden

PostPosted: Thu Apr 22, 2004 12:02 pm    Post subject: Reply with quote

Yes, vim does this for me as well. It's the autoindentation that freaks out. There are a few threads about this. I usually enter :set paste, then paste, then :set nopaste, but having a quick key for it is an excellent idea!
Back to top
View user's profile Send private message
cslyon
n00b
n00b


Joined: 21 Apr 2004
Posts: 68
Location: California

PostPosted: Thu Apr 22, 2004 5:50 pm    Post subject: Reply with quote

That did the trick. I did try to get the .vimrc stuff to work but couldn't get it to work. I will give it a google to see what I can find. I am sure I am missing something from lack of sleep this past week.


Anyway, thank you for your help.
Back to top
View user's profile Send private message
cslyon
n00b
n00b


Joined: 21 Apr 2004
Posts: 68
Location: California

PostPosted: Fri Apr 23, 2004 4:49 pm    Post subject: Reply with quote

Another question somewhat unrelated. when using the ssh clients, backspace and delete are the same. There are checkboxes within the client but they don't help. Is that a keyboard mapping or layout within gentoo?
Back to top
View user's profile Send private message
Andersson
Guru
Guru


Joined: 12 Jul 2003
Posts: 525
Location: Göteborg, Sweden

PostPosted: Fri Apr 23, 2004 4:53 pm    Post subject: Reply with quote

Change the keyboard map in /etc/rc.conf and see if it helps.
Back to top
View user's profile Send private message
cslyon
n00b
n00b


Joined: 21 Apr 2004
Posts: 68
Location: California

PostPosted: Wed Apr 28, 2004 2:28 pm    Post subject: Reply with quote

I have tried a few different settings US, UK for the keyboard but what else should I try to fix the backspace issue on ssh?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum