Skip to content

Commit

Permalink
+compile/dbg.md
Browse files Browse the repository at this point in the history
full dbg

LF

--enable-static \

- dbg

compile/dbg: - x11-base:fluxbox
  • Loading branch information
sam#gemmi-win10 authored and huapox committed Nov 20, 2023
1 parent 6e98940 commit 3c6cca3
Showing 1 changed file with 120 additions and 0 deletions.
120 changes: 120 additions & 0 deletions compile/dbg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@


```bash
#
root@tenvm2:~# docker run -it --rm --privileged -v /mnt:/mnt2 infrastlabs/x11-base:builder


cd /mnt2/
apk add git gawk
git clone https://gitee.com/infrastlabs/docker-x11base
cd docker-x11base/compile/src/
```

- build

```bash
export CFLAGS="-Os -fomit-frame-pointer"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-Wl,--as-needed --static -static -Wl,--strip-all"
#
export CC=xx-clang

ln -s $(pwd) /src
chmod +x **/*.sh

#
sh x-xrdp/build.sh b_deps;
sh x-xrdp/build.sh xrdp;

cd /tmp/xrdp && ./bootstrap;
sed -i "s^putpwent(spw, fd);^// putpwent(spw, fd);^g" ./sesman/verify_user.c

# before ./configure
# deps:
#23 222.8 make[2]: Entering directory '/tmp/xrdp/sesman/chansrv'
#23 222.8 CCLD xrdp-chansrv
#23 223.0 /usr/bin/x86_64-alpine-linux-musl-ld: cannot find -lXrandr
#23 223.0 /usr/bin/x86_64-alpine-linux-musl-ld: cannot find -lfuse
f=sesman/chansrv/Makefile.am
sed -i "s^\$(X_PRE_LIBS) -lXfixes -lXrandr -lX11^\$(X_PRE_LIBS) -lXfixes -lXrandr -lX11 -lX11-xcb -lxcb -lXdmcp -lXau -lfdk-aac^g" $f
cat $f |grep lX11 -n

f=sesman/tools/Makefile.am
sed -i "s^\$(X_PRE_LIBS) -lX11^\$(X_PRE_LIBS) -lX11 -lX11-xcb -lxcb -lXdmcp -lXau -lfdk-aac^g" $f
cat $f |grep lX11 -n

# genkeymap/Makefile.am
f=genkeymap/Makefile.am
sed -i "s^\$(X_PRE_LIBS) -lX11^\$(X_PRE_LIBS) -lX11 -lX11-xcb -lxcb -lXdmcp -lXau -lfdk-aac^g" $f
cat $f |grep lX11 -n


apk add openssl-dev openssl-libs-static libxcb-static fuse-static
apk add fuse-dev fdk-aac-dev opus-dev lame-dev;
apk add nasm

export TARGETPATH=/usr/local/static/xrdp
./configure \
--prefix=$TARGETPATH \
--enable-vsock \
--enable-fdkaac \
--enable-opus \
--enable-fuse \
--enable-mp3lame \
--enable-pixman \
--disable-pam \
--enable-static \
--enable-shared \
--enable-devel-all

make
make install
```

**dbg**

- buidler

```bash
# bash-5.1# find /etc/xrdp/
/etc/xrdp/
/etc/xrdp/rsakeys.ini
/etc/xrdp/xrdp_keyboard.ini
/etc/xrdp/xrdp.ini
# bash-5.1# /usr/local/static/xrdp/sbin/xrdp -n
xrdp[82155]: [INFO ] starting xrdp with pid 82155
xrdp[82155]: [INFO ] address [0.0.0.0] port [3389] mode 1
xrdp[82155]: [INFO ] listening to port 3389 on 0.0.0.0
xrdp[82155]: [INFO ] xrdp_listen_pp done
^Cxrdp[82155]: [INFO ] Received termination signal, stopping the server accept new connections thread
# bash-5.1# /usr/local/static/xrdp/sbin/xrdp -n &
[1] 82156
bash-5.1# xrdp[82156]: [INFO ] starting xrdp with pid 82156
xrdp[82156]: [INFO ] address [0.0.0.0] port [3389] mode 1
xrdp[82156]: [INFO ] listening to port 3389 on 0.0.0.0
xrdp[82156]: [INFO ] xrdp_listen_pp done

# bash-5.1# netstat -ntlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 82156/xrdp
```

- x11-base:fluxbox

```bash
root@ten-vm1:/# find /etc/xrdp/ |sort
/etc/xrdp/
/etc/xrdp/km-00000409.ini
/etc/xrdp/xrdp_keyboard.ini
/etc/xrdp/startwm.sh
/etc/xrdp/xrdp.ini.tpl
/etc/xrdp/vnc_pass ##
/etc/xrdp/xrdp.ini ##
/etc/xrdp/rsakeys.ini ##geykey
/etc/xrdp/pulse/default.pa

```

0 comments on commit 3c6cca3

Please sign in to comment.