우분투 설치할 목록

DM wiki
둘러보기로 이동 검색으로 이동

단축키&명령어

OS 관련

  • USB 부팅 디스크 만들기
    • unetbootin
  • 윈도우랑 듀얼 부팅시 시간 달라지는 문제 해결
    • timedatectl set-local-rtc 1 --adjust-system-clock
  • OS 자동 로그인 설정시 keyring 물어보는 것 없애기
    • seahorse 에서
      • default keyring 비밀번호 변경 -> 비밀번호 공백으로 설정
      • login keyring에서 default keyring용 password 삭제
  • Ubuntu 20.04에서 경고창 뜨는 속도 느린 거 고치기 (안 고쳐지는듯?)
    • vi ~/.config/pulse/default.pa 만들어서 넣자
      .include /etc/pulse/default.pa
      unload-module module-suspend-on-idle
      
  • 더 편한 패키지 설치
    • aptitude, Synaptic Package Manager
  • 설정 편집기 (레지스트리 편집기와 비슷)
    • dconf editor
  • 오른쪽 Alt키 Hangul키로 바꾸기
    • gnome-tweak에서
      • Keyboard & Mouse -> Additional Layout Options -> Korean Hangul/Hanja keys
        • [x] Make right Alt a Hangul key
    • dconf-editor에서
      • org.gnome.mutter overlay-key = 'Alt_R'
  • Gnome에서 Alt+F5 단축키 비활성화하기
    • dconf-editor에서 <Alt>F5 지우기
      • org.gnome.desktop.wm.keybindings.unmaximize = ['<Super>Down']
  • 모든 입력기를 다 써본 결과 벼루가 그나마 나음.
    • uim, uim-byeoru
    • <Global settings>
      • [x] Specify default IM
      • Default input method: Byeoru
      • Enabled input methods: "Byeoru", "Mozc"
      • [x] Enable IM switching by hotkey
      • IM switching key: "Super_key"
      • [x] Skip direct method for IM switching by hotkey
      • [ ] Enable input method toggle by hot keys
      • [x] Enable lazy input method lading for fast startup
    • <Global key bindings 1>
      • [Global] on: x
      • [Global] off: x
    • <Mozc key bindings>
      • [Mozc] on: "Hangul", "Henkan_Mode", "hiragana-katakana"
      • [Mozc] off: "Hangul", "Henkan_Mode", "hiragana-katakana"
    • <Byeoru key bindings 1>
      • [Byeoru] on: "Hangul", "Henkan_Mode", "hiragana-katakana"
      • [Byeoru] off: "Hangul", "Henkan_Mode", "hiragana-katakana"
    • byobu, zsh, on-my-zsh, powerlevel10k
    • 폰트는 D2Coding에다가 Nerd폰트 직접 개조해서 포함
    • 파일 안전하게 삭제 safe-rm
  • SSH 관리
    • pac manager(무거우나 강력함)
    • pac manager에서 쉘 입력 보존(방향키 같은) 하려면 rlwrap으로 감싸기 설정
    • Asbru manager
      • preferences->main options->advanced->Host-key verification string을 다음으로 바꾸기
      • (원본) ^.+ontinue connecting \((.+)\/(.+)\)\?\s*$
      • (수정) ^.+ontinue connecting \(([^/]+)\/([^/]+)(?:[^)]+)?\)\?\s*$
  • FTP 프로그램
    • filezilla
  • 방화벽
    • fail2ban
  • ubuntu 18.04 gnome 멈추진 않았는데 마우스 클릭이 안 될때 (focus 이동 먹통)
  • 우분투 확장 기능들 (Gnome)
    • Bluetooth quick connect by bjarosze
    • Clipboard Indicator by Tudmotu
    • Launch new instance by fmuellner
    • Night Light Slider by TimurKiyivinski
    • No activities button by Yaya.cout
    • NoAnnoyance v2 by bjoerndaase
    • Remove Alt+Tab Delay v2 by bjoerndaase
    • slinger by gfxmonk
    • Sound Input & Output Device Chooser by kgshank
    • Status Area Horizontal Spacing by p91paul
    • Screenshot Locations by TimurKiyivinski
      • gnome tweak에서 설정 바꿀 수 있다.
      • 시스템 설정에서 기존 스크린샷 키보드 바로가기 단축키를 지우고,
      • printscreen에 gnome-screenshot -i를,
      • shift+printscreen에 gnome-screenshot -w을 설정
  • 시작 표시줄에서 마우스 휠로 프로그램 전환
    • dconf-editor에서
    • org.gnome.shell.extensions.dash-to-dock scroll-action 'cycle-windows'
  • 제목 표시줄 마우스 휠 버튼 눌렀을 때 최소화 없애기
    • dcond-editor에서
    • org.gnome.desktop.wm.preferences action-middle-click-titlebar 'none'
  • 시작표시줄에서 마운트된 드라이브 없애기
    • dconf-editor에서
    • org.gnome.shell.extensions.dash-to-dock show-mounts false
  • 프로그램 바로가기 만들기
    • alacarte
  • 자동실행 넣을 것들
    • ~/.config/autostart 안에 넣자 (개별 파일로)
      <kdm-chrome.desktop>
      [Desktop Entry]
      Type=Application
      Exec=env LANGUAGE=ko_KR.utf-8 /opt/google/chrome/google-chrome
      Hidden=false
      NoDisplay=false
      X-GNOME-Autostart-enabled=true
      Name[en_US]=chrome kor
      Name=chrome kor
      Comment[en_US]=한국어 크롬
      Comment=크롬을 한국어로 쓰자
      
      <synergy.desktop>
      [Desktop Entry]
      Type=Application
      Exec=synergy
      Hidden=false
      NoDisplay=false
      X-GNOME-Autostart-enabled=true
      Name[ko_KR]=synergy
      Name=synergy
      Comment[ko_KR]=
      Comment=시너지 자동실행
      
      <xmodmap.desktop>
      [Desktop Entry]
      Type=Application
      Exec=xmodmap -e 'keycode 134 = '
      Hidden=false
      NoDisplay=false
      X-GNOME-Autostart-enabled=true
      Name[en_US]=fuck windows key
      Name=fuck windows key
      Comment[en_US]=
      Comment=
      
      <xrandr.desktop>
      [Desktop Entry]
      Type=Application
      Name=kdm-triple-monitor
      Exec=xrandr --output DP-0 --pos 0x0 --rotate left --mode 1920x1080 --output DVI-D-0 --primary --pos 1080x420 --mode 1920x1080 --output HDMI-0 --pos 3000x420 --mode 1920x1080
      Icon=system-run
      X-GNOME-Autostart-enabled=true
      X-GNOME-Autostart-Delay=1
      
  • 단위 표시 바꾸기
    • ~/.pam_environment에서
      LC_NUMERIC	DEFAULT=ko_KR.UTF-8
      LC_TIME	DEFAULT=ko_KR.UTF-8
      LC_MONETARY	DEFAULT=ko_KR.UTF-8
      LC_PAPER	DEFAULT=ko_KR.UTF-8
      LC_NAME	DEFAULT=ko_KR.UTF-8
      LC_ADDRESS	DEFAULT=ko_KR.UTF-8
      LC_TELEPHONE	DEFAULT=ko_KR.UTF-8
      LC_MEASUREMENT	DEFAULT=ko_KR.UTF-8
      LC_IDENTIFICATION	DEFAULT=ko_KR.UTF-8
      LC_COLLATE  DEFAULT=ko_KR.UTF-8
      PAPERSIZE	DEFAULT=a4
      
      LC_COLLATE는 * /etc/environment에다가 넣어줘야 될수도?
  • git 로그인 유지
    • ~/.gitconfig에서
      [user]
      	email = 메일
      	name = Dongmin Kim
      [push]
      	default = simple
      [credential]
      	helper = cache --timeout 86400
      [http]
      [http]
      	proxy =
      
  • conda 기본 채널 설정
    • ~/.condarc에서
      channels:
        - intel
        - defaults
      channel_priority: strict
      
  • ntfs 파티션 자동 마운트
    • 먼저 sudo blkid 명령어로 원하는 파티션의 UUID를 알아 놓는다.
    • sudo vi /etc/fstab 으로 fstab 파일을 연다.
    • 맨 아래줄에 다음과 같이 입력하고 저장한다. 여기서 UUID는 위에서 확인한 걸로 한다. /media/kdm/Win8.1은 자신이 원하는 마운트 경로로 바꿔 준다.
#umask=000 해서 권한 777으로 만든다
UUID=B846EC2A46EBE6DA /media/kdm/ExtLarge ntfs-3g defaults,user,locale=ko_KR.UTF-8,umask=000 0 0

#iSCSI 마운트
UUID=(uuid) /mnt/iscsi_docker ext4 _netdev,defaults 0 0

#ssh 마운트는 먼저 sshfs를 설치한 다음에, 다음과 같이 하면 된다.
#먼저 **root 계정**에서 계정명@호스트로 접속이 되는지 확인한 다음에 넣을 것
계정명@호스트:/kasumi /media/kdm/kasumi_sshfs fuse.sshfs defaults,_netdev,delay_connect,allow_other,uid=1000,gid=1000,reconnect,port=포트,rw,IdentityFile=키파일 0 0

#nfs 마운트는 먼저 nfs-common을 설치한 다음에, 다음과 같이 하면 된다.
#rsize,wsize는 서버의 값을 확인한 다음 설정하는 것을 강력히 권장
호스트:/volume1/kasumi /media/kdm/kasumi nfs nfsvers=3,rsize=32768,wsize=32768,rw,auto,async,nolock

부품 관련

  • 파티션 매니저
    • gparted partition editor
  • 시스템 상태 관련
    • htop
    • iotop
    • iftop
    • ioping
    • lm-sensors
  • GUI 디스크 남은 용량 보기
    • baobab
  • Ubuntu 20.04 + NVIDIA 그래픽카드 환경에서 모니터 회전 정보 저장 안 될 때
  • Ubuntu 18.04 이후 여러 모니터 환경에서, 고주사율(144Hz 등) 모니터가 있음에도 불구하고 마우스만 144Hz로 움직이고 다른 모든 프로그램은 60Hz로 움직이는 문제 해결
    • /etc/environment에 다음 추가 (DP-0은 가장 고주사율 모니터가 쓰는 포트 적기)
      __GL_SYNC_DISPLAY_DEVICE=DP-0
      
  • NVIDIA 그래픽카드 최상의 성능 뽑아내기
    • /etc/modprobe.d/powermizer-kdm.conf
       options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerDefault=0x1;PowerMizerDefaultAC=0x1"
      
      /etc/X11/xorg.conf 안의 Device 항목에 Coolbits 넣어주기
       Section "Device"
           Identifier     "Device0"
           Driver         "nvidia"
           Option         "Coolbits" "24"
           VendorName     "NVIDIA Corporation"
           BusID          "PCI:2:0:0"
       EndSection
       Section "Device"
           Identifier     "Device1"
           Driver         "nvidia"
           Option         "Coolbits" "24"
           VendorName     "NVIDIA Corporation"
           BusID          "PCI:129:0:0"
       EndSection
      
  • Intel 내장 그래픽 모니터랑 NVIDIA 그래픽 모니터 동시에 사용하기
    • 주로 노트북에서 많이 사용하는 PRIME을 억지로 응용해서 가능.
    • 모든 디스플레이 연산은 NVIDIA 그래픽카드에서 하고, 연산 결과물 일부만 Intel 그래픽으로 보내서 실현
    • 참조한 곳: http://us.download.nvidia.com/XFree86/Linux-x86/319.12/README/randr14.html
      Chapter 32. Offloading Graphics Display with RandR 1.4
      Version 1.4 of the X Resize, Rotate, and Reflect Extension (RandR 1.4 for short) adds a way for drivers to work together so that one graphics device can display images rendered by another. This can be used on Optimus-based laptops to display a desktop rendered by an NVIDIA GPU on a screen connected to another graphics device, such as an Intel integrated graphics device or a USB-to-VGA adapter.
      
      
      System Requirements
      X.Org X server version 1.13 or higher.
      
      A Linux kernel with CONFIG_DRM enabled and the appropriate driver interfaces present:
      
      drm_gem_prime_export
      
      drm_gem_prime_import
      
      gem_prime_pin
      
      gem_prime_get_sg_table
      
      gem_prime_import_sg_table
      
      gem_prime_vmap
      
      gem_prime_vunmap
      
      Version 1.4.0 of the xrandr command-line utility.
      
      
      Using the NVIDIA Driver as a RandR 1.4 Output Source Provider
      To use the NVIDIA driver as an RandR 1.4 output source provider, the X server needs to be configured to use the NVIDIA driver for its primary screen and to use the “modesetting” driver for the other graphics device. This can be achieved by placing the following in /etc/X11/xorg.conf:
      
      Section "ServerLayout"
          Identifier "layout"
          Screen 0 "nvidia"
          Inactive "intel"
      EndSection
      
      Section "Device"
          Identifier "nvidia"
          Driver "nvidia"
          BusID "<BusID for NVIDIA device here>"
      EndSection
      
      Section "Screen"
          Identifier "nvidia"
          Device "nvidia"
          # Uncomment this line if your computer has no display devices connected to
          # the NVIDIA GPU.  Leave it commented if you have display devices
          # connected to the NVIDIA GPU that you would like to use.
          #Option "UseDisplayDevice" "none"
      EndSection
      
      Section "Device"
          Identifier "intel"
          Driver "modesetting"
      EndSection
      
      Section "Screen"
          Identifier "intel"
          Device "intel"
      EndSection
      See “What is the format of a PCI Bus ID?” for information on determining the appropriate BusID string for your graphics card.
      
      The X server does not automatically enable displays attached to the non-NVIDIA graphics device in this configuration. To do that, use the xrandr command line tool:
      
      $ xrandr --setprovideroutputsource modesetting NVIDIA-0
      $ xrandr --auto
      This pair of commands can be added to your X session startup scripts, for example by putting them in $HOME/.xinitrc before running startx.
      
      Use the
      
      $ xrandr --listproviders
      command to query the capabilities of the graphics devices. If the system requirements are met and the X server is configured correctly, there should be a provider named NVIDIA-0 with the Source Output capability and one named modesetting with the Sink Output capability. If either provider is missing or doesn't have the expected capability, check your system configuration.
      
      
      Caveats
      There is no synchronization between the images rendered by the NVIDIA GPU and the output device. This means that the output device can start reading the next frame of video while it is still being updated, producing a graphical artifact known as “tearing”. Tearing is currently expected due to limitations in the design of the X.Org X server.
      
      The NVIDIA driver currently only supports the Source Output capability. It does not support render offload and cannot be used as an output sink.
      /etc/X11/xorg.conf 예시 (내가 추가한 것은 intel의 Section "Device"와 intel의 Section "Screen"과 Section "ServerLayout"의 Inactive "intel")
      Section "ServerLayout"
          Identifier     "Layout0"
          Screen      0  "Screen0" 0 0
          InputDevice    "Keyboard0" "CoreKeyboard"
          InputDevice    "Mouse0" "CorePointer"
          Inactive       "intel"
      EndSection
      
      Section "Files"
      EndSection
      
      Section "InputDevice"
      
          # generated from default
          Identifier     "Mouse0"
          Driver         "mouse"
          Option         "Protocol" "auto"
          Option         "Device" "/dev/psaux"
          Option         "Emulate3Buttons" "no"
          Option         "ZAxisMapping" "4 5"
      EndSection
      
      Section "InputDevice"
      
          # generated from default
          Identifier     "Keyboard0"
          Driver         "kbd"
      EndSection
      
      Section "Monitor"
          Identifier     "Monitor0"
          VendorName     "Unknown"
          ModelName      "Unknown"
          Option         "DPMS"
      EndSection
      
      Section "Device"
          Identifier     "Device0"
          Driver         "nvidia"
          VendorName     "NVIDIA Corporation"
      EndSection
      
      Section "Device"
          Identifier     "intel"
          Driver         "modesetting"
      EndSection
      
      Section "Screen"
          Identifier     "Screen0"
          Device         "Device0"
          Monitor        "Monitor0"
          DefaultDepth    24
          SubSection     "Display"
              Depth       24
          EndSubSection
      EndSection
      
      Section "Screen"
          Identifier    "intel"
          Device        "intel"
      EndSection
      
  • 인텔 CPU 온도 쓰로틀링 막기
  • 인텔 CPU 터보부스트 최고 클럭 조정
    • cd /sys/devices/system/cpu/intel_pstate
    • echo "17" tee ./min_perf_pct && echo "17" | tee ./max_perf_pct
    • echo "17" tee ./min_perf_pct && echo "100" | tee ./max_perf_pct
  • 시스템 성능 옵션 조절
    • sudo cpufreq-set -c 0 1 2 3 4 5 6 7 -g performance
    • sudo cpufreq-set -c 0 1 2 3 4 5 6 7 -g ondemand
    • sudo cpufreq-set -c 0 1 2 3 4 5 6 7 -g powersave
  • 시스템 팬 속도 정책 설정
    • sudo apt-get install fancontrol
    • sudo pwmconfig
      • sensors | grep -i fan 했을 때 정보 안 나오면, /etc/modules에 it87 추가해 줘야 한다.
    • sudo service fancontrol restart
BIOS 이름 실제 기기 우분투 드라이버 PWM 제어 최소 RPM 가동 시작 RPM 기본 RPM 최대 RPM
CPU fan 수냉쿨러 3열 팬 it87 hwmon2/pwm1 642 (PWM <= 24) 642 (PWM = 24) 1638 2000 (PWM = 255)
System fan 1 수냉쿨러 펌프 it87 hwmon2/pwm2 0 (PWM <= 60) 845 (PWM = 75) 1271 2343~2700 (PWM = 255)
System fan 2 본체 후면 팬 it87 hwmon2/pwm3 0 (PWM <= 28) 300 (PWM = 45) 1090 1090 (PWM = 255)
    • (2020년 6월 기준 수냉쿨러 설정)
      # Configuration file generated by pwmconfig, changes will be lost
      # 수냉펌프인 hwmon2/pwm2는 항상 최고속도로 돌아가도록 설정
      INTERVAL=5
      DEVPATH=hwmon1=devices/platform/coretemp.0 hwmon2=devices/platform/it87.2608
      DEVNAME=hwmon1=coretemp hwmon2=it8728
      FCTEMPS=hwmon2/pwm1=hwmon1/temp1_input hwmon2/pwm2=hwmon1/temp1_input hwmon2/pwm3=hwmon1/temp1_input
      FCFANS=hwmon2/pwm1=hwmon2/fan1_input hwmon2/pwm2=hwmon2/fan2_input hwmon2/pwm3=hwmon2/fan3_input
      MINTEMP=hwmon2/pwm1=50 hwmon2/pwm2=0 hwmon2/pwm3=50
      MAXTEMP=hwmon2/pwm1=77 hwmon2/pwm2=20 hwmon2/pwm3=77
      MINSTART=hwmon2/pwm1=150 hwmon2/pwm2=75 hwmon2/pwm3=45
      MINSTOP=hwmon2/pwm1=0 hwmon2/pwm2=60 hwmon2/pwm3=28
      
  • 최대 절전 모드 설정
    • sudo apt-get install pm-utils
    • cat /etc/fstab | grep -i swap 해서 UUID 알아내기
    • sudo vi /etc/default/grub
    • GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=a26edce1-f9c2-42ff-a2f2-0e0f52eb3ee9"
    • sudo update-grub
    • 실행하기
      • sudo pm-hibernate
  • 시스템 전력 사용량 조회
    • powertop
  • CPU 온도 및 전력 사용량 조회
    • sudo turbostat --quiet --Summary --show Busy%,Bzy_MHz,PkgTmp,PkgWatt,GFXWatt,IRQ --interval 0.5
    • sudo apt-get install linux-tools-common
    • sudo apt-get install linux-tools-generic
  • iSCSI 장치 만들기 (시놀로지)
    • IQN 이름: iqn.기관설립일.kim.dong-min:원하는 이름
    • LUN 이름: 원하는 이름
    • 총 용량: 1024GB
    • 공간 할당: Thin Provisioning (Thin으로해야 용량 확장 가능)
    • 고급 기능:
      • Hardware-assisted zeroing, locking, data trasfer
      • 스냅샷
      • 공간 재사용
    • 최대 수신/전송 세그멘트 바이트: 262144
  • iSCSI 장치 마운트하기 (우분투)
    • apt-get install open-iscsi
    • vi /etc/iscsi/iscsid.conf
      • node.startup = manual 에서 node.startup = automatic 으로
    • 장치 주소 확인
      • iscsiadm -m discovery -t st -p 192.168.5.7
      • 시놀로지의 경우는 하나의 Target에 대해 ipv4랑 ipv6주소 등 여러가지 던져 주는데, 클라이언트에서 이 중에 하나 연결하면 다른 주소로는 Target 연결 실패하여 재시도하느라 부팅에 120초 이상 걸릴 수 있으니, /etc/iscsi/nodes에서 하나만 남기고 지우자
    • 블록 장치 연결
      • iscsiadm -m node --targetname "iqn 이름" --portal "호스트:포트" --login
    • 블록 장치 이름 찾기
      • fdisk -l (결과 /dev/sdc)
    • 파티션 생성
      • parted /dev/sdc print
      • parted /dev/sdc mklabel gpt
      • parted -a optimal /dev/sdc mkpart iscsi_docker ext4 0% 100%
      • parted /dev/sdc print 으로 생긴 파티션 번호 찾기 (1번)
      • mkfs.ext4 /dev/sdc1
    • 마운트
      • mkdir /mnt/iscsi_docker
      • blkid /dev/sdc1 으로 UUID 찾기
      • vi /etc/fstab
        • UUID=(uuid) /mnt/iscsi_docker ext4 _netdev,defaults 0 0
    • Docker에서 쓸 수 있도록 심볼릭 링크 걸기
      • ln -s /mnt/iscsi_docker /var/lib/docker

프로그램 관련

  • Simplenote
  • 스샷 프로그램
    • shutter
    • 근데 shutter 너무 무거워서 그냥 Shift+PrintScreen 씀
  • 동영상 재생기
    • bomi
    • https://github.com/xylosper/bomi
    • mpv, vlc도 좋음
    • SVP로 30Hz이든 60Hz든 144Hz 주사율까지 뻠삥해보자
      • mpv는 apt-get으로 깐 mpv는 안 되고, 직접 빌드해야 함
      • SVP랑 mpv 다 설치 후, mpv --input-ipc-server=/tmp/mpvsocket --hwdec=audo-copy --player-operation-mode=pseudo-gui로 실행하거나, 아니면 그냥 SVP에서 영상 재생
      • 설정에서 frc.target.max가 47일텐데 이거를 60 이상으로 바꿔주면 60Hz 영상도 뻥튀기해서 볼 수 있음
  • 음악
    • clementine
  • 웹 브라우저
    • google chrome 또는 chromium
    • 크로미움에서 프로필 열지 못함 에러가 날 경우, 일단 브라우저에서 계정 연결을 끊고, 터미널창에서 크로미움을 켰다가 제대로 켜지는 걸 보고 끈 다음에 다시 켜서 로그인 하면 된다.
    • 그리고 자꾸 로그인 키 잠금을 물어보면, '암호 및 키'를 검색해서 '로그인' 항목의 암호를 그냥 똑같은걸로 다시 바꿔주면 된다.
    • 다운로드 한 파일을 클릭하면 파일이 안 열리고 다운로드 폴더가 열린다면
      • ~/.local/share/applications/mimeapps.list 에서 x-scheme-handler/file=exo-file-manager.desktop 앞에 주석처리(맨 앞에 # 붙이면 됨)
    • 백그라운드에서 한국어로 실행하기
      • LANGUAGE=ko_KR.utf-8 nohup /opt/google/chrome/google-chrome 2> /dev/null & disown
  • gedit 자동 백업
  • Git diff 및 브랜치 보기
    • Giggle
  • 그래픽 편집기
    • gimp
    • pinta
  • HEX 비교
    • hexdiff
  • 원격제어
  • 가상머신
    • virtualbox
    • VMware player
      • VMware player 상의 윈도우에서 한/영키가 잘 먹지 않는다면, 다음과 같이 키 매핑을 추가해준다.
        sudo vi /etc/vmware/config
        ** 커널 3.19 이상에서 모듈 설치가 안 되는 문제는, 다음을 참조 (https://wiki.archlinux.org/index.php/VMware#3.19_kernels)
        
        xkeymap.keysym.Hangul = "0x0f2"  
        xkeymap.keysym.Hangul_Hanja = "0x0f1"
        
  • wine
    • winetricks
    • 꿀뷰, 반디집
  • 키보드 마우스 공유
    • synergy
    • 스크립트로 실행하기
      • 서버(키보드와 마우스가 있는 컴퓨터), conf 파일은 GUI를 통해 만들어 두어야 한다.
        #!/bin/sh
        CMD=`./synergys -f --debug NOTE --name kdm-pc -c ./synergys.conf --address :24800 &`
        
      • 서버 설정파일 -> 양 방향을 지정하고 단축키 지정으로 Ctrl+` 로 작업 기기 전환 구현 (출처: https://davejamesmiller.com/blog/synergy-hotkey-to-toggle-screens)
        section: screens
        	kdm-server:
        		halfDuplexCapsLock = false
        		halfDuplexNumLock = false
        		halfDuplexScrollLock = false
        		xtestIsXineramaUnaware = false
        		switchCorners = none 
        		switchCornerSize = 0
        	kdm-pc:
        		halfDuplexCapsLock = false
        		halfDuplexNumLock = false
        		halfDuplexScrollLock = false
        		xtestIsXineramaUnaware = false
        		switchCorners = none 
        		switchCornerSize = 0
        end
        
        section: aliases
        end
        
        section: links
        	kdm-server:
                left = kdm-pc
        		right = kdm-pc
        	kdm-pc:
        		left = kdm-server
                right = kdm-server
        end
        
        section: options
        	relativeMouseMoves = false
        	screenSaverSync = false
        	win32KeepForeground = false
        	switchCorners = none 
        	switchCornerSize = 0
            keystroke(Control+`) = switchInDirection(right)
        end
        
      • 클라이언트
        #!/bin/sh
        CMD=`./synergyc -f --debug NOTE --name kdm-server --display ":0" alkga.iptime.org:24800 &`
        
      • 클라이언트 원격 실행(의존성: expect가 설치되어 있어야 한다)
        #!/usr/bin/expect -f
        spawn ssh -p 8022 [계정]@alkga.iptime.org `/home/kdm/kdm-synergy/synergyc -f --debug DEBUG --name kdm-server --display ":0" alkga.iptime.org:24800 &`
        expect "assword:"
        send "[비밀번호]\r"
        interact
        
        alacarte 으로 우분투 아이콘 바로가기를 만들자.
        • 실행도 쉽고 터미널 아이콘하고 분리도 되서 좋다.
        • /home/kdm/kdm-synergy/synergys -f --debug NOTE --name kdm-pc -c /home/kdm/kdm-synergy/synergys.conf --address :24800 추가, 터미널 사용은 체크 해제.
  • 화면 녹화, 방송 스트리밍
    • obs studio
  • pdf viewer
    • Okular가 로딩도 잘 되고 좋음
    • 기본 evince는 안정적
    • 우분투용 adobe pdf는 버전도 낮고, wine 위에서 돌아가서 호환성 최악(창 최대화 불가, 렌더링 문제 등)
    • wps office의 pdf reader는 예쁘나 로딩이 너무 느림
  • IDE
    • CLion, PyCharm
    • PyCharm에 Black 적용 (문법 정리)
      *** 설정에서 Tools -> File Watchers
      Program: /usr/local/bin/black
      Arguments: -l 88 $FilePath$
      Output paths to refresh: $FilePath$
      Working directory: $ProjectFileDir$
      
      Advanced Options 에서
      (체크 해제) Auto-saved edited files to trigger the watcher
      (체크) Trigger the watcher on external changes
      
  • 기타 개발 관련
    • vscode, matlab, maya
  • vim 커스터마이징
  • DBMS GUI viewer
    • mysql-workbench, pgadmin3
  • 한컴오피스 뷰어
    • 깔고 싶지 않아!!!!!
  • 오피스
    • 기본 libreoffice
    • onlyoffice
  • 파일 기록 삭제
    • activity-log-manager
  • 멈춘 프로세스 쉬운 디버깅
    • crash-watch (https://github.com/FooBarWidget/crash-watch)
      sudo add-apt-repository ppa:phusion.nl/misc
      sudo apt-get update
      sudo apt-get install crash-watch
      
      crash-watch <PID> # 죽는 순간 정보 보여줌
      crash-watch --dump <PID> # 즉시 스택 트레이스 보기
      
  • 일괄 이름 바꾸기
    • Thunar (Xfce 기본 파일 매니저)

유용한 명령어

  • 마이크 입력을 그대로 출력
    • 편한 방법
      sudo apt-get install gstreamer-tools
      gst-launch pulsesrc ! pulsesink
      
    • 위의 방법이 안되면 다음 방법도 써 본다.
      # 이 명령어로 하드웨어 이름을 알아낸다.
      pactl list > list.txt
      # 이 명령어로 출력을 시작한다. --latency-msec 은 짧으면 좋지만 잡음이 생길 수 있으므로 적당한 값으로 한다.
      pacat -r --device=alsa_input.pci-0000_00_1b.0.analog-stereo | pacat -p --latency-msec=50
      
    • 이런 방법도 있다.
      sudo apt-get install pavucontrol
      pactl load-module module-loopback latency_msec=1
      
  • 시작시 창 최소화
sudo apt-get install devilspie

mkdir ~/.devilspie
vi ~/.devilspie/teamviewer.ds

(if  
(is (application_name) "Teamviewer")  
(begin (minimize) )  
)

문제 해결

  • libc등등을 대충 dpkg로 넣어서 의존성 문제 생겨버렸을 때
    • 즉 아래와 같은 문제가 생겼을 때. 그리고 sudo apt install -f 도 먹지 않을 때.
      ibc6-dbg: Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.1 is installed \
      libc6-dev: Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.1 is installed \
                 Depends: libc-dev-bin (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.2 is installed
      libc6-i386: Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.1 is installed
      
    • apt show -a libc6로, 원래 ubuntu에 들어있던 라이브러리의 정확한 이름을 알아낸다. (ex: 2.31-0ubuntu9.1)
    • sudo apt download libc6=2.31-0ubuntu9.1로 deb 파일을 다운받는다.
    • sudp dpkg -i libc~~.deb로 overwrite 한다.
    • 다시 sudo apt install -f 해서 고치기 완료