Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, I'm writing a *very* simple script to choose between window managers when starting X. How can I see which tty's are currently being used, e.g. by another X ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Location
    Patagonia argentina
    Posts
    9

    [SOLVED] How can I see which tty's are in use?


    Hi all,
    I'm writing a *very* simple script to choose between window managers when starting X.
    How can I see which tty's are currently being used, e.g. by another X server instance? So I can assign another tty to the new instance...
    I've been searching in google and the forums but still feel clueless about where should I search first...
    What am I missing?
    I'm new in this forum (first post) so please be patient. Thanks!

    /edit: I use Arch Linux.
    Last edited by mendieta; 02-15-2011 at 01:52 AM.

  2. #2
    Just Joined!
    Join Date
    Nov 2010
    Posts
    61
    use the command "who"

  3. #3
    Just Joined!
    Join Date
    Feb 2011
    Location
    Patagonia argentina
    Posts
    9
    Incidentally I found the answer... It's so simple, I feel *really* stupid now

    Just ps -e | grep tty does it

    I was trying to launch X instances simultaneously, automatically assigning to each a free display (e.g. tty7), it works fine now.

    @GreenSkyChris thanks for the reply!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •