Problem using unix command with "&"


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Problem using unix command with "&"
# 1  
Old 07-15-2010
Problem using unix command with "&"

Hello,
I've tried running several commands but am not getting the results I expect. Just to give you some background:
1) I'm running windows vista
2) I'm using Putty and have enabled X11 forwarding
3) I have also installed xming
4) I am using a free unix shell acount from devio.us
5) The steps that I follow are as follows:
Step 1: Run Putty with enabled X11 forwarding
Step 2: Run xming server (I see the X icon in the system tray)
Step 3: Run a particular command like the ones shown below

For example, I tried the following commands:

Code:
typhoon1@wolfman $ xclock
Error: Can't open display:
typhoon1@wolfman $

Also, I tried this command:

Code:
typhoon1@wolfman $ pico newFile&
[1] 31878
typhoon1@wolfman $
[1] + Stopped (tty output) pico newFile
typhoon1@wolfman $

As you can see, in both situations a new window does not pop up with the result I expect to see. Does anybody know why this is happening?

Last edited by pludi; 07-16-2010 at 02:10 AM.. Reason: code tags, please...
# 2  
Old 07-16-2010
Right after logging on the remote system, check if the DISPLAY variable is correctly set:

Code:
echo "$DISPLAY"

If it's not set, the X11 forwarding won't work.
# 3  
Old 07-16-2010
Just a guess ...

Re-order the steps, start the X server before doing your putty command.
Maybe a working X server is necessary when trying to forward X11.
# 4  
Old 07-16-2010
What I've tried so far

radoulov,
I have already tried the command "echo "$DISPLAY"" and I get the following result:

typhoon1@wolfman $ echo "$DISPLAY"

typhoon1@wolfman $

It seems that the DISPLAY variable has not been set. Is there a way to set it to a particular value so that X11 forwarding does work or it much more complicated than this?

jonjgc,
I'ved tried reversing the steps like you said and it still doesn't work.
# 5  
Old 07-19-2010
Hi,

set the DISPLAY variable to the IP-address of your windows-box.
In ksh:
Code:
export DISPLAY=your.win.box.ip:0

Btw, unless you got a premium account wolfman will kill your background-processes (those started with & in the end), as their usage policy tells you.

Stefan
# 6  
Old 07-19-2010
The DISPLAY variable should be set automatically. Are you sure that the remote host permits X11 forwarding?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

2. Shell Programming and Scripting

What is the use of "finger" command & how to use it to kill the online processes ?

Hi there, I am eager to know what exactly is the use of "finger" command & how to use it to kill the online processes ? :b: (1 Reply)
Discussion started by: abhijitpaul0212
1 Replies

3. Web Development

How would I mod_rewrite "/~a1Pha" and "/=a1Pha" to "/paste/a1Pha.htm"? (internally & externally)

Basically I want to shorten URLs on my html pasting site (pasteht.ml), by using "/~a1Pha" instead of "/paste/a1Pha". The ID is 5 numbers and letters, both cases. For example: /~idnum serves /paste/idnum.htm /=idnum serves /paste/idnum.htm /paste/idnum redirects to /~idnum (to update any old... (0 Replies)
Discussion started by: phillips1012
0 Replies

4. Shell Programming and Scripting

finding the strings beween 2 characters "/" & "/" in .txt file

Hi all. I have a .txt file that I need to sort it My file is like: 1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO) 2- ... (10 Replies)
Discussion started by: Behrouzx77
10 Replies

5. Red Hat

files having Script which works behind "who" & "w" commands

Dear All, plz print the path of files which have the script of "who" & "w" commands. thnx in advance. (6 Replies)
Discussion started by: saqlain.bashir
6 Replies

6. Shell Programming and Scripting

Problem with "find" and "grep" command

I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank). In a first approach I coded: find / -exec ls -ld {} | grep -v ' /proc/| /sys/' \; > /tmp/list.txt But this doesn't work. I got an error (under Ubuntu): grep:... (5 Replies)
Discussion started by: pstein
5 Replies

7. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

8. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

9. Programming

fork&pipe "interpretting" shell - problem

hello everybode.Got some sort of "problems" with this stuff; well this is a program int main() { int Pipe; int origStdin, origStdout; int childPID; origStdin = dup(0); origStdout = dup(1); pipe(Pipe); if( (childPID = fork()) < 0 ) { perror(... (2 Replies)
Discussion started by: IdleProc
2 Replies

10. UNIX for Dummies Questions & Answers

Unix "at" / "Cron" Command New Problem...Need help

Hi All, I am trying to schedule a one time job using the at command with the help of shell script for my project. The shell script should take a parameter as a command line argument from the at command itself. Is it possible to take a command line parameter for a shell script in the command... (3 Replies)
Discussion started by: Mohanraj
3 Replies
Login or Register to Ask a Question