jails "Adduser: UID 0 is already used" Error while I'm trying to install and configure teamviewer inside a Freebsd / Devuan jail.

it's done : very thanks.

Screenshot_20211125_234753.png
 
yes, I tried teamviewer. It does not work. as soon as I run this script :

Code:
#/bin/sh
export DISPLAY=192.168.1.6:0
/usr/bin/teamviewer &

FreeBSD restarts immediately.

maybe the reason is between these starting messages :

Code:
root@marietto:/usr/home/marietto # jail -c devuan
devuan: created
Using makefile-style concurrent boot in runlevel 3.
dmesg: read kernel buffer failed: Operazione non permessa
Starting enhanced syslogd: rsyslogdmknod: /dev/xconsole: Operazione non supportata
chown: impossibile accedere a '/dev/xconsole': File o directory non esistente
rsyslogd: cannot create '/dev/log': Operation not supported [v8.2102.0 try https://www.rsyslog.com/e/2176 ]
rsyslogd: imuxsock does not run because we could not aquire any socket  [v8.2102.0]
rsyslogd: activation of module imuxsock failed [v8.2102.0]
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): No such file or directory.
rsyslogd: activation of module imklog failed [v8.2102.0 try https://www.rsyslog.com/e/2145 ]
.
Starting LVM2 poll daemon: lvmpolld.
Starting periodic command scheduler: cron.
Can't start system message bus - /proc is not mounted ... failed!
Starting Light Display Manager: lightdm.
Starting session management daemon: elogind.
Starting libvirt logging daemon: virtlogd failed!
Starting libvirt management daemon: libvirtd failed!
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
Timeout reached while wating for return value
Could not receive return value from daemon process.
(warning).
Starting SANE network scanner server: saned.
Starting teamviewerd...Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
 
yes, I tried teamviewer. It does not work. as soon as I run this script :

Code:
#/bin/sh
export DISPLAY=192.168.1.6:0
/usr/bin/teamviewer &

FreeBSD restarts immediately.

maybe the reason is inside these starting messages :

Code:
root@marietto:/usr/home/marietto # jail -c devuan
devuan: created
Using makefile-style concurrent boot in runlevel 3.
dmesg: read kernel buffer failed: Operazione non permessa
Starting enhanced syslogd: rsyslogdmknod: /dev/xconsole: Operazione non supportata
chown: impossibile accedere a '/dev/xconsole': File o directory non esistente
rsyslogd: cannot create '/dev/log': Operation not supported [v8.2102.0 try https://www.rsyslog.com/e/2176 ]
rsyslogd: imuxsock does not run because we could not aquire any socket  [v8.2102.0]
rsyslogd: activation of module imuxsock failed [v8.2102.0]
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): No such file or directory.
rsyslogd: activation of module imklog failed [v8.2102.0 try https://www.rsyslog.com/e/2145 ]
.
Starting LVM2 poll daemon: lvmpolld.
Starting periodic command scheduler: cron.
Can't start system message bus - /proc is not mounted ... failed!
Starting Light Display Manager: lightdm.
Starting session management daemon: elogind.
Starting libvirt logging daemon: virtlogd failed!
Starting libvirt management daemon: libvirtd failed!
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon
Timeout reached while wating for return value
Could not receive return value from daemon process.
(warning).
Starting SANE network scanner server: saned.
Starting teamviewerd...Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
:
Cannot open netlink socket: Address family not supported by protocol
 
look at this :
Code:
root@[devuan](~)6 export DISPLAY=192.168.1.6:0

root@[devuan](~)7 echo $DISPLAY
192.168.1.6:0


root@[devuan](~)8 nano teamviewer             


root@[devuan](~)9 ./teamviewer   


root@[devuan](~)10 


Init...
xprop:  unable to open display '192.168.1.6:0'
CheckCPU: SSE2 support: yes
Checking setup...
Launching TeamViewer ...
Launching TeamViewer GUI ...
Unable to init server: Could not connect: No such file or directory

(devilspie:5917): Gdk-WARNING **: 00:48:29.136: cannot open display: 

root@[devuan](~)10 echo $DISPLAY 
192.168.1.6:0
 
Something is wrong with this script to run on the host :

Code:
#/bin/bash
xhost +
socat -d -d TCP-LISTEN:6000,fork,bind=192.168.1.6 UNIX-CONNECT:/tmp/.X11-unix/X0   (this line freezes on the konsole and the lines below it can't be executed)
jail -c devuan
jexec devuan /bin/bash ~/teamviewer
devilspie &
sleep 10 && pkill -f "devilspie"
#xhost -

and with this that should run on the jail,but it is called by the script to run on the host :

/root/teamviewer

Code:
#/bin/sh
export DISPLAY=192.168.1.6:0
/usr/bin/teamviewer &
 
maybe I haven't explained well what it needs. If I give this command :

Code:
socat -d -d TCP-LISTEN:6000,fork,bind=192.168.1.6 UNIX-CONNECT:/tmp/.X11-unix/X0

or I give this command :

Code:
socat -d -d TCP-LISTEN:6000,fork,bind=192.168.1.6 UNIX-CONNECT:/tmp/.X11-unix/X0 &

I get the same result,the command is executed and it stay there until I kill it. Since below it there are differents commands awaiting to be executed,this behavior is not good.

you can see below what I mean :

https://ibb.co/fXTCJk9

the command is freezed on the terminal and it's not good. The script is composed by a list of commands that should be executed one after another. So I shouldn't talk about "background". This is what I don't need. I fixed the error on the explanation of the problem.

The same bad behavior happens with this command :

https://ibb.co/DMdw0np

excusme for the "typo"
 
on terminal A :

Code:
root@marietto:/usr/home/marietto # socat -d -d TCP-LISTEN:6000,fork,bind=192.168.1.6 UNIX-CONNECT:/tmp/.X11-unix/X0

2021/11/27 01:01:08 socat[20719] N listening on LEN=16 AF=2 192.168.1.6:6000

on terminal B :

https://pastebin.ubuntu.com/p/GKHYJkSDzJ/

I don't see the socat connection on port 6000,should I open port 6000 in a specific file related to Xorg or something ?
 
As a total aside, but being practical, if you want to run teamviewer within (however deep) Freebsd, you can always run teamviewer in an ordinary windows 10 in bhyve. Works a treat.
 
I've used the command screen with the parameter -dmS and at least this problem is fixed,but anyway,it does not work as expected :
lets recap. On the host I run :

Code:
#/bin/bash
xhost +
screen -dmS listen socat -d -d TCP-LISTEN:6000,fork,bind=192.168.1.6 UNIX-CONNECT:/tmp/.X11-unix/X0
jail -c devuan
jexec devuan /bin/bash ~/teamviewer
devilspie &

and inside the jail,the teamviewer script is like this :

/root/teamviewer :

Code:
#/bin/sh
export DISPLAY=192.168.1.6:0
/usr/bin/teamviewer &

so,on the host I launch the script teamviewer :

Code:
root@marietto:/usr/home/marietto/Desktop # ./teamviewer

access control disabled, clients can connect from any host
[1] 78970
root@marietto:/usr/home/marietto/Desktop #
Init...
xprop:  unable to open display '192.168.1.6:0'
Unable to init server: Could not connect: No such file or directory

(devilspie:78969): Gdk-WARNING **: 11:05:40.083: cannot open display:
CheckCPU: SSE2 support: yes
Checking setup...
Launching TeamViewer ...
Launching TeamViewer GUI ...

but it hangs forever.
 
I'm happy for you. I'm not so lucky. A great part of my life is devoted to PC and operating systems. In addition to my health problems there are the italian rules that want to protect us against the COVID. They are so tight that I can't go nowhere. This because I don't want to get the vaccine. So I'm a prisoner inside my home. But anyway I don't dislike it too much. I like to play with OSes.
 
Don't get me wrong - i like to experiment. But there are good experiements which help you step forward and then there a bad experiements which just waste time.
Besides, i am much more a programmer, so i code all the time.
 
Check at this. Is socat running in your opinion ? I don't see it in the netstat list,but I see that its running between the processes.

Code:
root@marietto:/usr/home/marietto/Desktop # ps ax | grep socat
79191  -  Is       0:00,00 screen -dmS listen socat -d -d TCP-LISTEN:6000,fork,bind=192.168.1.6 UNIX-CONNECT:/tmp/.X11-unix/X0
80693  2  S+       0:00,00 grep socat
79193  1  Is+      0:00,02 socat -d -d TCP-LISTEN:6000,fork,bind=192.168.1.6 UNIX-CONNECT:/tmp/.X11-unix/X0


root@marietto:/usr/home/marietto/Desktop # netstat


Active Internet connections
Proto Recv-Q Send-Q Local Address          Foreign Address        (state)   
tcp4       0      0 192.168.1.6.home.22921 ec2-44-194-149-1.443   ESTABLISHED
tcp4       0      0 192.168.1.6.46433      151.101.241.140.443    ESTABLISHED
tcp4       0      0 192.168.1.6.46430      ec2-3-94-231-48..443   ESTABLISHED
tcp4       0      0 192.168.1.6.home.46429 ec2-3-94-231-48..443   TIME_WAIT 
tcp4       0      0 192.168.1.6.home.64583 151.101.241.140.443    ESTABLISHED
tcp4       0      0 192.168.1.6.25230      151.101.241.140.443    ESTABLISHED
tcp4       0      0 192.168.1.6.52860      151.101.241.140.443    ESTABLISHED
tcp4       0      0 192.168.1.6.40140      18.66.196.78.443       ESTABLISHED
tcp4       0      0 192.168.1.6.home.54788 104.20.207.62.443      TIME_WAIT 
tcp4       0      0 192.168.1.6.home.51079 mil04s43-in-f1.1.443   TIME_WAIT 
tcp4       0      0 192.168.1.6.17674      mil41s03-in-f5.1.443   ESTABLISHED
tcp4       0      0 192.168.1.6.home.19543 ec2-34-216-162-2.443   ESTABLISHED
tcp4       0      0 192.168.1.6.home.24031 whatsapp-cdn-shv.443   ESTABLISHED
tcp4       0      0 localhost.8628         localhost.59037        ESTABLISHED
tcp4       0      0 localhost.59037        localhost.8628         ESTABLISHED
udp4       0      0 192.168.1.7.ntp        *.*                   
udp4       0      0 192.168.1.6.62594      *.*                   
udp4       0      0 192.168.1.6.65021      *.*                   
udp4       0      0 192.168.1.6.ssdp       *.*                   
udp6       0      0 fe80::1%lo0.28677      *.*                   
udp6       0      0 localhost.28677        *.*                   
udp4       0      0 localhost.28677        *.*                   
udp4       0      0 192.168.1.6.home.28677 *.*                   
udp4       0      0 localhost.ntp          *.*                   
udp6       0      0 fe80::1%lo0.ntp        *.*                   
udp6       0      0 localhost.ntp          *.*                   
udp4       0      0 192.168.1.6.home.ntp   *.*                   
udp4       0      0 localhost.domain       *.*                   
udp6       0      0 localhost.domain       *.*
 
Back
Top