Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Accessing a remote server (Ubunty Hardy) through ssh (putty), i can stop running 'programs' with CTRL-Z (pause signal)... I can have multiple paused jobs, with I can see with the command 'jobs'.

The question is regarding if it is possible (or if it already exists) to configure a shortcut to change between processes....

That is, a shortcut equivalent to:

PAUSE current process
fg 'next' (brings to foreground the next stopped application)

The goal is to achieve an equivalent to ALT-TAB via putty... : )

share|improve this question

migrated from stackoverflow.com Jul 11 '10 at 13:24

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers 2

up vote 7 down vote accepted

You would probably benefit from GNU screen (or the byobu variant on Ubuntu) to be able to switch between sessions. That way your other sessions keep running rather than being halted / suspended as you propose here.

share|improve this answer
    
yes, it's cool, i tried it... it changes a bit my shell, more features than needed... thanks ! –  arod Feb 3 '11 at 21:27
add comment

You can use fg %n where the n is the job id you see in square brackets when using jobs. Also, you can use fg %- for previous job.

See http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html Section 3.203 Job Control Job ID

share|improve this answer
    
@niry: Or just do fg n without the percent. :) Anyway, I think he's asking if you can configure one key to effectively type ^Zfg $(tail jobs | cut -f1 "-d ") or similar. –  Lucas Jones Jul 10 '10 at 19:49
    
exactly, that's what i'm looking for –  siran Jul 10 '10 at 19:51
    
i know about "fg n", but im looking if its possible to configure a shortcut to do ^Zfg $(tail jobs | cut -f1 "-d ") or similar –  siran Jul 10 '10 at 19:55
    
In that case, screen is your friend, my friend. 1up @Dirk. –  user31458 Jul 10 '10 at 19:59
1  
From Windows, use putty as before. Then on the server, launch screen (or, preferably, byobu) and add additional sessions between which you can switch. –  Dirk Eddelbuettel Jul 10 '10 at 21:01
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.