LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-19-2009, 04:29 AM   #1
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Rep: Reputation: 16
screen shortcuts


Hi all i've read man screen but still cannot do some things.
How can I list all windows ? man says: Use C-a " I tried holding ctrl + a but then if i want type " I have to press shift and press key wich usualy gives me ' .... but this not work ? Can I type " without using shift ?

Second how can I assign names to windows ? when I type ctrl+a+w i see

0-$bash 1$bash 2*$bash but is possible to assign other names ? Thanks a lot
 
Old 09-19-2009, 07:53 AM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Here are some snippets from the screen manual:

Code:
    -ls and -list
            does not start screen, but prints a list of  pid.tty.host  strings
            identifying  your screen sessions.  Sessions marked ‘detached’ can
            be resumed with "screen -r". Those marked ‘attached’  are  running
            and  have a controlling terminal. If the session runs in multiuser
            mode, it is  marked  ‘multi’.  Sessions  marked  as  ‘unreachable’
            either  live  on  a  different host or are ‘dead’.  An unreachable
            session is considered dead, when its name matches either the  name
            of the local host, or the specified parameter, if any.  See the -r
            flag for a description how to construct matches.  Sessions  marked
            as ‘dead’ should be thoroughly checked and removed.  Ask your sys‐
            tem administrator if you are not sure. Remove  sessions  with  the
            -wipe option.
For example:

Code:
screen -ls
To name your session or create a title:

Code:
 -S sessionname
            When creating a new session, this option can be used to specify  a
            meaningful  name for the session. This name identifies the session
            for "screen -list" and "screen -r"  actions.  It  substitutes  the
            default [tty.host] suffix.

       -t name
            sets  the  title  (a.k.a.) for the default shell or specified pro‐
            gram.  See also the "shelltitle" .screenrc command.
Regards,

Fordeck
 
Old 09-19-2009, 09:11 AM   #3
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Original Poster
Rep: Reputation: 16
so when i type ctrl+a+c to create new window how can give it name ?
 
Old 09-19-2009, 01:29 PM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Here's some more spoonfeeding but, as fordeck indicated, it will really help you if you make reading the manual carefully and searching the web primary steps in all your problem solving. The interactive analog to the -t switch he gave you is also in the manual:

Code:
       C-a A       (title)       Allow  the  user to enter a name for the cur-
                                 rent window.
I don't know how you read your man pages but 'less' is my default pager and if I'm looking for something specific, I might type '/name' to jump through occurrences of that word to find 'C-a A'. That way, even if I missed it before in my general reading, I might easily catch it that way.

Last edited by slakmagik; 09-19-2009 at 01:32 PM.
 
Old 09-21-2009, 05:12 AM   #5
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Original Poster
Rep: Reputation: 16
I have read manual page.... but still dont knoh how for example can I press C-a A (ctrl+a+A) i cannot press and hold ctrl then a and then press shift and a.... how is it possible ???. If you know some example for naming widnows in screen please post it. thanks
 
Old 09-21-2009, 11:08 AM   #6
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
First off you need to understand that C-a (ctrl+a) is only available when you are in an existing screen session.

Second you need to think of C-a (ctrl+a) as a toggle. Once you have pressed and released C-a, screen will be in command mode waiting for you to press or enter your command.

To answer your question:

Quote:
Originally Posted by wakatana View Post
I have read manual page.... but still dont knoh how for example can I press C-a A (ctrl+a+A) i cannot press and hold ctrl then a and then press shift and a.... how is it possible ???. If you know some example for naming widnows in screen please post it. thanks
Press and release C-a --> press A

you will then have a prompt at the bottom of your screen, for example:

Code:
Set window's title to: bash
You would then replace bash with your new name and hit Enter. At this point you'll be back in your screen session and any keys entered would be interpreted by your shell.

Or you can set the title when you first start screen, for example:

Code:
screen -t myscreen_name
would start a screen session with title of myscreen_name. You can also set the session name when you start screen, for example:

Code:
screen -S myscreen_name
The session name is what is listed when you list your current screens:

Code:
screen -ls
Regards,

Fordeck

Last edited by fordeck; 09-21-2009 at 11:09 AM.
 
Old 09-21-2009, 01:42 PM   #7
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Sorry - I misunderstood the trouble you were having. Not to excuse myself but, just as a tip, rather than saying, "so when i type ctrl+a+c to create new window how can give it name ?", maybe if you said, "I want to set a window title and the manual says I need 'C-a A' but I don't know how to type this" or something, it might hit more specifically where the problem lies and would demonstrate you'd read the manual and knew exactly what you needed - just not how.

Anyway, sorry again.

Like fordeck says, it's a two-step thing. C-a, then shift-a.
 
Old 10-08-2009, 04:57 PM   #8
wakatana
Member
 
Registered: Jul 2009
Location: Slovakia
Posts: 141

Original Poster
Rep: Reputation: 16
I am sorry if it was not clear, i will try to better formule my questions next. Thanks a lot that worked
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The "Log out" and "Lock screen" actions cannot be executed through keyboard shortcuts Snood Linux - Desktop 0 04-22-2009 09:30 AM
Using Shortcuts From Within Full Screen Apps juanbobo Linux - General 0 10-04-2007 11:39 AM
GNU Screen and Bash shortcuts keysorsoze Linux - Software 2 09-18-2007 05:45 PM
shortcuts antiemptyv Linux - General 1 10-08-2005 02:45 PM
Shortcuts saiz66 Slackware 4 05-13-2003 10:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration