Programming :: SSH Timeout - Stays Infinitely In The Background

Nov 24, 2008

I have a program that calls a program on a remote host via SSH in the background. In the command similar to the following:

But the problem is, this program stays infinitely in the background. Is there any method of implementation so that I can kill it? like after 10 seconds of trying?

I am trying to refrain from using TCPKeepAlive or sshd_config stuffs configurations. I was thinking of a fork() implementation where the parent sleeps for 10 seconds and then, if the child still haven responds to it, kill it.

View 4 Replies


ADVERTISEMENT

Ubuntu :: When Set CompizConfig To Cycle Wallpapers Nothing Happens - The Background Stays The Same

Jun 30, 2011

I've set all the wallpapers I want to cycle, I've set the time to 15 sec checked the "Cycle" box but nothing happens. The background stays the same. Log in-out didn't work. I'm on Ubuntu Classic

View 6 Replies View Related

Ubuntu :: Set The Default Os To Boot As Windows 7 With A Timeout Of 1 Second - Reset The Timeout To 3 Seconds?

Aug 4, 2011

I set the default os to boot as windows 7 with a timeout of 1 second. I thought that this would be enough time to switch os ubuntu when i need to, but I am unable to. How can i reset the timeout to 3 seconds? I also cannot view the ubuntu partition within windows because of ubuntu's file system.

View 9 Replies View Related

Ubuntu :: Firefox Infinitely Replicating Bookmarks?

Aug 3, 2010

So I was playing RollerCoaster Tycoon 2 in a WINE Virtual Desktop when I went to check my email. I launched Firefox and suddenly my bookmarks started to replicate and haven't stopped. I've recorded this happening. Link here: [URL]

View 9 Replies View Related

Ubuntu :: BASH Script Keeps Looping Infinitely?

May 27, 2011

I have a simple .bashrc backup script I've been working on, but my external hard drive needs to be plugged in for it to work. So I set up a while loop, that exits after the hard drive has been plugged in and backed up. Here it is:

Code:
#/bin/bash
pluggedin=1

[code]....

View 4 Replies View Related

Programming :: Timeout For Standard Input Using Tcsetattr Not Working?

Jan 5, 2010

The code is attached..My intention is that getchar which usually blocks,should come out after 5 seconds(VTIME).But this is not happening..can anyone tell me the mistake that I make..?

#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>

[code]...

View 3 Replies View Related

Programming :: Run Function In Background?

Mar 26, 2010

I wrote a spinner in Perl and when I did a spinner in shell I could just run the subroutine in the background.

[code]...

In Perl, how do you run a function in a background and get the PID for that? I know PID in Perl is $$

View 2 Replies View Related

Programming :: Getting Return Value From Program Ran In Background?

Mar 10, 2010

I think my title pretty much explains it. I am writing a script and I want to start a program in the background, and when that program finishes I want to check the return value to make sure there was no error.For example normal I would do something like this:

#!/bin/sh
program
if [ ! $? -eq 0 ]; then
echo "There was an error"
exit 1
fi

Now I want to do something like this:

#!/bin/sh
PRTN=`program1 &`
program2
if [ ! $? -eq 0 ]; then

[code]....

In this case if program2 finishes before program1, I don't think the return value from program1 $PRTN would be valid at the time it is checked.

View 3 Replies View Related

Ubuntu Installation :: Hangs Infinitely At "Preparing To Install Netbook"?

Oct 16, 2010

I'm using a EeePC 1000H and wanted to upgrade 8.10 to 10.10.[URL].. I chose to do a new install.

The following partitions are present:

- WindowsXP, 2 NTFS partitions
- ext3 where 8.10 sits. It is of EasyPeasy-flavour (no other version available at that time)
- hidden partition where WinPE resides

I downloaded the ISO and put it on a USB stick (4GB). Booting works fine. Using it as a live-system works fine as well. Problem came when I want to install it. The process hangs at "Preparing to install Ubuntu-Netbook" after clicking "forward". Nothing happens afterwards. In the menubar a crash-report detected-notification appears, saying: Quote:

The problem cannot be reported: The program crashed on an assertion failure, but the message could not be retrieved. Apport does not support reporting these crashes Unfortunately no other information available.[URL].. but not the same hardware. The thread there seens bot to be of much use anyway, therefore this new post.

View 9 Replies View Related

Programming :: Ncurses: Filling Window With Background?

Apr 6, 2010

I have some ideas about writing a small game in terminal ( just for fun ) using ncurses library. I want to use some kind of menus (in Midnight Commander's style), but there are some problems with rendering windows, that I don't understand. I create a window with newwin(), assign a color pair to it calling wattron() (for example, I want to fill a window with blue background), and then I call my own function wnd_fill() :

Code: void wnd_fill (WINDOW* wnd)
{
int i;

[code]...

View 9 Replies View Related

Programming :: Running Program In Background From Script

Mar 27, 2011

I have a script that calls another program/script, xxx, to run in the background. Supposedly this program at most should finish within five (5) minutes so after five (5) minutes, I run some other steps to run the script into completion. My problem is sometimes the program takes longer than five (5) minutes and this is causing problems when running the rest of the steps in the scripts. Can anyone suggest how to re-program my script. At the moment, the KSH script, i.e. test.ksh, is doing as below:

test.ksh:
.....
.....
xxx/xxx.ksh <--- program/script called by the script
sleep 300
..... run the rest of the script .....
..... problem is sometimes xxx/xxx.ksh takes longer than 300 seconds .....
..... any way that I can monitor that xxx/xxx.ksh finishes before I run .....
..... the rest of the scripts .....

View 3 Replies View Related

Programming :: Process Does Not Write To Disk While On Background

May 18, 2011

I am doing a program that reads data from a gps and some other devices and writes some files with all the information. When I run it normally it works fine, but if I run the program in the background (with the ampersand) files are not created until I bring it to foreground or close it. I am confused, the program should run the same way with and without the ampersand. (Could it be that the main process that creates all the threads does not create them when it is executed in background? It seems like if the program is stopped until I take it to the foreground).

View 4 Replies View Related

Programming :: Bash Background - & - With Control Operators -&&

Feb 11, 2009

I have a set of files to copy and decompress, and want to do these operations concurrently with a script.

Manually it would be something like:

Code:

The single & is intended to background the processes, while the && is intended to execute the gzip process if and only if the cp completes successfully.

My script is:

Code:

When I run it, bash gets angry with the following error:

Code:

So what is the proper syntax to accomplish this?

View 1 Replies View Related

Programming :: Gracefully Exit A Background Process?

Jun 7, 2011

I am using a program that reads in data from a serial port and then sends that data out over a TCP connection. The problem I'm having is that the only way I know to exit the program is to do a 'kill PID', but doing this means the program doesn't go through the motions of closing the TCP connection properly so I have to wait some random period of time for the port to free itself or else when I try to start it back up it tells me that it can't bind to the specified port.The general structure of the program is as follows

Code:
int main(){
// initialize some stuff

[code]...

View 1 Replies View Related

Programming :: Change The Background Of A Webpage In Ajax?

Jan 22, 2011

when the "Submit" button is clicked on a form in the webpage, I'd like the background tiled image to be changed to another one (downloaded from the server, and "activated"), and the logo that I have there also replaced by another one, which will also have to be downloaded from the server.

View 1 Replies View Related

Programming :: Java: Set Background Image JFrame?

Jul 19, 2011

I am learning some Java programming, and I've run into a problem. I am trying to set a background for JFrame, so that I can put text and buttons on it. I've tried searching the internet, and the only code that I found that was a full code (I lost it, and don't remember the link) had so much other stuff, such as text and buttons, that I couldn't find the part I needed.

View 4 Replies View Related

Programming :: Get Background Jobs To Execute Sequentially?

May 4, 2009

I'm looking for a general pointer, or label for what I am trying to do. Not a specific line of code. I've written a couple of small sh script that gets some user input, then calls several programs to run in the background with the &. My problem is, they all run at the same time. Is there some way to get these jobs to run sequentially rather than consecutively? If yes, what is this process called? I'm thinking there should be a way to line up background jobs in a job queue, similar to how a print queue works, one job at a time. After searching for a couple of hours, I'm thinking there must be a name for this, but I don't know what it is.

View 11 Replies View Related

Programming :: Printf() In C Being Able To Specify Foreground / Background Colors?

Nov 21, 2010

I got curious during the construction of my program to search for blocks of text that contain certain words, and wanted to print out blocks of text with the words I was searching for, initially, in ALL CAPS and seperated by tabs for easy identification. That got boring, though, so I thought, "Can printf do colors, too?" Yes it can.... Who knew?

[Code],,,

View 8 Replies View Related

Programming :: [HTML/CSS/Javascript] Moving Background Image?

Jun 10, 2011

I am trying to set up a webpager that contains a background of the skylouds uperimposedin the center will be an image of an airplane with a transparent background.I want the sky to scroll continuously to the left behind the airplane. I am having problems with the background not being visible, not moving as expected, the airplane not being visible, and just disappointment in general.I think the background of a div will not be visible if there are no internal contents because it will be sized to zero. So I introduced another transparent image to force the size of the main div. Still no joy.Here is my code. Note that I don't have my timers set up yet, just a button to test background movement.

Code:
<!DOCTYPE html>
<html>

[code]...

View 2 Replies View Related

Programming :: CSS Formatted Textarea Fails W/ Transparent Background?

Mar 19, 2011

I have a textarea in an html form, formatted with css. It works fine but when I use a transparent background the viewer can only activate the cursor by clicking the left or upper edge of the textarea (I should specify this only occurs in IE; it works fine in Firefox).

View 2 Replies View Related

Programming :: Scripting, Perl Or Bash; Run A Background Process, Get Pid?

Apr 1, 2010

pretty simple. how would you background a process from a script and get its process id at the same time?

View 6 Replies View Related

Programming :: Bash Ctrl+c Tarp And Bash Read With Timeout?

Jan 24, 2010

simple bash code:

Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do

[Code]...

How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!

View 10 Replies View Related

Programming :: Capturing The Exit Status Of The Script Running In Background

Apr 10, 2010

I have a scenario where I am executing some child shell scripts in background (using &)through a master parent script.

Is there a way I can capture the exit status of each individual child script after the execution is completed.

View 7 Replies View Related

Programming :: Continue Execution Of A Python Program While A Background Task Is Going On?

Aug 28, 2010

I'm trying to figure out how to continue execution of a Python program while a background task is going on.

In bash, it is adding "&" to the end as in:

Code:
#! /bin/bash
find / -iname "*.py" > /tmp/all_pys &
echo "looking for all python scripts and putting them in /tmp/all_pys"
(yes, I know I could just put the echo BEFORE the find but I just use it for example)

Say I do that in python (not necessarily running the shell, but perhaps using scriptutil.ffind or something similar), but want to allow the user to be doing something else while running that search in the background, how would I thread, fork, subprocess (not to be confused with the module and Popen) [or whatever I should call it] that?

View 14 Replies View Related

Programming :: Loading Images - Java - Just See The JPanel With Black Background

Jul 19, 2010

I am making a simple snake game and have problem when loading the images (apple, snakes head, snakes body). When running this code, I just see the JPanel with black background which I have created. where is my mistake?

I highlighted my code with image and paint method.

Code:

View 4 Replies View Related

Ubuntu :: Boot Up The Machine The Cube Background Image Goes Away And The Background Colour Is Left?

Apr 15, 2011

Anyone know why each time I boot up the machine the cube background image goes away and the background colour is left. This image i am placing is in Apparency/Skydome

View 2 Replies View Related

Programming :: Sudo In Shell Script \ Ask For The Password Then Execute The Script At Background And Get Back To Menu?

May 27, 2011

Whats wrong with this line?Code:sudo -u user /usr/bin/nohup sh /home/user/somescript.sh &This should ask for the password then execute the script at background and get back to menu

View 8 Replies View Related

OpenSUSE Install :: Boot Opensuse Under Grub2 With Splash Background And Console Background?

Mar 24, 2010

I originally have Ubuntu Lucid on my machine. I just installed opensuse 11.2 on another partition without bootloader installed. So I'm still using the Ubuntu Lucid default bootloader grub2. I can boot up opensuse correctly. the nagging thing is that there's no splash screen show up during the boot process, instead, lines of command are flashing, the console background is also missing and the font under console (tty1-6) is huge. what can I do to have these back to opensuse? the current entry in grub2 for opensuse

Code:
menuentry "openSUSE 11.2 (i586) (on /dev/sda2)" {
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 9ac05ede-e7c4-47f3-b55b-66d5844$
linux /boot/vmlinuz-2.6.31.12-0.2-desktop root=/dev/sda2
initrd /boot/initrd-2.6.31.12-0.2-desktop
}
which parameters should I add?

View 2 Replies View Related

Ubuntu :: GDM Background - Cannot Change The Background Image To Any Of Mt .jpg Wallpaper Files And .png Files

Apr 3, 2011

I have spent the most part of 5 hours trying to fix this issue. For some reason I cannot change the background image to any of mt .jpg wallpaper files (and .png files). I've tried using the Ubuntu-Tweak application, but I end up getting a purple screen (default) or a black screen (default). So then I tried using the terminal method by making the Appearance window appear when I would log out. That works, except when I go to use my background image, it shows as a question mark for the image preview, and the icon for the file is a gray box. All while doing this my background images that I tested are all in the /usr/share/backgrounds location. Please help! I really want to get rid of the default images and use my images... :/ My desktop/screen in 1440x900, and most my background images are around that size. They work with my regular desktop for my account.

View 3 Replies View Related

General :: Fedora 12 Installation / Change The Installation Background Not Desktop Background?

Feb 16, 2010

I want to change installation background image in fedora 12.

How to change the installation background not desktop background.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved