Re: How to determine the VT of a running X session?
Am 2006-02-23 14:49:15, schrieb Jan C. Nordholz:
> > Weired, because I can use it in a XTerm without any problems.
> > Works under Woody, Sarge and Etch.
>
> Then your permission bits on /dev/console and/or /dev/tty0 are not
> as strict:
<snip>
> ] jcn@hejre:~$ ll /dev/tty0 /dev/console
> ] crw------- 1 root tty 5, 1 2006-02-23 08:17 /dev/console
> ] crw------- 1 root root 4, 0 2005-03-29 21:30 /dev/tty0
I have a Woody standard installation and do not need to manipulate the
perms:
+---[ 'stdin' ]---------------------------------------------------------
|
| [michelle.konzack@devel.private:~/] ll /dev/tty0 /dev/tty1 /dev/tty2 /
| dev/tty3 /dev/tty4 /dev/tty5 /dev/console
| crw------- 1 root tty 5, 1 27. Sep 05:28 /dev/console
| crw------- 1 michelle private 4, 0 27. Sep 05:28 /dev/tty0
| crw------- 1 michelle tty 4, 1 24. Feb 22:05 /dev/tty1
| crw------- 1 root tty 4, 2 20. Feb 19:07 /dev/tty2
| crw------- 1 tamay.do tty 4, 3 25. Feb 22:36 /dev/tty3
| crw------- 1 root root 4, 4 22. Feb 15:22 /dev/tty4
| crw------- 1 root root 4, 5 22. Feb 15:22 /dev/tty5
+-----------------------------------------------------------------------
+---[ cmd 'who' ]------------------------------------
|
| michelle.konzack tty1 Feb 20 14:18
| root tty2 Feb 20 19:07
| tamay.dogan tty3 Feb 25 22:36
| michelle.konzack pts/0 Feb 22 15:22 (:0.0)
| michelle.konzack pts/4 Feb 22 18:21 (:0.0)
+----------------------------------------------------
+---[ cmd 'fgconsole' ]--
|
| 7
+------------------------
+---[ cmd 'strace -eopen fgconsole |grep "/dev/" ' ]--
|
| open("/dev/tty", O_RDWR) = 5
| open("/dev/tty0", O_RDWR) = 5
| 7
+-----------------------------------------------------
> Regards,
>
> Jan
Greetings
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Reply to: