"우분투 설치할 목록"의 두 판 사이의 차이

DM wiki
둘러보기로 이동 검색으로 이동
잔글
 
(같은 사용자의 중간 판 37개는 보이지 않습니다)
1번째 줄: 1번째 줄:
2015년 7월 27일 (월) 01:09에 마지막으로 수정됨
== 단축키&명령어 ==


==단축키&명령어==
* [[단축키&명령어]]
* [[단축키&명령어]]


==필수==
== OS 관련 ==
 
* USB 부팅 디스크 만들기
* USB 부팅 디스크 만들기
** unetbootin
** 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 만들어서 넣자<syntaxhighlight lang="bash">
.include /etc/pulse/default.pa
unload-module module-suspend-on-idle
</syntaxhighlight>


* 더 편한 패키지 설치
* 더 편한 패키지 설치
** aptitude
** 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
** uim, uim-byeoru
*** uim-pref-gtk
** <Global settings>
** 기본 ibus 비활성화
*** [x] Specify default IM
*** gsettings set org.gnome.settings-daemon.plugins.keyboard active false
*** Default input method: Byeoru
*** gsettings set com.canonical.indicator.keyboard visible false
*** Enabled input methods: "Byeoru", "Mozc"
** (내 노트북-SVE14A27CKH 한정) xmodmap -e 'keycode 108 = Hangul' 으로 해결. 이것도 시작시 자동 실행되게 하는 걸 잊지 말 것.(gnome-session-properties) xev로 키코드 확인 후 배정하면 된다.  
*** [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 이동 먹통)
** https://github.com/kim135797531/Ubuntu-Remove-Focusproblem
* 우분투 확장 기능들 (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을 설정


* 시디롬 멀티부스트로 인한 CPU 고 점유율 해결(인터럽트 문제)(SVE14A27CKH 한정)
* 시작 표시줄에서 마우스 휠로 프로그램 전환
** 원인 찾기 https://bugzilla.kernel.org/show_bug.cgi?id=53071
** dconf-editor에서
** 해결 http://askubuntu.com/questions/176565/why-does-kworker-cpu-usage-get-so-high
** org.gnome.shell.extensions.dash-to-dock scroll-action 'cycle-windows'
** 임시적인 적용은 echo disable > /sys/firmware/acpi/interrupts/gpe13
* 제목 표시줄 마우스 휠 버튼 눌렀을 때 최소화 없애기
** dcond-editor에서
** org.gnome.desktop.wm.preferences action-middle-click-titlebar 'none'


* OpenJDK -> Oracle JDK 전환
* 시작표시줄에서 마운트된 드라이브 없애기
** 이클립스 등 의존성 제거 없이 전환 가능
** dconf-editor에서
** 1. 오라클 jdk 설치
** org.gnome.shell.extensions.dash-to-dock show-mounts false
*** sudo add-apt-repository ppa:webupd8team/java
*** sudo apt-get update
*** sudo apt-get install oracle-java7-installer
** 2. 전환되었는지 확인
*** sudo update-alternatives --config java
** 3. OpenJDK 삭제
*** sudo apt-get purge openjdk*


* 와인, playonlinux로 카카오톡
* 프로그램 바로가기 만들기
** http://igxactly-kr.blogspot.kr/2014/04/ubuntu-1404-pc-wine.html 참조
** alacarte
* 자동실행 넣을 것들
** ~/.config/autostart 안에 넣자 (개별 파일로)<syntaxhighlight lang="bash">
<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>
** Synatic Package manager
[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>
** dconf Editor
[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=


* Unity Tweak Tools
<xrandr.desktop>
<syntaxhighlight lang = "bash">
[Desktop Entry]
sudo add-apt-repository ppa:tualatrix/ppa
Type=Application
sudo apt-get update
Name=kdm-triple-monitor
sudo apt-get install unity-tweak-tool
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
</syntaxhighlight>
</syntaxhighlight>


* 단위 표시 바꾸기
** ~/.pam_environment에서 <syntaxhighlight lang="bash">
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
</syntaxhighlight>LC_COLLATE는 * /etc/environment에다가 넣어줘야 될수도?
* git 로그인 유지
** ~/.gitconfig에서 <syntaxhighlight lang="bash">
[user]
email = 메일
name = Dongmin Kim
[push]
default = simple
[credential]
helper = cache --timeout 86400
[http]
[http]
proxy =
</syntaxhighlight>


* Google Keep
* conda 기본 채널 설정
** 통합 메모
** ~/.condarc에서 <syntaxhighlight lang="bash">
** 단독 실행법은 다음과 같다.
channels:
*** <syntaxhighlight lang="bash" enclose="div">
  - intel
chromium-browser --ppapi-flash-path=/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so --enable-pinch --profile-directory=Default --app-id=hmjkmjkepdijhoojdojkdfohbdgmmhki
  - defaults
channel_priority: strict
</syntaxhighlight>
</syntaxhighlight>
* ntfs 파티션 자동 마운트
** 먼저 sudo blkid 명령어로 원하는 파티션의 UUID를 알아 놓는다.
** sudo vi /etc/fstab 으로 fstab 파일을 연다.
** 맨 아래줄에 다음과 같이 입력하고 저장한다. 여기서 UUID는 위에서 확인한 걸로 한다. /media/kdm/Win8.1은 자신이 원하는 마운트 경로로 바꿔 준다.
<syntaxhighlight lang="bash">
#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


* Simplenote
#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
** https://app.simplenote.com/
* 스샷 프로그램
** shutter


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


* 웹 브라우저
** google chrome 또는 chromium
** 크로미움에서 프로필 열지 못함 에러가 날 경우, 일단 브라우저에서 계정 연결을 끊고, 터미널창에서 크로미움을 켰다가 제대로 켜지는 걸 보고 끈 다음에 다시 켜서 로그인 하면 된다.
** 그리고 자꾸 로그인 키 잠금을 물어보면, '암호 및 키'를 검색해서 '로그인' 항목의 암호를 그냥 똑같은걸로 다시 바꿔주면 된다.
** 다운로드 한 파일을 클릭하면 파일이 안 열리고 다운로드 폴더가 열린다면
*** ~/.local/share/applications/mimeapps.list 에서 x-scheme-handler/file=exo-file-manager.desktop 앞에 주석처리(맨 앞에 # 붙이면 됨)
** 크롬을 커맨드로 설치하려면
:*<syntaxhighlight lang="bash" enclose="div">
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
</syntaxhighlight>
</syntaxhighlight>
* gedit에서 저장할 때 튕기는 거 방지
** 바탕화면 아이콘을 없애면 안 튕긴다...
** https://bugs.launchpad.net/ubuntu/+source/gjs/+bug/1882410
== 부품 관련 ==
* 파티션 매니저
* 파티션 매니저
** gparted partition editor
** gparted partition editor


* 커스텀 쉘
* 시스템 상태 관련
** terminator, pac manager(무거우나 강력함)
** htop
** pac manager에서 쉘 입력 보존(방향키 같은) 하려면 rlwrap으로 감싸기 설정
** iotop
** iftop
** ioping
** lm-sensors
* GUI 디스크 남은 용량 보기
** baobab
* Ubuntu 20.04 + NVIDIA 그래픽카드 환경에서 모니터 회전 정보 저장 안 될 때
** Ubuntu 20.04.2에서 고쳐진다고는 하지만 언제 기다리나..
** NVIDIA 드라이버가 root권한을 요구할 때가 있는데 X서버는 사용자 권한으로 돌아가고 있어서 생기는 문제라고 함
** /etc/X11/Wrapper.config에 needs_root_rights = yes 추가
** https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1716857/comments/26
* Ubuntu 18.04 이후 여러 모니터 환경에서, 고주사율(144Hz 등) 모니터가 있음에도 불구하고 마우스만 144Hz로 움직이고 다른 모든 프로그램은 60Hz로 움직이는 문제 해결
** /etc/environment에 다음 추가 (DP-0은 가장 고주사율 모니터가 쓰는 포트 적기)<syntaxhighlight lang="bash">
__GL_SYNC_DISPLAY_DEVICE=DP-0
</syntaxhighlight>
 
* NVIDIA 그래픽카드 최상의 성능 뽑아내기
** /etc/modprobe.d/powermizer-kdm.conf<syntaxhighlight lang="bash">
options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1;PerfLevelSrc=0x2222;PowerMizerDefault=0x1;PowerMizerDefaultAC=0x1"
</syntaxhighlight>/etc/X11/xorg.conf 안의 Device 항목에 Coolbits 넣어주기<syntaxhighlight lang="bash">
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
</syntaxhighlight>
 
* Intel 내장 그래픽 모니터랑 NVIDIA 그래픽 모니터 동시에 사용하기
** 주로 노트북에서 많이 사용하는 PRIME을 억지로 응용해서 가능.
** 모든 디스플레이 연산은 NVIDIA 그래픽카드에서 하고, 연산 결과물 일부만 Intel 그래픽으로 보내서 실현
** 참조한 곳: http://us.download.nvidia.com/XFree86/Linux-x86/319.12/README/randr14.html<syntaxhighlight>
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


* FTP 프로그램
Version 1.4.0 of the xrandr command-line utility.
** filezilla


* AMD 하이브리드 그래픽을 사용한다면, fglrx를 사용하지 말 것.
** 공식 배포(소프트웨어 업데이트)에서 설치해도 low graphic mode로 진입하는 버그가 있다.
*** /usr/lib64 심볼릭 링크로 해결(sudo ln -s /usr/lib /usr/lib64)
*** 명령어 입력 전에 lib64 폴더가 비어 있는지 확인(날아간다)
** 멀티 모니터 사용시 화면이 깨지는 버그가 있다.
** 다음 내용을 ~/.config/autostart 폴더 안에 xrandr.desktop 이런 식의 파일로 넣어 놓으면 부팅시마다 자동 세팅
** scale이 중요한데, scale을 써야 GPU가 연산을 해서 충돌이 없어지는 듯 하다.
:<syntaxhighlight lang="bash" enclose="div">
[Desktop Entry]
Type=Application
Name=kdm-script
Exec=xrandr --output LVDS1 --auto --scale 1.0001x1.0001 --output HDMI1 --auto --scale 1.0001x1.0001 --left-of LVDS1
Icon=system-run
X-GNOME-Autostart-enabled=true
</syntaxhighlight>


* 클립보드 저장
Using the NVIDIA Driver as a RandR 1.4 Output Source Provider
** glipper
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:


* gedit 자동 백업
Section "ServerLayout"
** https://github.com/kassoulet/gedit-focus-autosave
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection


* Git diff 및 브랜치 보기
Section "Device"
** Giggle
    Identifier "nvidia"
    Driver "nvidia"
    BusID "<BusID for NVIDIA device here>"
EndSection


* 그래픽 편집기
Section "Screen"
** gimp
    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"
** 더 이상 어도비 리더는 리눅스를 지원하지 않는다. 우분투 기본 탑재된 에빈스 뷰어를 쓰던가, 아니면 캐노니컬 파트너 레포지토리 저장소에 있는 옛날 버전 어도비 리더를 설치하자. (버전 9.5.5)
    Identifier "intel"
** 설치법
    Driver "modesetting"
<syntaxhighlight lang="bash">
EndSection
sudo add-apt-repository "deb http://archive.canonical.com/ precise partner"
sudo apt-get update
sudo apt-get install acroread
</syntaxhighlight>
:* 설치가 끝나면 다시 깔끔하게 레포지토리를 지우자
<syntaxhighlight lang="bash">
sudo add-apt-repository -r "deb http://archive.canonical.com/ precise partner"
sudo apt-get update
</syntaxhighlight>


==옵션==
Section "Screen"
* IDE
    Identifier "intel"
** Eclipse, QT Creator, CLion, PyCharm
    Device "intel"
** QT Creator 에서 탭을 사용하려면, http://sourceforge.net/projects/tabbededitor/ 에서 플러그인을 받아 qtcreator의 plugins 폴더에 넣어주면 된다.
EndSection
** 우분투 자동 설치를 이용했다면 경로가 이 곳일 것 => /usr/lib/x86_64-linux-gnu/qtcreator/plugins
See “What is the format of a PCI Bus ID?” for information on determining the appropriate BusID string for your graphics card.
** PyCharm에 Black 적용 (문법 정리)
<syntaxhighlight lang="bash" enclose="div">
*** 설정에서 Tools -> File Watchers
Program: /usr/local/bin/black
Arguments: -l 88 $FilePath$
Output paths to refresh: $FilePath$
Working directory: $ProjectFileDir$


Advanced Options 에서
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:
(체크 해제) Auto-saved edited files to trigger the watcher
(체크) Trigger the watcher on external changes
</syntaxhighlight>


* 가상 머신
$ xrandr --setprovideroutputsource modesetting NVIDIA-0
** VMware player
$ xrandr --auto
** VMware player 상의 윈도우에서 한/영키가 잘 먹지 않는다면, 다음과 같이 키 매핑을 추가해준다.
This pair of commands can be added to your X session startup scripts, for example by putting them in $HOME/.xinitrc before running startx.
<syntaxhighlight lang="bash">
sudo vi /etc/vmware/config
** 커널 3.19 이상에서 모듈 설치가 안 되는 문제는, 다음을 참조 (https://wiki.archlinux.org/index.php/VMware#3.19_kernels)


xkeymap.keysym.Hangul = "0x0f2" 
Use the
xkeymap.keysym.Hangul_Hanja = "0x0f1" 
</syntaxhighlight>


* DBMS GUI viewer
$ xrandr --listproviders
** mysql-workbench, pgadmin3
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.


* 마우스, 키보드 공유
** synergy git clone 후 직접 빌드하기. 최신 버전은 더 이상 무료로 제공되지 않는다.


* 한컴오피스 뷰어
Caveats
** <del>깔고 싶지 않아!!!!!</del>
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. </syntaxhighlight>/etc/X11/xorg.conf 예시 (내가 추가한 것은 intel의 Section "Device"와 intel의 Section "Screen"과 Section "ServerLayout"의 Inactive "intel")<syntaxhighlight lang="bash">
** htop
Section "ServerLayout"
    Identifier    "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Inactive      "intel"
EndSection


* 파일 기록 삭제
Section "Files"
** activity-log-manager
EndSection


* 멈춘 프로세스 쉬운 디버깅
Section "InputDevice"
** crash-watch (https://github.com/FooBarWidget/crash-watch)
<syntaxhighlight lang="bash" enclose="div">
sudo add-apt-repository ppa:phusion.nl/misc
sudo apt-get update
sudo apt-get install crash-watch


crash-watch <PID> # 죽는 순간 정보 보여줌
    # generated from default
crash-watch --dump <PID> # 즉시 스택 트레이스 보기
    Identifier    "Mouse0"
</syntaxhighlight>
    Driver        "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/psaux"
    Option        "Emulate3Buttons" "no"
    Option        "ZAxisMapping" "4 5"
EndSection


* 화면 캠쳐
Section "InputDevice"
** gtk-recordmydesktop
** 영상 프레임, 소리 주파수 바꾸자
** 아래 pulse 소리 설정 참조


* pulse 소리 설정
    # generated from default
** pavucontrol
    Identifier    "Keyboard0"
** 위 영상 캡쳐에서 캡쳐 시작 후 recording 탭에서 소리 연결해줘야 한다
    Driver        "kbd"
EndSection


* ovg -> avi 동영상 인코딩
Section "Monitor"
** ffmpeg -i input.ovg -vcodec mpeg4 -acodec libmp3lame -ss 00:00:02 -qscale 1 output.avi
    Identifier    "Monitor0"
** -ss 시작 시간
    VendorName    "Unknown"
** -qscale 화질, 숫자가 낮으면 좋다
    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


* grub 배경 바꾸기
Section "Screen"
<syntaxhighlight lang="bash">
    Identifier    "intel"
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
    Device        "intel"
sudo apt-get update
EndSection </syntaxhighlight>
sudo apt-get install grub-customizer
* 인텔 CPU 온도 쓰로틀링 막기
** https://askubuntu.com/questions/971142/cannot-disable-cpu-throttling-on-ubuntu-16-04-lts
** sudo apt-get remove thermald
** lsmod | grep -i intel으로 전원과 온도관리 관련한 모듈 살펴보기 (rapl 등)
** /etc/modprobe.d/blacklist-throttling-kdm.conf 생성
** <syntaxhighlight lang="bash">
blacklist intel_powerclamp
blacklist intel_rapl
blacklist intel_rapl_perf
blacklist intel_rapl_msr
blacklist intel_rapl_common
</syntaxhighlight>
</syntaxhighlight>
** sudo update-initramfs -u -k all
* 인텔 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


{| class="wikitable"
|+
!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월 기준 수냉쿨러 설정)<syntaxhighlight lang="bash">
** 편한 방법
# Configuration file generated by pwmconfig, changes will be lost
<syntaxhighlight lang="bash">
# 수냉펌프인 hwmon2/pwm2는 항상 최고속도로 돌아가도록 설정
sudo apt-get install gstreamer-tools
INTERVAL=5
gst-launch pulsesrc ! pulsesink
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
</syntaxhighlight>
</syntaxhighlight>
:* 위의 방법이 안되면 다음 방법도 써 본다.
* 최대 절전 모드 설정
<syntaxhighlight lang="bash">
** sudo apt-get install pm-utils
# 이 명령어로 하드웨어 이름을 알아낸다.
** cat /etc/fstab | grep -i swap 해서 UUID 알아내기
pactl list > list.txt
** sudo vi /etc/default/grub
# 이 명령어로 출력을 시작한다. --latency-msec 은 짧으면 좋지만 잡음이 생길 있으므로 적당한 값으로 한다.
** GRUB_CMDLINE_LINUX_DEFAULT="resume=UUID=a26edce1-f9c2-42ff-a2f2-0e0f52eb3ee9"
pacat -r --device=alsa_input.pci-0000_00_1b.0.analog-stereo | pacat -p --latency-msec=50
** sudo update-grub
</syntaxhighlight>
** 실행하기
:* 이런 방법도 있다.
*** sudo pm-hibernate
<syntaxhighlight lang="bash">
* 시스템 전력 사용량 조회
sudo apt-get install pavucontrol
** powertop
pactl load-module module-loopback latency_msec=1
* 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
** 구글 킵이 히스토리 저장이 안 되서 빡침..
** 무료!
** https://app.simplenote.com/
* 스샷 프로그램
** 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 자동 백업
** https://github.com/kassoulet/gedit-focus-autosave
 
* Git diff 및 브랜치 보기
** Giggle
 
* 그래픽 편집기
** gimp
** pinta
* HEX 비교
** hexdiff
* 원격제어
** teamviewer
** chrome remote desktop
*** 우분투에서 쓰고 있는 화면 안 나오면 이거대로 하기
*** https://superuser.com/questions/778028/configuring-chrome-remote-desktop-with-ubuntu-gnome-14-04/850359#comment1966661_850359
* 가상머신
** virtualbox
** VMware player
*** VMware player 상의 윈도우에서 한/영키가 잘 먹지 않는다면, 다음과 같이 키 매핑을 추가해준다.<syntaxhighlight lang="bash">
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" 
</syntaxhighlight>
</syntaxhighlight>


 
* wine
* synergy 스크립트로 실행
** winetricks
:* 서버(키보드와 마우스가 있는 컴퓨터), conf 파일은 GUI를 통해 만들어 두어야 한다.
** 꿀뷰, 반디집
<syntaxhighlight lang="bash">
* 키보드 마우스 공유
** synergy
** 스크립트로 실행하기
*** 서버(키보드와 마우스가 있는 컴퓨터), conf 파일은 GUI를 통해 만들어 두어야 한다. <syntaxhighlight lang="bash">
#!/bin/sh
#!/bin/sh
CMD=`./synergys -f --debug NOTE --name kdm-pc -c ./synergys.conf --address :24800 &`
CMD=`./synergys -f --debug NOTE --name kdm-pc -c ./synergys.conf --address :24800 &`
</syntaxhighlight>
</syntaxhighlight>
:* 서버 설정파일 -> 양 방향을 지정하고 단축키 지정으로 Ctrl+` 로 작업 기기 전환 구현 (출처: https://davejamesmiller.com/blog/synergy-hotkey-to-toggle-screens)
*** 서버 설정파일 -> 양 방향을 지정하고 단축키 지정으로 Ctrl+` 로 작업 기기 전환 구현 (출처: https://davejamesmiller.com/blog/synergy-hotkey-to-toggle-screens) <syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
section: screens
section: screens
kdm-server:
kdm-server:
281번째 줄: 628번째 줄:
end
end
</syntaxhighlight>
</syntaxhighlight>
:* 클라이언트
*** 클라이언트<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
#!/bin/sh
#!/bin/sh
CMD=`./synergyc -f --debug NOTE --name kdm-server --display ":0" alkga.iptime.org:24800 &`
CMD=`./synergyc -f --debug NOTE --name kdm-server --display ":0" alkga.iptime.org:24800 &`
</syntaxhighlight>
</syntaxhighlight>
:* 클라이언트 원격 실행(의존성: expect가 설치되어 있어야 한다)
*** 클라이언트 원격 실행(의존성: expect가 설치되어 있어야 한다)<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
#!/usr/bin/expect -f
#!/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 &`
spawn ssh -p 8022 [계정]@alkga.iptime.org `/home/kdm/kdm-synergy/synergyc -f --debug DEBUG --name kdm-server --display ":0" alkga.iptime.org:24800 &`
293번째 줄: 638번째 줄:
send "[비밀번호]\r"
send "[비밀번호]\r"
interact
interact
</syntaxhighlight>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 적용 (문법 정리) <syntaxhighlight lang="bash" enclose="div">
*** 설정에서 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
</syntaxhighlight>
</syntaxhighlight>
* alacarte 으로 우분투 아이콘 바로가기를 만들자.
* 기타 개발 관련
** 실행도 쉽고 터미널 아이콘하고 분리도 되서 좋다.
** vscode, matlab, maya
** /home/kdm/kdm-synergy/synergys -f --debug NOTE --name kdm-pc -c /home/kdm/kdm-synergy/synergys.conf --address :24800 추가, 터미널 사용은 체크 해제.
* vim 커스터마이징
** https://github.com/gmarik/Vundle.vim
* DBMS GUI viewer
** mysql-workbench, pgadmin3
* 한컴오피스 뷰어
** <del>깔고 싶지 않아!!!!!</del>
* 오피스
** 기본 libreoffice
** onlyoffice
* 파일 기록 삭제
** activity-log-manager
*멈춘 프로세스 쉬운 디버깅
** crash-watch (https://github.com/FooBarWidget/crash-watch)<syntaxhighlight lang="bash" enclose="div">
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> # 즉시 스택 트레이스 보기
</syntaxhighlight>
*일괄 이름 바꾸기
**Thunar (Xfce 기본 파일 매니저)
== 유용한 명령어 ==
* 마이크 입력을 그대로 출력
** 편한 방법 <syntaxhighlight lang="bash">
sudo apt-get install gstreamer-tools
gst-launch pulsesrc ! pulsesink
</syntaxhighlight>
** 위의 방법이 안되면 다음 방법도 써 본다. <syntaxhighlight lang="bash">
# 이 명령어로 하드웨어 이름을 알아낸다.
pactl list > list.txt
# 이 명령어로 출력을 시작한다. --latency-msec 은 짧으면 좋지만 잡음이 생길 수 있으므로 적당한 값으로 한다.
pacat -r --device=alsa_input.pci-0000_00_1b.0.analog-stereo | pacat -p --latency-msec=50
</syntaxhighlight>
** 이런 방법도 있다. <syntaxhighlight lang="bash">
sudo apt-get install pavucontrol
pactl load-module module-loopback latency_msec=1
</syntaxhighlight>


* 시작시 창 최소화
* 시작시 창 최소화
313번째 줄: 719번째 줄:
</syntaxhighlight>
</syntaxhighlight>


== 문제 해결 ==
* libc등등을 대충 dpkg로 넣어서 의존성 문제 생겨버렸을 때
** 즉 아래와 같은 문제가 생겼을 때. 그리고 sudo apt install -f 도 먹지 않을 때.<syntaxhighlight lang="bash">
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


* ntfs 파티션 자동 마운트
# 먼저 sudo blkid 명령어로 원하는 파티션의 UUID를 알아 놓는다.
# sudo vi /etc/fstab 으로 fstab 파일을 연다.
# 맨 아래줄에 다음과 같이 입력하고 저장한다. 여기서 UUID는 위에서 확인한 걸로 한다. /media/kdm/Win8.1은 자신이 원하는 마운트 경로로 바꿔 준다.
<syntaxhighlight lang="bash">
#umask=000 해서 권한 777으로 만든다
UUID=B846EC2A46EBE6DA /media/kdm/ExtLarge ntfs-3g defaults,user,locale=ko_KR.UTF-8,umask=000 0 0
</syntaxhighlight>
</syntaxhighlight>
 
** 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 한다.
** apt-get remove test
** 다시 sudo apt install -f 해서 고치기 완료
*** 설정파일은 삭제 안 함
** apt-get purge test
*** 설정파일까지 삭제
 
 
* vim 커스터마이징
** https://github.com/gmarik/Vundle.vim
 
 
* 그래픽 프로세서 사용량 보기
** radeontop
 
 
 
===우분투용 커널 수동 설치===
* 다운로드
** [http://kernel.ubuntu.com/~kernel-ppa/mainline 공식 배포처]
** wget [커널 공용 헤더] (linux-headers-버전-...-all.deb]
** wget [커널 아키텍쳐 전용 헤더] (linux-headers-버전-generic-...-amd64.deb]
** wget [커널 아키텍쳐 전용 이미지] (linux-image-버전-image-...-amd64.deb]
* 설치
** sudo dpkg -i linux-headers*.deb linux-image*.deb
* 설정 후 재부팅
** sudo update-grub
** sudo reboot
 
 
===USB2VGA 설정===
* '''절대 안됨''' 다시는 시도하지 말자. 시간만 날렸다.
* USB 일련번호 0711:5100 인 싸구려 USB 그래픽카드인데.. 윈도우에서는 되는데 우분투에서는 절대 안됨
* 우분투 버전 14.04에서 리눅스 커널 4.0으로 업뎃했는데도 안됨
* lsusb 하면 그제서야 뭔가 하려는 듯 하다가 멈춰버림.
* 커널에 drivers/usb/misc/sisusbvga/sisusb.c 안에다가 0711:5100 써도 안 됨
* ko 파일을 만들어서 insmod해도 안 되고 그냥 안됨
* 무슨 짓을 해도 안됨!!! 짜증

2023년 11월 28일 (화) 10:41 기준 최신판

단축키&명령어

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 해서 고치기 완료