2015년 9월 1일 화요일

tigervnc 로 vino 접속시 "No matching security types" 에러

debain 계열서버에서 vino 설치시 암호화가 기본으로 설정되는 것으로 보인다.
xubuntu 15.04 에 vino 를 설치하고 tigervnc 로 접속하면 "No matching security types" 에러발생.
그럴땐..
gsettings set org.gnome.Vino require-encryption false
http://www.serveridol.com/2014/09/11/vnc-viewer-error-no-matching-security-types/

2015년 8월 30일 일요일

탭을 공백으로 바꾸기 - II

sed 를 사용했던 것은 아래 참조.
http://marunguy.blogspot.kr/2010/11/sed-%EB%A1%9C-%ED%83%AD%EC%9D%84-%EA%B3%B5%EB%B0%B1%EC%9C%BC%EB%A1%9C-%EB%B0%94%EA%BE%B8%EA%B8%B0.html

expand 를 이용하는 방법.
http://linux.die.net/man/1/expand
http://stackoverflow.com/questions/11094383/how-can-i-convert-tabs-to-spaces-in-every-file-of-a-directory

모든 탭을 공백으로 변환.
expand -t 4 tab.txt > space.txt
줄의 앞부분 탭만 공백으로 변환.
expand -i -t 4 tab.txt > space.txt

2015년 8월 24일 월요일

Git cannot create a file or directory with a long path


tortoisegit + msysgit 사용시 파일경로가 너무 길 경우(260자이상) 에러가 발생.
구글링해보면 윈도API 문제라고..
https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path
시작프로그램->git->git bash 를 실행하고 다음 입력.
git config core.longpaths true
git config --global core.longpaths true

이렇게해도 tortoisegit 에는 영향을 안 미치는 듯..
"tortoisegit context menu->설정->Git->시스템.gitconfig 편집하기" 클릭.
"core" 섹션에 "longpaths = true" 추가.
[core]
    symlinks = false
    autocrlf = false
    longpaths = true

....

2015년 8월 21일 금요일

VirtualBox and Hyper-V

Hyper-V가 설치되어서 ON된 상태에서는 VT-x 나 SVM 를 CPU 가 지원하지않는 것 처럼 보이게 된다.
그러면 VirtualBox에서 64비트OS 를 설치할 수 없다.
Hyper-V 를 삭제하거나 아래처럼 Hyper-V 를 끄고 리부팅~~ 
bcdedit /set hypervisorlaunchtype off
켜고 싶으면
bcdedit /set hypervisorlaunchtype auto 
 https://derekgusoff.wordpress.com/2012/09/05/run-hyper-v-and-virtualbox-on-the-same-machine/

 

2015년 2월 12일 목요일

ssl 사설인증서 생성 in 윈도.

http://slproweb.com/products/Win32OpenSSL.html 에서 openssl 설치
http://itigloo.com/security/generate-an-openssl-certificate-request-with-sha-256-signature/
http://help.globalscape.com/help/secureserver3/Generating_a_PKCS_12_private_key_public_certificate.htm
https://www.sslshopper.com/article-most-common-openssl-commands.html
set PATH=c:\OpenSSL-Win64\bin;%PATH%
set OPENSSL_CONF=c:\OpenSSL-Win64\bin\openssl.cfg
openssl genrsa -out my.key 2048
openssl req -out my.cer -key my.pem -new -x509 -sha1 -days 3650 # sha1
openssl req -out my.cer -key my.pem -new -x509 -sha256 -days 3650 # sha256
or
openssl req -x509 -sha256 -nodes -days 3650 -newkey rsa:2048 -keyout my.key -out my.cer
pfx 파일 만들기.
openssl pkcs12 -export -in my.cer -inkey my.key -out my.pfx -name "mypfx"
* 기타: key,csr -> cer -> pfx
openssl req -sha256 -nodes -days 3650 -newkey rsa:2048 -keyout my.key -out my.csr
openssl x509 -sha256 -req -days 3650 -in my.csr -signkey my.key -out my.cer
openssl pkcs12 -export -in my.cer -inkey my.key -out my.pfx -name "mypfx"

2015년 1월 13일 화요일

윈도 SSL인증서 설치방법~~

http://www.codeproject.com/Messages/1048467/WinHTTP-error-12175-howto.aspx


bool InstallCertificationAuthority()
{
HCERTSTORE hSystemStore;
hSystemStore = CertOpenSystemStore(NULL, _T("ROOT"));
if (hSystemStore == NULL)
return false;
 
// Find the certificate resource
HRSRC hRSRC;
hRSRC = FindResource(AfxGetResourceHandle()MAKEINTRESOURCE(IDR_CERTIFICATE), _T("CERTIFICATE"));
if (hRSRC == NULL)
return false;
 
// Obtain the size of the Certificate resource
DWORD dwSize;
dwSize = SizeofResource(AfxGetResourceHandle(), hRSRC);
if (dwSize == 0)
return false;
 
// Load the resource into a global memory handler
HGLOBAL hCertificate;
hCertificate = LoadResource(AfxGetResourceHandle(), hRSRC);
if (hCertificate == NULL)
return false;
 
// Lock the resource
LPBYTE lpCertificate;
lpCertificate = (LPBYTE) LockResource(hCertificate);
if (lpCertificate == NULL) {
FreeResource(hCertificate);
return false;
}
 
if (!CertAddEncodedCertificateToStore(hSystemStore, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, lpCertificate, dwSize, CERT_STORE_ADD_USE_EXISTING, NULL)) {
logRPCCore.Output("Cannot install certificate!\n");
}
 
UnlockResource(hCertificate);
FreeResource(hCertificate);
 
CertCloseStore(hSystemStore, 0);
return true;
}

2014년 9월 30일 화요일

윈도8.1 에서 vc6.0 설치

아래링크를 참조함.
http://stackoverflow.com/questions/19450536/visual-studio-6-c-crash-in-windows-8-1

1. VC 6.0 설치파일 실행
2. "사용자정의"(?) 설치선택후 "Data Access" 를 설치않도록 변경.
- "Data Access" 선택하지 않아야 vc 정상설치됨.
3. VC 6.0 SP6 설치
4. "C:\Program Files (x86)\Microsoft Visual Studio\Common\MSDev98\Bin" 폴더로 이동
5. "MSDEV.exe" 를 "MSDEV-S.exe" 로 복사.
- 관리자 권한이 있어야 가능.
- "MSDEV-S.exe" 아닌 다른 이름도 상관없음.
6. "MSDEV-S.exe" 에서 마우스오른쪽버튼클릭 -> 속성 -> 호환성 -> 모든 사용자에 대한 설정 변경 메뉴 이동.
7. "높은 DPI 설정에서 디스플레이 배율을 사용하지 않음" 선택.
- 위 링크에서는 선택하라고 되었있지만 선택안해도  정상동작하는 듯.
8. "호환 모드"-> "Windows 7" 선택
- 위 링크에서는 언급이 없지만 설정하지 않으면 MSDEV-S.exe 시작시 충돌발생.
9.  확인 버튼 클릭.
10. "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual C++ 6.0" 폴더로 이동.
11. Microsoft Visual C++ 6.0.lnk 의 속성->바로가기->대상을 MSDEV-S.exe 로 변경.