GCC

Origin link 2023-4-26


some tips when i trying compile opengl programs in conda
(opengl) hongy19@WSL opengl$ gcc glfw-1.cpp -static -lglfw -lGL
/usr/sbin/ld: cannot find -lglfw: No such file or directory
/usr/sbin/ld: cannot find -lGL: No such file or directory
collect2: error: ld returned 1 exit status

X11 and wayland

Origin link 2023-4-22

 

see Environment variables for Wayland hackers and Wayland-specific environment variables for detail and what is setting in wsl2.

gtk3/gtk3 in conda has disabled wayland support, see link.  
  (gtk) hongy19@WSL cairo$ GDK_BACKEND=help python test1.py
  Supported GDK backends: x11

keyboard

Origin link 2023-4-16

 

According to Archlinux wiki and How Keys Are Turned Into Actions , here comes how keystroke information is transferred in computer.
And there are two types of key (see link )
.inputrc is readline initialization file and used to map key sequence to readline function like "end-of-history". Then you need to use text to describe "special keys" or "escape sequences", see following example.
You could use "showkey -k" or "od -c" to show escape sequence of special keys.

Wayland and weston

Origin link 2023-4-10

font, 2D drawing on linux

Origin link 2023-4-10

 Here come several basic concept for font, drawing on linux




remote desktop on linux

Origin link 2023-4-7

clash

Origin link 2023-4-5

X11 forwarding

Origin link 2023-4-2

 I tried to ssh to linux server (Archlinux) from wsl2 and run X-windows application on wsls. Here comes summary

At beginning, I always fail since I use "ssh -X linux-server" but actually I should use "ssh -Y linux-server". -X is untrust X11 forwarding and  -Y is trust X11 forwarding. untrust X11 forwarding need X server support and I guess wsl2 doesn't support it. See detail on link1, link2 .

You could just igore following error message when you "ssh linux server"
"debug1: No xauth program.
Warning: No xauth data; using fake authentication data for X11 forwarding.
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Remote: No xauth program; cannot forward X11."

rtorrent/clash/ipfs/ipv6-dhcp

Origin link 2023-4-1

Regular expression

Origin link 2022-7-3

"$" are different in basic regular expression and extend regular expression, see https://stackoverflow.com/questions/38114132/why-does-dollar-not-match-literal-dollar-when-extended-regex-ere-option-is-use.


https://www.gnu.org/software/findutils/manual/html_node/find_html/posix_002degrep-regular-expression-syntax.html#posix_002degrep-regular-expression-syntax

old page page 2 new page