C Possible replacement for agetty / getty / login ?

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.
 
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.
 
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?
 
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.
 
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
 
I have 3 rpi-III-b, with 3 monitors.

Left Middle and Right
Left with screen -d -m ' export DISPLAY=:0 ; while : ; do x11vnc ; done '
Right with screen -d -m ' export DISPLAY=:0 ; while : ; do x11vnc ; done '
Middle with x2vnc -east IP-right & x2vnc with x2vnc -west IP-left
Ethernet cable is short and they are on a Router Netgear, close, so low distance for electrons motion.

Well, x2vnc is quite SLOW, really, in such a consideration.

If I use the xtightvncviewer -quality 0 for both right and left, it works faster.
but well this is not a 3 monitor dekstop :(

Ideal would be to have x2vnc -quality 0 ;) or something to decrease quality

x11vnc and x2vnc take some resource (seeing top).
x11vnc takes 22-35% of the CPU. this is really huge.
x2vnc takes 2-10% of the CPU.

I guess that x11vnc is the issue.
x11vnc - VNC server to allow remote access to an existing X session
x11vnc alternatives?
 
This is better, definitely faster, but now I have two mouse cursors !!

installation of tigervnc-standalone-server


on the right monitor:
.xinitrc contains
xtightvncviewer -quality 0 :1 &
blackbox


screen
startx
/usr/bin/Xtigervnc :1 -desktop :1 -depth 32 -SecurityTypes None -AlwaysShared -geometry 1680x1050

then
export DISPLAY=:1


On the middle machine, x2vnc -east ipright

it looks much faster, and definitely less choppy/laggy.

x11vnc is not sufficiently fast, it seems

top gives about 5-10% for Xtigervnc...
 
Fundamentally, you are using two of the three RPi just as video cards, with one of the three the machine you are really logged in as. Which is clearly insane, but might actually work (just because it is insane doesn't mean it is a bad idea). The real question is: what is your end goal? I think it is: To log into just one computer, which has three monitors attached to it, and run Xwindows across all three monitors.

Here is an alternative suggestion: You can buy USB connected video cards. They are sold as "USB-to-VGA" or "USB-to-DVI" adapters. They are no more expensive than using an RPi. I have no idea what the situation with drivers for them is. If you can get driver support, that seems like a simpler solution.

Another solution is to not use the VNC protocol over the wire, but directly use the X protocol: Just log into the middle machine, and when you want to create for example a display window on the right machine, just say "DISPLAY=ipright:0.0 xclock &". Would that work?
 
Some friends have even 4 monitors (with Windows 10).

The rpi in the middle has x2vnc with left right, i.e. -east and -west. It leaves than a wall (3 monitors ;)) With the mouse you can readily go from left to right, with tiger vnc. Xtigervnc has a good results. it is really working !

It is to have several documents opened, at the same time without alt+tab/switch, and to edit a single main doc.

Plus...
because chromium-browser takes 120 pct of the cpu. of the rpi. Several tabs and well, rpi is already too slow for the web.
It is due to the whole internet complex pages, slow, ads, .... There are many webpages that are slow.
Given example: edition.cnn.com,...

One monitor for the web (for medias: web, music,...), one monitor for TTY (screen, middle monitor for typing), and one monitor for libreoffice.
Just 3, basic minimum.

dillo is fine, but well, ... iceweasel, chromium,... well the whole web is not adapted for ARM.
You need a super computer to browse the web today ;)
 
... you mean, that the idea is pretty good. ....

It really works well with 3 monitors. And chromium goes fast if a single RPI do only one task.
 
Back
Top