• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

C/C++ Possible replacement for agetty / getty / login ?

Spartrekus

Active Member

Thanks: 22
Messages: 168

#1
Hello,

I would like to replace the agetty / getty / login manager of tty with a small C programme, that would leave possible flexibility for any ideas.
Would you eventually know a very simple "hello world" or getty login C programme that could be used?

Why?
3 monitors !
[RPI+Monitor #1 with Xorg used with x2vnc/x11vnc] [ RPI+Monitor #2 (main, with Xorg,...)] [ RPI+Monitor #3 without Xorg]
I have a third monitor on my right side, and I would like to pilot it from main monitor over SSH. (I dont know if you understand what I mean). The rpi+monitor #3 one is keyboardless.

Best regards,
S.P.
 

aragats

Aspiring Daemon

Thanks: 322
Messages: 828

#2
I have a third monitor on my right side, and I would like to pilot it from main monitor over SSH. (I dont know if you understand what I mean).
In other words, you need a "remote" keyboard for the keyboardless one, right? Why you want to replace getty?
Not sure whether sysutils/synergy works in console, I used to use it in Xorg between 3 computers.
 

Spartrekus

Active Member

Thanks: 22
Messages: 168

#3
In other words, you need a "remote" keyboard for the keyboardless one, right? Why you want to replace getty?
Not sure whether sysutils/synergy works in console, I used to use it in Xorg between 3 computers.
synergy... i must have a look ...

I have x2vnc -west ip#1:0 and x2vnc -east ip#3:0 , but it is quite slow.
 

Spartrekus

Active Member

Thanks: 22
Messages: 168

#4
In other words, you need a "remote" keyboard for the keyboardless one, right? Why you want to replace getty?
Not sure whether sysutils/synergy works in console, I used to use it in Xorg between 3 computers.
the problem that I see with synergy, it makes you dependent and bound to your configuration and settings. No freedom, in any case your take the netbook, pc or machine away...
https://wiki.ubuntuusers.de/Synergy/

With VNC you have fully freedom!

Everyone like freedom, maybe you too?
 

ShelLuser

Daemon

Thanks: 1,034
Best answers: 2
Messages: 2,329

#6
VNC doesn't provide as much freedom as getty and/or sshd does though. For example: through sshd I can simply log onto a remote server and fire up X based programs while their output gets sent to my (X enabled) client. And this setup doesn't require anything extra on the server whereas vnc would be depending on a specific procress running on the server. Which means extra overhead which could otherwise be used for server processes.

Anyway, it's not my intent to start an argument but I did want to bring this to your attention.

The main reason I'm responding though is because replacing getty for a network enabled listening daemon is not be the best of ideas. Instead of replacing focus on adding. As mentioned in my example above: all it takes on the server is a running sshd daemon with the right options enabled and suddenly I can fire up remote X applications.

There's no extra benefit in gaining access to a 'physical' console vs. a virtual console. Both can do the exact same thing. The main difference would be the fact that the physical consoles are pretty much locked (ttyv0, ttyv1) but the same can be said for your remote consoles. Basically you swap out v0 for pts/1, but that's about it.

In my opinion the only thing this could do is cause more security risks.
 

Spartrekus

Active Member

Thanks: 22
Messages: 168

#7
You can completely right !!

Actually, my X11, I can live without, it takes too much resource.

What about replacing agetty with SCREEN, on this right side monitor?
Ssh + screen is good, and I can/could remove all tty2,tty3,... logins which are taking resource.

Remove DPMS, on the terminal, and add this (instead of login aggetty) with the following survival:

To create and to login from anywhere/anytime:
screen -x chr

screen -d -m -S chr