IT/라즈베리파이2

X 윈도우에서의 단축키

단디1969 2015. 6. 20. 15:14

X윈도우 Logout하기가 번거로워 Cont'l+q 정도의 단축키로 지정하려고 한다.


                  * 참고 :  http://unix.stackexchange.com/questions/170029/command-to-log-out-of-lxde-directly


단축키는 ~/.config/openbox/lxde-pi-rc.xml에 기록되어 있는것 같다.

1. 열어보자

$ nano /home/pi/.config/openbox/lxde-pi-rc.xml


  -

  -

  -

<keyboard>

    <chainQuitKey>C-g</chainQuitKey>

    <!-- Keybindings for desktop switching -->    

    <keybind key="C-A-Left">

      <action name="DesktopLeft">

        <dialog>no</dialog>

        <wrap>no</wrap>

      </action>

    </keybind>

    <keybind key="C-A-Right">

      <action name="DesktopRight">

        <dialog>no</dialog>

        <wrap>no</wrap>

      </action>

    </keybind>

    <keybind key="C-A-Up">

      <action name="DesktopUp">

        <dialog>no</dialog>

        <wrap>no</wrap>

      </action>

    </keybind>

     -

     -

     -


2. <!-- Keybindings for desktop switching -->이라는 부분부터 단축키 지정부분이다.

- C : Control, A : Alt, W : Window Key, S : Shift, Up : 화살표위, Down : 하살표아래......, 소문자 영어 : 말그대로 소문자 영어

- 아래와 같이 추가해 주면 단축키 완성

- 어떠한 부작용이 있을 지 모른다. 일단 편하다.

  -

  -

  -

<keyboard>

    <chainQuitKey>C-g</chainQuitKey>

    <!-- Keybindings for desktop switching -->

    <keybind key="C-q">

      <action name="Execute">

        <command>pkill -9 -f lxsession</command>

      </action>

    </keybind>

    <keybind key="C-A-Left">

      <action name="DesktopLeft">

        <dialog>no</dialog>

        <wrap>no</wrap>

      </action>

    </keybind>   

     -

     -

     -