[Ubuntu] Adobe AIR 설치

http://askubuntu.com/questions/87447/how-can-i-install-adobe-air 에 나와 있다.
옮겨 적자면…

Alternately, you can install a prebuilt .deb

There is air 2.6 (last supported Linux one) available here for both architectures (Both use 32 bit underneath but at least it works). Thanks to prusswan for pointing it out.

Make sure you have 32 bit libs it’ll need:

sudo apt-get install ia32-libs

I downloaded the AMD64 one (adobeair_2.6.0.19170_amd64.deb) and installed on my computer (am64 with Precise Pangolin 12.04)

sudo dpkg -i adobeair_2.6.0.19170_amd64.deb

Then I installed the application that needed Adobe Air in the first place and it worked.

Update for Ubuntu 13:10+,

Trying this technique, i get “Package ia32-libs-gtk is not installed”

I looked up the package and tried installing those dependencies and other related packages I can think of directly:

sudo apt-get install gtk2-engines:i386 libart-2.0-2:i386 libcairo2:i386 libcanberra-gtk0:i386 libdatrie1:i386 libgail-common:i386 libgconf2-4:i386 libgtk2.0-0:i386 liblua5.1-0:i386 libpango1.0-0:i386 libpixman-1-0:i386 libqt4-network:i386 libqt4-test:i386 libqtcore4:i386 libthai0:i386 libbonobo2-0:i386 libglade2-0:i386 libgnomecanvas2-0:i386 libidl0:i386 liborbit2:i386 libwmf0.2-7:i386 gtk2-engines-murrine:i386

But that didn’t work for either the deb or original binary.

 

update-alternatives

프로그램이 버전업 되거나 같은 이름으로 여러 다른 프로그램을 사용하고 싶을 때 다음과 같이 이용한다.

update-alternatives –install /usr/bin/<프로그램이름> <프로그램이름> <프로그램경로> 1
update-alternatives –config <프로그램이름>

예를 들면, 나는 p4v 가 계속 버전업될 때마다 다음과 같은 식으로 사용할 p4v 를 고른다.
사실 ln -s 와 같은 식으로 소프트 링크를 바꿔주는 것과 동일하다.

update-alternatives –install /usr/bin/p4v p4v /opt/p4v-어쩌고저쩌고/bin/p4v 1
update-alternatives –config p4v

[Linux] git 사용 시 Proxy 환경 아래서 https 인증이 제대로 안될 때

git 사용 시 Proxy 환경 아래서 https 인증이 제대로 안될 때 다음과 같은 에러 발생 시..

error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://주소.com/프로젝트.git/info/refs
fatal: HTTP request failed


아래처럼 하고 해보자.
 

$ export GIT_SSL_NO_VERIFY=true

우아한 방법은 아니지만 동작은 한다.
다음처럼 설정도 가능.

$ git config –global http.sslVerify false

참고 :  http://stackoverflow.com/questions/3777075/https-github-access

[Samba] 공유 디렉토리 추가

가끔, 아니 매우 자주 공유 디렉토리 만들 일이 생긴다. 이건 사실 쓸 필요없다고 생각해서 그동안 안적어왔는데 귀찮을 때 긁는게 더 낫겠다.

/etc/samba.conf 에 다음 내용을 추가한다.

[Shared]

  comment = Shared directory

  path = /home/public

  writeable = yes

  browseable = no

  guest ok = yes

  read only = no

접근 경로는 위와 같다면 “\\<IP>\Shared” 이다.

물론 설정 후 삼바 서비스는 재시작한다.

sudo service smbd restart

[Linux] Shell script 에서 문자열 다루기

참고에 매우 자세히 잘 정리되어 있다. 감사.

문자열 길이 구하기
${#string}

문자열 추출
${string:position}
${string:position:length}

문자열 조각 삭제
${string#substring}
 string의 앞에서부터 가장 짧게 일치하는 substring 제거
${string##substring}
 string의 앞에서부터 가장 길게 일치하는 substring 제거

${string%substring}
 string의 뒤에서부터 가장 짧게 일치하는 substring 제거
${string%%substring}
 string의 뒤에서부터 가장 길게 일치하는 substring 제거

참고 : 
http://wonylog.tistory.com/192

lxr 설치하기

http://lifeseed.tistory.com/tag/glimpse 에 있는대로만 하면 된다. 글쓴이에게 감사를..

정리하자면,
1. glimpse 설치
1.1. wget http://webglimpse.net/trial/glimpse-latest.tar.gz
1.2. tar xvfz glimpse-latest.tar.gz
1.3. ./configure && make && sudo make install

2. lxr 설치
2.1. sudo apt-get install lxr
 기본 설치는 /usr/share/lxr 에 된다.
2.2. sudo vi /etc/apache2/sites-available/default 후 다음 내용 추가

    Alias /lxr “/usr/share/lxr”
    <Directory “/usr/share/lxr”>
        Options All
        AllowOverride All
    </Directory>

2.3. sudo cp /usr/share/lxr/blurb.html /usr/share/lxr/index.html

3. lxr 환경 설정
3.1. sudo vi /usr/share/lxr/lxr.conf
3.1.1. 나의 경우 대부분 archtechture로 arm 을 쓰므로 다음처럼 고친다.

# Define typed variable “a”.  First value is default.
variable: a, Architecture, (arm, i386, alpha, m68k, mips, ppc, sparc, sparc64)

3.1.2. base url 도 localhost 대신 ip 를 사용하자.

# Define the base url for the LXR files.

baseurl: http://<IP ADDRESS>/lxr/http/

3.1.3. version 명으로 된 디렉토리 아래 바로 소스를 둘 것이므로 다음처럼 고친다.

# The source is here.
sourceroot: /usr/share/lxr/source/$v/
srcrootname: Linux

3.1.4. glimpse 를 위처럼 설치했다면 경로가 다르므로 이것도 고치자.

# Glimpse can be found here.
glimpsebin: /usr/local/bin/glimpse
 

4. 소스 코드 복사 및 DB 구축
4.1. sudo mkdir /usr/share/lxr/source/<VERSION>
4.2. sudo cp 소스 /usr/share/lxr/source/<VERSION>
4.3. cd  /usr/share/lxr/source
4.4. sudo echo ‘<VERSION>’ >> ./versions
4.5. sudo echo ‘<VERSION>’ >> ./defversion
4.6. cd <VERSION>
4.7. sudo genxref ./
4.8. sudo glimpseindex -H ./ fileidx xref
4.9. sudo chmod 644 .glimpse_*
4.10. sudo chmod 644 fileidx
4.11 sudo chmod 644 xref

5. http://<IP ADDRESS>/lxr/http 접속.