gnome troubleshooting

gdm 사용시 발생하는 여러 문제들과 해결 방법 정리

activities hot corner 설정

배포판

  • fedora:31
  • ubuntu:18.04

문제 설명

  • gnome 데스크탑에서 마우스가 좌 상단 디스플레이에 닿으면 activities 개요 보기로 화면이 전환됨

발생 원인

  • gnome-session 처음 사용 시 기본적으로 hot corner를 사용하게 되어 있음

해결 방법

  1. 패키지 관리자로 gnome-tweaks 설치
  2. gnome-tweaks(기능 개선) 실행 후 최상위 표시줄 탭에서 활동 개요 핫 코너 비활성화

참고 자료

Read more

linux installation checklist

리눅스를 설치할 때 항상 반복하는 작업들

root user 비밀번호 설정

$ sudo passwd

패키지 관리자 저장소를 지역 미러로 설정

fedora

  • fastest mirror 플러그인 활성화
$ echo "fastestmirror=True" | sudo tee -a /etc/dnf/dnf.conf && sudo dnf makecache --refresh

centos

  • /etc/yum.repos.d/에 아래의 기존 repo들은 압축 후, 카카오 미러용 repo파일 추가
[base]
name=CentOS-$releasever - Base
baseurl=http://ftp.daumkakao.com/centos/$releasever/os/$basearch/
gpgcheck=0
[updates]
name=CentOS-$releasever - Updates
baseurl=http://ftp.daumkakao.com/centos/$releasever/updates/$basearch/
gpgcheck=0
[extras]
name=CentOS-$releasever - Extras
baseurl=http://ftp.daumkakao.com/centos/$releasever/extras/$basearch/
gpgcheck=0

ubuntu

  • 카카오 미러 사용
$ sudo sed -i 's/archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list

소프트웨어 설치

공통

  • sshd
  • git
  • vim
  • wget
  • curl
  • htop
  • tmux

배포마다 다름

centos

  • epel-release
  • ‘Development Tools’ sudo yum -y groupinstall 'Development Tools'

fedora

  • ‘Development Tools’ sudo dnf -y groupinstall 'Development Tools'
  • gcc-c++ (for g++)

ubuntu

  • ‘build-essential’

gui 환경

자주 쓰는 소프트웨어

  • docker
  • docker-compose
  • chrome
    $ sudo dnf install -y fedora-workstation-repositories
    $ sudo dnf config-manager --set-enabled google-chrome
    $ sudo dnf install -y google-chrome-stable
    
  • miniconda3
  • xrdp
  • snapd
  • cmake
  • ctags (exuberant-ctags)
  • python3
  • python3-pip
  • nano

selinux 끄기

  • /etc/selinux/config 파일을 열고 SELINUX=disabled 로 수정
  • reboot

방화벽 zone 설정

  • (gui 툴 사용이 가능한 경우) firewall-config 설치하여 사용
  • 집에서 쓰는경우 home

ssh 설정

  • .ssh 디렉터리 만들기. 권한 700
  • 키 생성
    • 다른 기기에 접속하기 위한 기본 키, git ssh 용 키
$ ssh-keygen -t rsa -b 2048 -C "Default ${HOSTNAME}'s ${USER} key" -f "${HOME}/.ssh/id_rsa"
$ ssh-keygen -t rsa -b 2048 -C "${HOSTNAME} ${USER}'s git key" -f "${HOME}/.ssh/${HOSTNAME}_git_key"
  • config 파일 생성. 권한 400
Host yourhostname
    Hostname 192.168.0.1
    IdentityFile ~/.ssh/id_rsa
    User remote_user
    Port 22

Host github.com
    hostname github.com
    user git
    identityfile ~/.ssh/${HOSTNAME}_git_key

Host gitlab.com
    hostname gitlab.com
    user git
    identityfile ~/.ssh/${HOSTNAME}_git_key

Host bitbucket.org
    hostname bitbucket.org
    user git
    identityfile ~/.ssh/${HOSTNAME}_git_key

Host gitlab.diyaml.com
    hostname gitlab.diyaml.com
    user git
    identityfile ~/.ssh/${HOSTNAME}_git_key

Host yoursecondhostname
    Hostname 192.168.0.2
    IdentityFile ~/.ssh/id_rsa
    User remote_user
    Port 22
    IdentitiesOnly yes
    PreferredAuthentications publickey
    LocalForward 8080 127.0.0.1:8080
$ chmod u+w "${HOME}/.ssh/config" && vim "${HOME}/.ssh/config" && chmod u-w "${HOME}/.ssh/config"
  • 공개 키를 접속을 원하는 호스트에 등록

Read more

xrdp troubleshooting

xrdp 서버를 구성했을 때 발생하는 문제들과 해결 방법 정리

gnome-session으로 접속 시 번거로운 인증 창 띄우는 문제

배포판

  • fedora:31

문제 설명

  • xrdp에 gnome-session으로 접속 시 “시스템 저장소를 새로 고치려면 인증해야 합니다” 혹은 “색상 관리 장치를 만들려면 인증이 필요합니다” 등의 메시지를 띄움

발생 원인

  • polkit 정책

해결 방법

  1. /usr/share/polkit-1/actions 디렉터리에서 인증 메시지를 띄우는 정책을 찾는다
  • 아래 코드를 응용
  • 인증 메시지를 띄우는 action의 id를 기록
  1. /etc/polkit-1/localauthority/50-local.d 디렉터리에 적당한 이름의 pkla 파일을 만들어 위에서 기록한 action id들을 추가. 파일 형식은 아래 샘플 참고
  • sample
  1. polkit 서비스 재시작
sudo systemctl restart polkit

참고 자료

Read more