C & C++, 일반

[Tools and Tips] Linux 설정

그레이트쪼 2017. 2. 11. 21:15

폰트 설치

  • ttf 파일 복사
    • 윈도우용 ttf 파일을 다운로드 받는다.

> sudo nautilus (root권한의 노틸러스 실행)

    • 노틸러스에서 /usr/share/fonts/trutype 로 이동하여 폴더를 생성한다. Ex) ttf-nanum
    • 다운로드 받은 ttf 파일들을 새로 생성한 폴더 밑에 복사한다.
  • 폰트 캐시 갱신

> sudo -s

(passwd 입력)

> fc-cache -f -v

  • 안티앨리어싱 설정 (우분투에서 안티앨리어싱이 꺼져있어서 글자가 깨져보임)

> sudo gedit /etc/fonts/conf.d/29-language-selector-ko-kr.conf (아래부분 주석처리)


<!-- Turn off antialias and autohint for Korean fonts depending on pixelsize -->

<!-- <match target="font">

        <test name="lang" compare="contains">

                <string>ko</string>

        </test>

        <test name="pixelsize" compare="more">

        <int>10</int>

    </test>

        <test name="pixelsize" compare="less">

        <int>22</int>

    </test>

        <edit name="antialias" mode="assign">

        <bool>false</bool>

    </edit>

        <edit name="autohint" mode="assign">

        <bool>false</bool>

    </edit>

        <edit name="hintstyle" mode="assign">

        <const>hintmedium</const>

    </edit>

</match> -->
 …

<!-- Turn off antialias and autohint for ttf-alee depending on pixelsize -->

<!-- <match target="font">

        <test name="family">

                <string>Guseul</string>

        </test>

        <edit name="autohint" mode="assign">

        <bool>true</bool>

    </edit>

</match>

<match target="font">

        <test name="family">

                <string>Guseul</string>

                <string>Guseul Mono</string>

        </test>

    <test name="pixelsize" compare="more">

        <int>11</int>

    </test>

    <test name="pixelsize" compare="less">

        <int>16</int>

    </test>

    <edit name="antialias" mode="assign">

        <bool>false</bool>

    </edit>

        <edit name="autohint" mode="assign">

        <bool>false</bool>

    </edit>

</match> -->



데스크탑 메뉴에 프로그램 추가

  • 우분투 데스크탑 메뉴에 프로그램을 추가하면 Alt + F2를 이용하여 실행하는 것이 가능하다. 개발 환경에 자주 사용하는 프로그램을 메뉴에 등록하고 Alt + F2를 이용하면 애플리케이션을 실행하는데 유용하게 사용할 수 있다.
  • 먼저 /usr/share/applications 디렉토리 아래에 추가할 프로그램을 관리하기 위한 파일을 만든다. 확장자는 .desktop으로 한다.

 > sudo vi /usr/share/applications/eclipse.desktop


<eclipse.desktop>

[Desktop Entry]

Encoding=UTF-8

Name=Eclipse

GenericName=Eclipse

Comment=Eclipse IDE with Android Developer

Exec=/home/greatzzo/eclipse/eclipse

Icon=/home/greatzzo/eclipse/icon.xpm

StartupNotify=true

Terminal=false

Type=Application

Categories=Development;

    • 아이콘은 온라인상에 좋은 아이콘을 가져다가 써도 좋다


alias 설정

  • 사용법 
    • alias [단축명령어]='[리눅스 명령어]'
    • sudo apt-get install 명령어를 단축명령어 sins으로만 등록한다면

> alias sins='sudo apt-get install' 

  • 전체사용자 명령어 등록

> sudo vi /etc/profile.d/alias.sh 

alias sins='sudo apt-get install'

  • 개인 계정에 명령어 등록

> gedit ~/.bashrc 

# some more ls aliases 

alias sins='sudo apt-get install'

 

> source ~/.bashrc

  • 터미널에서 alias를 입력하면 등록된 단축명령어를 간단히 볼수있다.

> alias

alias down='cd /media/data/Down'

alias egrep='egrep --color=auto'

alias fgrep='fgrep --color=auto'

alias grep='grep --color=auto'

alias ls='ls --color=auto'

alias sdel='sudo apt-get autoremove'

alias sins='sudo apt-get install'

  • 참고로 /usr/local/bin 밑에 명령어를 복사하는 방법도 있다.