Unix

아치리눅스 + OpenBox + 크롬, 파일 연결문제 해결

ForceCore 2011. 3. 16. 21:12
크롬에서 다운 받은 파일을 크롬에서 "열기"버튼을 누르면 무조건 파이어폭스가 열리는 환장할 버그(?) 때문에 좀 불편하다. 버그는 아니다. 설정미스지.

크롬은 xdg-open 으로 파일을 열려고 시도하는데 이게 잘못되어 있는 것이다. 

https://bbs.archlinux.org/viewtopic.php?pid=783813
같은  증상을 겪는 사람이 이미 있다.

mimeopen 이란 명령어가 듣게 하면 된다는군. 

You can set the default applications (used by e.g. xdg-open) by installing the package perl-file-mimeinfo from the repositories, and invoke the mimeopen command like this:
mimeopen -d /path/to/file
You will then be asked what application to use when opening /path/to/file:
Please choose a default application for files of type text/plain

        1) notepad  (wine-extension-txt)
        2) Leafpad  (leafpad)
        3) OpenOffice.org Writer  (writer)
        4) gVim  (gvim)
        5) Other...
Your answer will be set as the default handler for that type of file. Works like a charm 
If you really want to, you can also modify ~/.local/share/applications/defaults.list manually; the format is quite simple:
image/png=image-viewer.desktop
video/x-matroska=video-player.desktop
(...)
Last edited by Peanut (2010-06-24 10:57:42)

ㅋㅋ
근데 mimeopen이 실행명령어가 안 먹네?
/usr/bin/vendor_perl/mimeopen
이걸 PATH 등록해야 한다.