starting X when login on certain tty

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

starting X when login on certain tty

Marko Cupać
Hi,

I'd like to start X immediately after login on certain local tty with
ksh as a login shell.

In tcsh on FreeBSD I do it by adding the following to my .tcshrc:

if ($tty == ttyv4) then
  startx
  logout
endif

What would be equivalent in ksh on OpenBSD? Also, should I put it
in .profile or .kshrc?

Thank you in advance,
--
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

Marko Cupać
https://www.mimar.rs/

Reply | Threaded
Open this post in threaded view
|

Re: starting X when login on certain tty

Matej Nanut
On 6 March 2017 at 12:35, Marko Cupać <[hidden email]> wrote:
> Hi,
>
> I'd like to start X immediately after login on certain local tty with
> ksh as a login shell.
>

Hey, the following in .kshrc works for me.

if [ "$(tty)" = /dev/ttyC0 ]; then
  startx
fi

But I just type "startx" these days.

Cheers,
Matej