如何知道程式開啟那些字型檔案(以lightdm為例)

相關討論

測試環境

  • Xubuntu 16.04.1 64位元 繁體中文

locale

執行

$ cat /etc/default/locale

顯示

#  File generated by update-locale
LANG="zh_TW.UTF-8"
LANGUAGE="zh_TW:zh"

執行

$ locale

顯示

LANG=zh_TW.UTF-8
LANGUAGE=zh_TW:zh
LC_CTYPE="zh_TW.UTF-8"
LC_NUMERIC="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_COLLATE="zh_TW.UTF-8"
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES="zh_TW.UTF-8"
LC_PAPER="zh_TW.UTF-8"
LC_NAME="zh_TW.UTF-8"
LC_ADDRESS="zh_TW.UTF-8"
LC_TELEPHONE="zh_TW.UTF-8"
LC_MEASUREMENT="zh_TW.UTF-8"
LC_IDENTIFICATION="zh_TW.UTF-8"
LC_ALL=

操作注意事項

在「登出」的狀態下測試,注意是在「登出」的狀態下測試,若在「登入」的狀態下,下面的方法無法測試到。

登出之後,就會看到「登入」的畫面,

這時候,可以按下「Ctrl + Alt + F1」,切換到「Virtual Terminal」來下指令。

若是在「VirtualBox」的環境,快捷鍵則是按下「右邊Ctrl + F1」來切換。

切換回到「X」畫面,則是「Ctrl + Alt + F7」,「VirtualBox」則是「右邊Ctrl + F7」。

操作步驟

列舉和「lightdm」相關的「Process」

執行

$ ps aux | grep lightdm

顯示

root      1809  0.0  0.7 292164  7888 ?        Ssl  11:50   0:00 /usr/sbin/lightdm
root      1836  0.6  4.8 286016 49384 tty7     Ss+  11:50   0:00 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root      2029  0.0  0.6 226172  6168 ?        Sl   11:50   0:00 lightdm --session-child 16 19
lightdm   2039  0.0  0.4  45248  4504 ?        Ss   11:50   0:00 /lib/systemd/systemd --user
lightdm   2044  0.0  0.2  63492  2104 ?        S    11:50   0:00 (sd-pam)
lightdm   2063  0.0  0.2 130500  2940 ?        Sl   11:50   0:00 /usr/bin/gnome-keyring-daemon --daemonize --login
lightdm   2065  0.0  0.0   4508   788 ?        Ss   11:50   0:00 /bin/sh /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/lightdm-gtk-greeter
lightdm   2070  0.0  0.2  42900  2648 ?        Ss   11:50   0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
lightdm   2071  2.3  9.5 619724 97392 ?        Sl   11:50   0:02 /usr/sbin/lightdm-gtk-greeter
lightdm   2073  0.0  0.7 353624  7724 ?        Sl   11:50   0:00 /usr/lib/at-spi2-core/at-spi-bus-launcher --launch-immediately
lightdm   2078  0.0  0.5 282092  5612 ?        Sl   11:50   0:00 /usr/lib/gvfs/gvfsd
lightdm   2083  0.0  0.6 354424  7052 ?        Sl   11:50   0:00 /usr/lib/gvfs/gvfsd-fuse /run/user/108/gvfs -f -o big_writes
lightdm   2087  0.0  0.3  42768  3412 ?        S    11:50   0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
lightdm   2096  0.0  0.6 206972  6392 ?        Sl   11:50   0:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
lightdm   2101  0.0  0.4  53460  4080 ?        S    11:50   0:00 upstart --user --startup-event indicator-services-start
lightdm   2103  0.0  1.0 367740 10600 ?        Ssl  11:50   0:00 /usr/lib/x86_64-linux-gnu/indicator-messages/indicator-messages-service
lightdm   2104  0.0  1.3 691356 13620 ?        Ssl  11:50   0:00 /usr/lib/x86_64-linux-gnu/indicator-sound/indicator-sound-service
lightdm   2105  0.0  1.2 395940 12380 ?        Ssl  11:50   0:00 /usr/lib/x86_64-linux-gnu/indicator-application/indicator-application-service
lightdm   2123  0.2  1.0 415616 10460 ?        S<l  11:50   0:00 /usr/bin/pulseaudio --start --log-target=syslog
root      2141  0.0  0.4  82704  5004 ?        S    11:50   0:00 lightdm --session-child 12 19
user      2232  0.0  0.0  21740   916 tty1     S+   11:51   0:00 grep --color=auto lightdm

找到「/usr/sbin/lightdm-gtk-greeter」

可以找到下面這一個「Process」,其「Process ID」是「2071」。

lightdm   2071  2.3  9.5 619724 97392 ?        Sl   11:50   0:02 /usr/sbin/lightdm-gtk-greeter

使用「lsof -p」觀看「Process」開啟了那些檔案

根據上面找到的「2071」這個「Process ID」。

執行

$ sudo lsof -p 2071

顯示

COMMAND    PID    USER   FD      TYPE             DEVICE SIZE/OFF    NODE NAME
lightdm-g 2071 lightdm  cwd       DIR                8,1     4096  524601 /var/lib/lightdm
lightdm-g 2071 lightdm  rtd       DIR                8,1     4096       2 /
lightdm-g 2071 lightdm  txt       REG                8,1   133240 2238978 /usr/sbin/lightdm-gtk-greeter
lightdm-g 2071 lightdm  DEL       REG                0,5           131073 /SYSV00000000
lightdm-g 2071 lightdm  mem       REG                8,1 19319840 2887232 /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc
lightdm-g 2071 lightdm  mem       REG                8,1 18748872 2887236 /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc
lightdm-g 2071 lightdm  mem       REG                8,1    27448 2363239 /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules/im-xim.so
lightdm-g 2071 lightdm  mem       REG                8,1   240272 2237836 /usr/lib/x86_64-linux-gnu/libcroco-0.6.so.3.0.1
lightdm-g 2071 lightdm  mem       REG                8,1   225992 2238576 /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13
lightdm-g 2071 lightdm  mem       REG                8,1    10536 2363033 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
lightdm-g 2071 lightdm  mem       REG                8,1    23232 2363030 /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
lightdm-g 2071 lightdm  mem       REG                8,1   310556 3014741 /usr/share/fonts/truetype/noto/NotoSans-Bold.ttf
lightdm-g 2071 lightdm  DEL       REG                0,5            98304 /SYSV00000000
lightdm-g 2071 lightdm  mem       REG                8,1   125988 2494599 /usr/share/mime/mime.cache
lightdm-g 2071 lightdm  mem       REG                8,1    25793 3543725 /usr/share/locale/zh_TW/LC_MESSAGES/iso_3166.mo
lightdm-g 2071 lightdm  mem       REG                8,1    34236 2631217 /usr/share/icons/Adwaita/icon-theme.cache
lightdm-g 2071 lightdm  mem       REG                8,1    25360 3153833 /usr/share/icons/hicolor/icon-theme.cache
lightdm-g 2071 lightdm  mem       REG                8,1   111344 3172547 /usr/share/icons/gnome/icon-theme.cache
lightdm-g 2071 lightdm  mem       REG                8,1    52480 2363040 /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
lightdm-g 2071 lightdm  mem       REG                8,1   118432 2363044 /usr/lib/x86_64-linux-gnu/gio/modules/libgioremote-volume-monitor.so
lightdm-g 2071 lightdm  mem       REG                8,1   245912 2363265 /usr/lib/x86_64-linux-gnu/gvfs/libgvfscommon.so
lightdm-g 2071 lightdm  mem       REG                8,1   202704 2363045 /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
lightdm-g 2071 lightdm  mem       REG                8,1   227384 2238709 /usr/lib/x86_64-linux-gnu/libtxc_dxtn_s2tc.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    81040 3412638 /lib/x86_64-linux-gnu/libbsd.so.0.8.2
lightdm-g 2071 lightdm  mem       REG                8,1 41587032 2237595 /usr/lib/x86_64-linux-gnu/libLLVM-3.8.so.1
lightdm-g 2071 lightdm  mem       REG                8,1   201688 3167219 /usr/share/icons/elementary-xfce/icon-theme.cache
lightdm-g 2071 lightdm  mem       REG                8,1    13732 3172537 /usr/share/icons/elementary-xfce-dark/icon-theme.cache
lightdm-g 2071 lightdm  mem       REG                8,1   305872 3014744 /usr/share/fonts/truetype/noto/NotoSans-Regular.ttf
lightdm-g 2071 lightdm  mem       REG                8,1    41080  524377 /var/cache/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    20584  524359 /var/cache/fontconfig/2cd17615ca594fa2959ae173292e504c-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1   167240 3412814 /lib/x86_64-linux-gnu/libtinfo.so.5.9
lightdm-g 2071 lightdm  mem       REG                8,1   212168 2237922 /usr/lib/x86_64-linux-gnu/libedit.so.2.0.53
lightdm-g 2071 lightdm  mem       REG                8,1    96824 2237927 /usr/lib/x86_64-linux-gnu/libelf-0.165.so
lightdm-g 2071 lightdm  mem       REG                8,1    30960 2237900 /usr/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    47336 2237906 /usr/lib/x86_64-linux-gnu/libdrm_radeon.so.1.0.1
lightdm-g 2071 lightdm  mem       REG                8,1    30936 2237904 /usr/lib/x86_64-linux-gnu/libdrm_nouveau.so.2.0.0
lightdm-g 2071 lightdm  mem       REG                8,1  9734592 2362440 /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
lightdm-g 2071 lightdm  mem       REG                8,1    59784 2237898 /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0
lightdm-g 2071 lightdm  mem       REG                8,1    22784 2237658 /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    18560 2238811 /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   100480 2238815 /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1     5992 2237603 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   182592 2238075 /usr/lib/x86_64-linux-gnu/libglapi.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    10264 2238862 /usr/lib/x86_64-linux-gnu/libxshmfence.so.1.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    26784 2238825 /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    10368 2238817 /usr/lib/x86_64-linux-gnu/libxcb-present.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    10384 2238813 /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   459392 2363373 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
lightdm-g 2071 lightdm  mem       REG                8,1 10657136 2236221 /usr/lib/locale/locale-archive
lightdm-g 2071 lightdm  mem       REG                8,1    80496 3412686 /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
lightdm-g 2071 lightdm  mem       REG                8,1   919168 3412682 /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5
lightdm-g 2071 lightdm  mem       REG                8,1 25913104 2238219 /usr/lib/x86_64-linux-gnu/libicudata.so.55.1
lightdm-g 2071 lightdm  mem       REG                8,1    97064 2237760 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.58.0
lightdm-g 2071 lightdm  mem       REG                8,1   149720 2238113 /usr/lib/x86_64-linux-gnu/libgraphite2.so.3.0.1
lightdm-g 2071 lightdm  mem       REG                8,1    30928 2237857 /usr/lib/x86_64-linux-gnu/libdatrie.so.1.3.3
lightdm-g 2071 lightdm  mem       REG                8,1   137400 3412709 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
lightdm-g 2071 lightdm  mem       REG                8,1  1636360 2238233 /usr/lib/x86_64-linux-gnu/libicuuc.so.55.1
lightdm-g 2071 lightdm  mem       REG                8,1    89696 3412680 /lib/x86_64-linux-gnu/libgcc_s.so.1
lightdm-g 2071 lightdm  mem       REG                8,1  1566440 2238657 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
lightdm-g 2071 lightdm  mem       REG                8,1   199176 2238516 /usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9.0.1
lightdm-g 2071 lightdm  mem       REG                8,1    14496 2237762 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.58.0
lightdm-g 2071 lightdm  mem       REG                8,1   395968 2238339 /usr/lib/x86_64-linux-gnu/libmirprotobuf.so.3
lightdm-g 2071 lightdm  mem       REG                8,1   200128 2238338 /usr/lib/x86_64-linux-gnu/libmircommon.so.5
lightdm-g 2071 lightdm  mem       REG                8,1   166032 3412673 /lib/x86_64-linux-gnu/libexpat.so.1.6.0
lightdm-g 2071 lightdm  mem       REG                8,1   383920 2238189 /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0.10000.1
lightdm-g 2071 lightdm  mem       REG                8,1   309392 3412658 /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
lightdm-g 2071 lightdm  mem       REG                8,1   190632 2237714 /usr/lib/x86_64-linux-gnu/libatspi.so.0.0.1
lightdm-g 2071 lightdm  mem       REG                8,1    37264 2238683 /usr/lib/x86_64-linux-gnu/libthai.so.0.2.4
lightdm-g 2071 lightdm  mem       REG                8,1    22640 2237620 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    14456 2237609 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   155880 2238856 /usr/lib/x86_64-linux-gnu/libxkbfile.so.1.0.2
lightdm-g 2071 lightdm  mem       REG                8,1  1805560 2238860 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.3
lightdm-g 2071 lightdm  mem       REG                8,1   456632 3412771 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
lightdm-g 2071 lightdm  mem       REG                8,1    31104 2237962 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
lightdm-g 2071 lightdm  mem       REG                8,1   101200 3412794 /lib/x86_64-linux-gnu/libresolv-2.23.so
lightdm-g 2071 lightdm  mem       REG                8,1   130224 3412800 /lib/x86_64-linux-gnu/libselinux.so.1
lightdm-g 2071 lightdm  mem       REG                8,1   104824 3412833 /lib/x86_64-linux-gnu/libz.so.1.2.8
lightdm-g 2071 lightdm  mem       REG                8,1    39416 2237642 /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
lightdm-g 2071 lightdm  mem       REG                8,1    39056 2238819 /usr/lib/x86_64-linux-gnu/libxcb-render.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    14480 2238823 /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   149904 3412783 /lib/x86_64-linux-gnu/libpng12.so.0.54.0
lightdm-g 2071 lightdm  mem       REG                8,1   694800 2238012 /usr/lib/x86_64-linux-gnu/libfreetype.so.6.12.1
lightdm-g 2071 lightdm  mem       REG                8,1   686096 2238495 /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.33.6
lightdm-g 2071 lightdm  mem       REG                8,1    31712 3412796 /lib/x86_64-linux-gnu/librt-2.23.so
lightdm-g 2071 lightdm  mem       REG                8,1    73640 2237622 /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
lightdm-g 2071 lightdm  mem       REG                8,1   530208 2238337 /usr/lib/x86_64-linux-gnu/libmirclient.so.9
lightdm-g 2071 lightdm  mem       REG                8,1    56528 2238769 /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0
lightdm-g 2071 lightdm  mem       REG                8,1     6088 2238773 /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    31168 2238771 /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   256440 2238854 /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    10248 2237618 /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0
lightdm-g 2071 lightdm  mem       REG                8,1    10232 2237614 /usr/lib/x86_64-linux-gnu/libXcomposite.so.1.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    39232 2237616 /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
lightdm-g 2071 lightdm  mem       REG                8,1    43288 2237640 /usr/lib/x86_64-linux-gnu/libXrandr.so.2.2.0
lightdm-g 2071 lightdm  mem       REG                8,1    10376 2237632 /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   273832 2238002 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.9.0
lightdm-g 2071 lightdm  mem       REG                8,1    90000 2238475 /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0.3800.1
lightdm-g 2071 lightdm  mem       REG                8,1  1003624 2237934 /usr/lib/x86_64-linux-gnu/libepoxy.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   193248 2237708 /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   150440 2237706 /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0.21809.1
lightdm-g 2071 lightdm  mem       REG                8,1    34944 2237775 /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2.11400.6
lightdm-g 2071 lightdm  mem       REG                8,1    22584 2237624 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
lightdm-g 2071 lightdm  mem       REG                8,1    63944 2237630 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
lightdm-g 2071 lightdm  mem       REG                8,1   310512 2238471 /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0.3800.1
lightdm-g 2071 lightdm  mem       REG                8,1    52624 2238473 /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0.3800.1
lightdm-g 2071 lightdm  mem       REG                8,1    14656 2238083 /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.4800.1
lightdm-g 2071 lightdm  mem       REG                8,1    14608 3412666 /lib/x86_64-linux-gnu/libdl-2.23.so
lightdm-g 2071 lightdm  mem       REG                8,1   137728 2238831 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
lightdm-g 2071 lightdm  mem       REG                8,1   111296 2238858 /usr/lib/x86_64-linux-gnu/libxklavier.so.16.4.0
lightdm-g 2071 lightdm  mem       REG                8,1  1864888 3412642 /lib/x86_64-linux-gnu/libc-2.23.so
lightdm-g 2071 lightdm  mem       REG                8,1   138744 3412788 /lib/x86_64-linux-gnu/libpthread-2.23.so
lightdm-g 2071 lightdm  mem       REG                8,1  1088952 3412712 /lib/x86_64-linux-gnu/libm-2.23.so
lightdm-g 2071 lightdm  mem       REG                8,1  1115136 3412684 /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.1
lightdm-g 2071 lightdm  mem       REG                8,1   339000 2238099 /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.1
lightdm-g 2071 lightdm  mem       REG                8,1  1599368 2238069 /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.4800.1
lightdm-g 2071 lightdm  mem       REG                8,1   138656 2238049 /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.2
lightdm-g 2071 lightdm  mem       REG                8,1  1123792 2237777 /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6
lightdm-g 2071 lightdm  mem       REG                8,1   895344 2238045 /usr/lib/x86_64-linux-gnu/libgdk-3.so.0.1800.9
lightdm-g 2071 lightdm  mem       REG                8,1  7513160 2238163 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.1800.9
lightdm-g 2071 lightdm  mem       REG                8,1   144240 2238237 /usr/lib/x86_64-linux-gnu/libido3-0.1.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1    73320 2238247 /usr/lib/x86_64-linux-gnu/libindicator3.so.7.0.0
lightdm-g 2071 lightdm  mem       REG                8,1  1285552 2237605 /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
lightdm-g 2071 lightdm  mem       REG                8,1   101840 2238304 /usr/lib/x86_64-linux-gnu/liblightdm-gobject-1.so.0.0.0
lightdm-g 2071 lightdm  mem       REG                8,1   162632 3412614 /lib/x86_64-linux-gnu/ld-2.23.so
lightdm-g 2071 lightdm  mem       REG                8,1     2339 3543729 /usr/share/locale/zh_TW/LC_MESSAGES/iso_639_3.mo
lightdm-g 2071 lightdm  mem       REG                8,1     3416  524356 /var/cache/fontconfig/0d8c3b2ac0904cb8a57a757ad11a4a08-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    84432  524353 /var/cache/fontconfig/04aabc0a78ac019cf9454389977116d2-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     3144  524358 /var/cache/fontconfig/1ac9eb803944fde146138c791f5cc56a-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    12392  524363 /var/cache/fontconfig/385c0604a188198f04d133e54aba7fe7-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     1632  524390 /var/cache/fontconfig/dc05db6664285cc2f12bf69c139ae4c3-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     8640  524373 /var/cache/fontconfig/767a8244fc0220cfb567a839d0392e0b-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     2320  524364 /var/cache/fontconfig/4794a0821666d79190d59a36cb4f44b5-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1   157248  524354 /var/cache/fontconfig/0bd3dc0958fa2205aaaa8ebb13e2872b-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    17256  524376 /var/cache/fontconfig/8801497958630a81b71ace7c5f9b32a8-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     1800  524383 /var/cache/fontconfig/bab58bb527bb656aaa9f116d68a48d89-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    25168  524360 /var/cache/fontconfig/3047814df9a2f067bd2d96a2b9c36e5a-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     1816  524367 /var/cache/fontconfig/56cf4f4769d0f4abc89a4895d7bd3ae1-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     3184  524382 /var/cache/fontconfig/b9d506c9ac06c20b433354fa67a72993-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    21520  524381 /var/cache/fontconfig/b47c4e1ecd0709278f4910c18777a504-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    76688  524387 /var/cache/fontconfig/d52a8644073d54c13679302ca1180695-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     1816  524366 /var/cache/fontconfig/551ecf3b0e8b0bca0f25c0944f561853-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    15216  524388 /var/cache/fontconfig/d589a48862398ed80a3d6066f4f56f4c-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    49168  524385 /var/cache/fontconfig/089dead882dea3570ffc31a9898cfb69-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    10736  524372 /var/cache/fontconfig/75114ca45c98e8a441da0ff356701271-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    44112  524375 /var/cache/fontconfig/83bf95040141907cd45bb53cf7c1c148-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    70208  524379 /var/cache/fontconfig/9b89f8e3dae116d678bbf48e5f21f69b-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1   181773 2497274 /usr/share/locale-langpack/zh_TW/LC_MESSAGES/gtk30-properties.mo
lightdm-g 2071 lightdm  mem       REG                8,1    81783 2497249 /usr/share/locale-langpack/zh_TW/LC_MESSAGES/gtk30.mo
lightdm-g 2071 lightdm  mem       REG                8,1   131878 2497548 /usr/share/locale-langpack/zh_TW/LC_MESSAGES/libc.mo
lightdm-g 2071 lightdm  mem       REG                8,1    94249 2497268 /usr/share/locale-langpack/zh_TW/LC_MESSAGES/glib20.mo
lightdm-g 2071 lightdm  mem       REG                8,1   536520 3412810 /lib/x86_64-linux-gnu/libsystemd.so.0.14.0
lightdm-g 2071 lightdm  mem       REG                8,1     3464  524361 /var/cache/fontconfig/30829fa25452a46451e813d634d7f916-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     2432  524355 /var/cache/fontconfig/0c9eb80ebd1c36541ebe2852d3bb0c49-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     9176  533780 /var/cache/fontconfig/e13b20fdb08344e0e664864cc2ede53d-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    13392  524368 /var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     9709 2497202 /usr/share/locale-langpack/zh_TW/LC_MESSAGES/atk10.mo
lightdm-g 2071 lightdm  mem       REG                8,1     1985 3543738 /usr/share/locale/zh_TW/LC_MESSAGES/lightdm-gtk-greeter.mo
lightdm-g 2071 lightdm  mem       REG                8,1    26258 2363013 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
lightdm-g 2071 lightdm    0r      CHR                1,3      0t0       6 /dev/null
lightdm-g 2071 lightdm    1w      CHR                1,3      0t0       6 /dev/null
lightdm-g 2071 lightdm    2w      REG                8,1     1377  526867 /var/log/lightdm/seat0-greeter.log
lightdm-g 2071 lightdm    3u  a_inode               0,11        0    6978 [eventfd]
lightdm-g 2071 lightdm    4u  a_inode               0,11        0    6978 [eventfd]
lightdm-g 2071 lightdm    5u     unix 0xffff880035161a40      0t0   17283 type=STREAM
lightdm-g 2071 lightdm    6u     unix 0xffff880035160f00      0t0   17359 type=STREAM
lightdm-g 2071 lightdm    7u  a_inode               0,11        0    6978 [eventfd]
lightdm-g 2071 lightdm    8u     unix 0xffff88003a07da40      0t0   17732 type=STREAM
lightdm-g 2071 lightdm    9u     unix 0xffff88003a2c9a40      0t0   17385 type=STREAM
lightdm-g 2071 lightdm   10u  a_inode               0,11        0    6978 [eventfd]
lightdm-g 2071 lightdm   12r     FIFO               0,10      0t0   16548 pipe
lightdm-g 2071 lightdm   15w     FIFO               0,10      0t0   16549 pipe

進一步過濾列表

執行

$ sudo lsof -p 2071 | grep font

顯示

lightdm-g 2071 lightdm  mem       REG                8,1 19319840 2887232 /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc
lightdm-g 2071 lightdm  mem       REG                8,1 18748872 2887236 /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc
lightdm-g 2071 lightdm  mem       REG                8,1   310556 3014741 /usr/share/fonts/truetype/noto/NotoSans-Bold.ttf
lightdm-g 2071 lightdm  mem       REG                8,1   305872 3014744 /usr/share/fonts/truetype/noto/NotoSans-Regular.ttf
lightdm-g 2071 lightdm  mem       REG                8,1    41080  524377 /var/cache/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    20584  524359 /var/cache/fontconfig/2cd17615ca594fa2959ae173292e504c-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1   273832 2238002 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.9.0
lightdm-g 2071 lightdm  mem       REG                8,1     3416  524356 /var/cache/fontconfig/0d8c3b2ac0904cb8a57a757ad11a4a08-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    84432  524353 /var/cache/fontconfig/04aabc0a78ac019cf9454389977116d2-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     3144  524358 /var/cache/fontconfig/1ac9eb803944fde146138c791f5cc56a-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    12392  524363 /var/cache/fontconfig/385c0604a188198f04d133e54aba7fe7-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     1632  524390 /var/cache/fontconfig/dc05db6664285cc2f12bf69c139ae4c3-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     8640  524373 /var/cache/fontconfig/767a8244fc0220cfb567a839d0392e0b-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     2320  524364 /var/cache/fontconfig/4794a0821666d79190d59a36cb4f44b5-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1   157248  524354 /var/cache/fontconfig/0bd3dc0958fa2205aaaa8ebb13e2872b-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    17256  524376 /var/cache/fontconfig/8801497958630a81b71ace7c5f9b32a8-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     1800  524383 /var/cache/fontconfig/bab58bb527bb656aaa9f116d68a48d89-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    25168  524360 /var/cache/fontconfig/3047814df9a2f067bd2d96a2b9c36e5a-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     1816  524367 /var/cache/fontconfig/56cf4f4769d0f4abc89a4895d7bd3ae1-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     3184  524382 /var/cache/fontconfig/b9d506c9ac06c20b433354fa67a72993-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    21520  524381 /var/cache/fontconfig/b47c4e1ecd0709278f4910c18777a504-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    76688  524387 /var/cache/fontconfig/d52a8644073d54c13679302ca1180695-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     1816  524366 /var/cache/fontconfig/551ecf3b0e8b0bca0f25c0944f561853-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    15216  524388 /var/cache/fontconfig/d589a48862398ed80a3d6066f4f56f4c-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    49168  524385 /var/cache/fontconfig/089dead882dea3570ffc31a9898cfb69-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    10736  524372 /var/cache/fontconfig/75114ca45c98e8a441da0ff356701271-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    44112  524375 /var/cache/fontconfig/83bf95040141907cd45bb53cf7c1c148-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    70208  524379 /var/cache/fontconfig/9b89f8e3dae116d678bbf48e5f21f69b-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     3464  524361 /var/cache/fontconfig/30829fa25452a46451e813d634d7f916-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     2432  524355 /var/cache/fontconfig/0c9eb80ebd1c36541ebe2852d3bb0c49-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1     9176  533780 /var/cache/fontconfig/e13b20fdb08344e0e664864cc2ede53d-le64.cache-6
lightdm-g 2071 lightdm  mem       REG                8,1    13392  524368 /var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-6

libfontconfig

執行

$ sudo lsof -p 2071 | grep font | grep so

顯示

lightdm-g 2071 lightdm  mem       REG                8,1   273832 2238002 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1.9.0

字型檔案路徑

執行

$ sudo lsof -p 2071 | grep font | grep Noto

顯示

lightdm-g 2071 lightdm  mem       REG                8,1 19319840 2887232 /usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc
lightdm-g 2071 lightdm  mem       REG                8,1 18748872 2887236 /usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc
lightdm-g 2071 lightdm  mem       REG                8,1   310556 3014741 /usr/share/fonts/truetype/noto/NotoSans-Bold.ttf
lightdm-g 2071 lightdm  mem       REG                8,1   305872 3014744 /usr/share/fonts/truetype/noto/NotoSans-Regular.ttf

log檔路徑

執行

$ sudo lsof -p 2071 | grep log

顯示

lightdm-g 2071 lightdm    2w      REG                8,1     1377  526867 /var/log/lightdm/seat0-greeter.log

可以找到「/var/log/lightdm/seat0-greeter.log」這個「log檔」。