Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Networking > SCP hangs with commands in .bashrc

Forgot Password?
 Linux Networking   Hardware/Software related, Modems, Internet connection sharing, IPTables etc.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 12-24-2005   #1 (permalink)
Just Joined!
 
srerucha's Avatar
 
Join Date: Jun 2005
Location: Brno, Czech republic
Posts: 58
Send a message via ICQ to srerucha
SCP hangs with commands in .bashrc

Hi,
I've got strange problem:

After added command

perl do_sth_ob_bg.pl &

to my .bashrc (yes, using bash), scp to that machine stops to work, it connects and hangs. After a while, it's dropped with timeout.

Anyone could explain it ? Any suggestion to work-around ?

Thanx a lot, merry xmas ))
srerucha is offline  


Reply With Quote
Old 12-24-2005   #2 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,697
Quote:
perl do_sth_ob_bg.pl &
Well, what does this do exactly?
anomie is offline   Reply With Quote
Old 12-26-2005   #3 (permalink)
Just Joined!
 
srerucha's Avatar
 
Join Date: Jun 2005
Location: Brno, Czech republic
Posts: 58
Send a message via ICQ to srerucha
Quote:
Originally Posted by anomie
Well, what does this do exactly?
Here is it .. it displays machine load in xterm title bar. Guess that may cause the problems for scp....

srerucha@box:~> cat ~/bin/load.pl
#!/usr/bin/perl -w

use strict;
$|++;

my $host=`/bin/hostname`;
chomp $host;

while(1) {

open(LOAD,"/proc/loadavg") || die "Couldn't open /proc/loadavg: $!\n";

my @load=split(/ /,<LOAD>);
close(LOAD);

print "\033]0;";
print "$host: $load[0] $load[1] $load[2] at ", scalar(localtime);
print "\007";

sleep 2;
}
srerucha is offline   Reply With Quote
Old 12-27-2005   #4 (permalink)
Linux Guru
 
anomie's Avatar
 
Join Date: Mar 2005
Location: Texas
Posts: 1,697
I wonder if you could add that to a more appropriate place. Rather than the ~/.bashrc file, how about adding the entry to some place related to X?

Are you using KDE? If so, add it to ~/.kde/Autostart. If not, which desktop environment are you using?

If nothing is available within your desktop environment for this purpose, you could add the entry to the ~/.xinitrc file.
anomie is offline   Reply With Quote
Old 12-29-2005   #5 (permalink)
Just Joined!
 
Join Date: Nov 2005
Posts: 20
I had the same problem. If bashrc contains any echo or similar commands, scp tries t parse the messages and gets confused.
Lotharster is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 06:04 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2