Mac OS
목차
Preview에서 ‘권한이 없습니다’ 에러
OSX Preview에서 jpg나 pdf파일을 보려고 더블클릭하면 볼 권한이 없다는 에러가 자꾸 나왔다.
터미널에서 ls -al@
[1]해보면, com.apple.quarantine이 붙어있는데[2], 그게 중요한건 아닌것 같고, Preview문제인것 같다.
대강의 결론은 Preview앱이 캐쉬관리에 실패해서 뭔가 권한문제가 꼬이는것 같은데, 해결책으로 그 캐쉬를 다 지우는 방법이 있는가보다. 실제로 해봤을때 난 잘 안되어서 애꿎은 권한만 가지고 이리 바꿔보고 저리 바꿔보고 다른 곳으로 복사도 해보고 삽질을 많이 했다. 복사해도 모든 권한이 다 같이 가서 별 소용이 없었다. 결국 파일 이름을 변경하니 정상적으로 열림. 파일 이름때문인지, 그 전에 했던 삽질중에 어떤것 때문인지, 이것들 모두 때문인지 아직도 정확히는 모른다. 결론적으로 내가 추천하는 방법은 다음과 같다.
- Preview앱 종료
- Library에서 Cache를 다 지운다.[3]
- 문제되는 파일 이름 변경
- 다시 Preview 실행
[1] extened attributes. Dealing With Extended Attributes on OS X
[2] xattr -d com.apple.quarantine *file*
로 지운다. [1]
[3] Hold down the option key and select Go ▹ Library from the Finder menu bar. [2]
기본 글꼴 바꾸기
직접 해보려고 했으나 다른 글씨체로는 모두 실패해서 이사람이 올려둔 글쎄체 그냥 쓰고 있음.
2011년 4월 30일 (토) 13:33 (KST) 백묵굴림으로 바꾸기 성공
이거 하려고 vmware에 CentOS설치. fontforge설치 후 폰트 이름들과 copyright등 설정 맨 앞페이지에 있는 것들만 바꿈. 위에 글에는 몇가지 탭을 더 따라서 바꿔보라고 써있는데 그냥 안했음.
이렇게 하고 fontforge menu에서 generate font하면 무슨 에러난다고 나옴. id가 겹친다는 에러는 다시 설정 페이지에 PID였던가 하는 그거를 AppleGothic폰트로부터 copy & paste. 활성화도 안되어있는데 괜히 체크하는것 같음. 일단 하긴 했으나 안해도 될듯.
글꼴은 산돌고딕으로 시도해보다 맑은고딕 이미 올라와있는것을 적용해보니 산돌고딕도 별수 없겠다 싶어 리눅스의 백묵폰트 가져옴. 그거 가져와서 폰트 내부정보 바꾸고 ftxdumperfuser도 안하고 그냥 정보만 바꾼채로 /Library/Fonts로 옮김. 백묵글꼴은 볼드체가 없어서 볼드는 나눔고딕 넣음. 맑은고딕보다 나눔고딕이 백묵굴림에 더 어울리는것 같아서. 그러고 나면 잘 됨.
가끔 웹서핑하다 백묵굴림이 나와야 할 자리 같은데 명조체가 나올 때가 있는데 왜그런지 모르겠음. 여튼 산돌고딕쓰면 중간중간 빠지는 글자도 많고 그랬는데 백묵굴림으로 OK
써놓고나니 참, 누가 이거 읽어도 따라서 할수나 있겠나 싶음. 나중에 내가 봐도 이게 뭐지 할듯.
터미널관련
터미널에서 파일명이 한글일때 auto completion안되는 문제
bash 최신버전 설치하면 됨. 소스받아 별다른 설정없이 컴파일 가능.
한글입력 안될때
~/.inputrc에 다음 추가
set input-meta on set output-meta on set convert-meta off
http://stackoverflow.com/a/5262053/766330
Changing default shell
- Install bash
- Download bash source file. [3]
- Run
./configure
make tests sudo make install #defatul prefix is /usr/local/
- add following line to /etc/shells file
/usr/local/bin/bash
- chsh
chsh -s /usr/local/bin/bash
[4]
FYI: Apple will not update Bash, because the latest version is licensed under GPLv3, which Apple cannot use. They have updated most of their other shells though. ZSH for example is mostly up to date. – William T Froggard Jun 28 '15 at 22:55 [5]
How to run ssh service
Find setting in ‘System Preferences’ [6]
route add
route add -host 54.81.143.201 -interface en0
Get default gateway
route get default | grep gateway
http://osxdaily.com/2011/09/15/find-default-gateway-ip-address-mac-os-x/
Creating a bootable USB stick
1. Convert the ISO to UDRW format
hdiutil convert -format UDRW -o destination_file.img source_file.iso
2. Prepare the USB stick
diskutil list diskutil partitionDisk /dev/disk2 1 "Free Space" "unused" "100%”
3. Copy the image to the USB stick
dd if=destination_file.img.dmg of=/dev/disk2 bs=1m
4. Done
diskutil eject /dev/disk2
https://blog.tinned-software.net/create-bootable-usb-stick-from-iso-in-mac-os-x/
reboot with windows (bootcamp)
find startup disk at spotlight search
Xcode에서 array 보기
p *(int(*)[10])ptr
봐도 또 까먹을듯
[8]