So I have a second computer on which I have installed manjaro to try. (I use debian on main PC).
I do not want to need to have keyboard, mouse or monitor connected to it. I want it to survive restart and be back online available with vnc.
Curently, I must login manualy or have it login automaticaly, than start a script manualy or through the “Startup Aplications” in gnome-tweaks to set the proper resolution (because it won’t detect it). x11vnc is started using cron @reboot path to script before the actual login happens, but closes any attempted connection and restarts (should be the -loop flag) . After loging in it starts working.
I have spent a long time looking through formus and wikis and now I really do not know what to do.
So, my question is, how to run x11vnc so I can use vnc to login and how to automaticaly set resolution even to the login screen.
Thanks.
x11vnc is run with -rfbauth -repeat -loop -forever -shared -auth guess -find , I connect through ssh
it’s intel pentium dual core
Please read this: How to provide good information
and post some more information so we can see what’s really going on. Now we know the symptom of the disease, but we need some more probing to know where the origin lies…
An inxi --admin --verbosity=7 --filter --no-host --width would be the minimum required information… (Personally Identifiable Information like serial numbers and MAC addresses will be filtered out by the above command)
What are the contents of /etc/systemd/system/x11vnc.service ?
[Unit]
Description=VNC Server for X11
Requires=graphical.target
After=graphical.target
[Service]
ExecStart=/usr/bin/x11vnc
This got created automatically after install. (didn’t happen on debian lol)
Why should I disable cron?
I know I am asking another unrelated question but cron (cronie.service) was disabled by default and when apropos didn’t work I got answer from the internet in the lines off “run mandb, it should be a cron job/it should run after every udpate/package install”. So what am I missing here?
Ok, I understand my mis-use of cron. I use it as a “workaround” before I get it working with systemd
I do not have tigervnc installed, that’s the vncserver. I wanted to use x11vnc. So I installed vncserver, edited the x11vnc.service and enabled it. After restart it did not start. I have autologin enabled, maybe that’s the cause?
Anyway I tried running systemctl start x11vnc and here is output of systemctl status x11vnc:
● x11vnc.service - VNC Server for X11
Loaded: loaded (/etc/systemd/system/x11vnc.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2021-02-25 11:44:15 CET; 2s ago
Process: 1699 ExecStart=/usr/bin/vncserver -geometry 1920x1080 -depth 16 -dpi 96 -alwaysshared -localhost (code=exited, status=2)
Feb 25 11:44:15 bilbo systemd[1]: Starting VNC Server for X11...
Feb 25 11:44:15 bilbo vncserver[1699]: usage: vncserver <display>
Feb 25 11:44:15 bilbo systemd[1]: x11vnc.service: Control process exited, code=exited, status=2/INVALIDARGUMENT
Feb 25 11:44:15 bilbo systemd[1]: x11vnc.service: Failed with result 'exit-code'.
Feb 25 11:44:15 bilbo systemd[1]: Failed to start VNC Server for X11.
I tried that, using x11vnc, not vncserver. It won’t even try to start after boot but when started from systemctl start x11vnc it works. The command doesn’t return to command line but hangs, even when I “control+c” it, the systemctl stops it for exceeding start operation timeout after some time.
Here is how my x11vnc.service looks now, I asume that there is some mistake.
Oh god, I feel bad for not responding to you for such a long time. I did other stuff and didn’t use this second PC so I kinda forgot about this.
I still did not solved the original problem. I am currently using autologin with .desktop files in ~/.config/autostart/ which point at my .sh files which run after the login. One starts the x11vnc server with my arguments and the other sets the resulution using xrand. This works well.
Also, while using it as a server I eventually want to use ssh and byobu whithout x-server.