# permissions on tty



## killwin (Apr 5, 2010)

Hello,

I want open /dev/ttyv9 in c, with toto login.


```
d = open("/dev/ttyv9", O_RDWR);
```

With root login my program works perfectly, but toto don't have permissions.

What's can i do to execute my program without bad security ?


```
ls -lai ttyv9 :

crw-------- 1 root wheel Ã , 78 5 avr 10:12 /dev/ttyv9
```

Thanks


----------



## SirDice (Apr 5, 2010)

Why do you want to open a tty? Normally only root is allowed to do that.


----------



## killwin (Apr 9, 2010)

*Yes*

Yes you are right.

I wanted to execute a X program from ttyv1 to X with. It was stupid.
Because the solution was setenv DISPLAY :0.0 in ttyv1.


----------

