Eclipse는 기본 Nate Application과는 다르게 Launcher에 아이콘이 등록되지 않는 상황이 발생합니다. 수동으로 등록해 줘야 함.

아래와 같이 eclipse.desktop 파일을 생성하고 내용을 넣습니다.

]$ vim ~/.local/share/applications/eclipse.desktop

들어갈 내용, Icon과 Exec는 적절히 수정 필요합니다.

[Desktop Entry]
Type=Application
Name=Eclipse
Comment=Eclipse Integrated Development Environment
Icon=/home/jinoos/eclipse/icon.xpm
Exec=/home/jinoos/eclipse/eclipse
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse

그다음, 실행 권한을 준뒤, nautilus 를 띄워서 해당 디렉토리를 오픈 합니다.

]$ chmod +x ~/.local/share/applications/eclipse.desktop
]$ nautilus ~/.local/share/applications

이후 해당 eclipse.desktop 파일을 Launcher에 Drag&Drop 하여 등록, 이후부터는 잘 동작 합니다.


출처 : http://askubuntu.com/questions/80013/how-to-pin-eclipse-to-the-unity-launcher


Posted by 지누스

댓글을 달아 주세요

시스템설정 >> 키보드 >> 키보드배치 설정 >> 옵션 으로 이동 후 적절히 세팅하면 끝.

오랜만에 다시 깔았더니 다까먹어서 등록중 ㅠㅠ


Posted by 지누스

댓글을 달아 주세요

 한성 U43F의 유선 랜카드는 Atheros AR8161 Gigabit Ethernet 입니다. 아쉽게도 Ubuntu 기본 패키지에는 드라이버가 활성화 되어있지 않앗서 아래 커맨드로 드라이버를 활성화 시켜줘야 동작합니다. 다행이 드라이버 패키지를 제공은 해주고 있어 커널 재컴파일은 필요 없습니다.


]$ sudo apt-get install linux-backports-modules-cw-3.4-precise-generic
]$ sudo modprobe alx
Posted by 지누스

댓글을 달아 주세요

http://fw-geekycoder.blogspot.kr/2010/07/creating-log4j-custom-patternlayout.html


Creating Log4J Custom PatternLayout

Suppose we need to add a username information into our logging, with Log4J this can be implemented easily. Log4J allows us to create our own PatternLayout.

PatternLayout has a method createPatternParser() that will basically delegate the task to PatternParser. Here, we can create our own MyPatternLayout by extending it from PatternLayout and delegating the task to our own PatternParser as shown below.

MyPatternLayout.java
1
2
3
4
5
6
7
8
9
10
11
12
package myproject;
 
import org.apache.log4j.PatternLayout;
import org.apache.log4j.helpers.PatternParser;
 
public class MyPatternLayout extends PatternLayout {
 
    @Override
    protected PatternParser createPatternParser(String pattern) {
        return new MyPatternParser(pattern);
    }
}

Since we normally just want to add a new character in the pattern instead of redefining all the characters, we need to make sure that we call super.finalizeConverter(c) as shown below.

PatternParser.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package myproject;
 
import org.apache.log4j.helpers.PatternParser;
 
public class MyPatternParser extends PatternParser {
    private static final char USERNAME_CHAR = 'u';
     
    public MyPatternParser(String pattern) {
        super(pattern);
    }
     
    @Override
    protected void finalizeConverter(char c) {
        switch (c) {
        case USERNAME_CHAR:
            currentLiteral.setLength(0);
            addConverter(new MyPatternConverter());
            break;
        default:
            super.finalizeConverter(c);
        }
    }
}

MyPatternConverter.java
1
2
3
4
5
6
7
8
9
10
11
12
13
package myproject;
 
import org.apache.log4j.helpers.PatternConverter;
import org.apache.log4j.spi.LoggingEvent;
 
public class MyPatternConverter extends PatternConverter {
 
    @Override
    protected String convert(LoggingEvent evt) {
        // For simplicity, assume this information is retrieved from somewhere.
        return "User1";
    }
}

Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package myproject;
 
import org.apache.log4j.Logger;
 
public class Main {
 
    private static final Logger logger = Logger.getLogger(Main.class);
     
    public static void main(String[] args) {
        logger.info("Hello World");
        logger.debug("Hello World");
        logger.warn("Hello World");
        logger.error("Hello World");
    }
}


Make sure to change the layout to our own custom PatternLayout in the log4j.properties.
log4j.properties
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender

log4j.appender.A1.layout=myproject.MyPatternLayout 
log4j.appender.A1.layout.ConversionPattern=[%-5p] <%u> [%c.%t] - %m%n


'컴퓨팅' 카테고리의 다른 글

[MAC] VMWare Fusion 6에서 Static IP 설정하기  (200) 2014.09.16
Java Log4j Custom PatternLayout  (0) 2013.06.14
모든 것을 문서화 하라  (0) 2012.02.15
Posted by 지누스

댓글을 달아 주세요

jinoos@zookeeper1 /usr/local/zookeeeper/src/c]
$ sudo autoreconf2.50 -if
configure.ac:37: warning: macro `AM_PATH_CPPUNIT' not found in library
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:37: warning: macro `AM_PATH_CPPUNIT' not found in library
configure.ac:37: error: possibly undefined macro: AM_PATH_CPPUNIT
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf2.50: /usr/bin/autoconf failed with exit status: 1

jinoos@zookeeper1 /usr/local/zookeeeper/src/c]
$ sudo apt-get install libcppunit-dev

jinoos@zookeeper1 /usr/local/zookeeeper/src/c]
$ sudo autoreconf -if
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./config.guess'
libtoolize: copying file `./config.sub'
libtoolize: copying file `./install-sh'
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.

jinoos@zookeeper1 /usr/local/zookeeeper/src/c]
$ sudo ./configure --prefix=/usr/local/libzookeeper

jinoos@zookeeper1 /usr/local/zookeeeper/src/c]
$ sudo make

jinoos@zookeeper1 /usr/local/zookeeeper/src/c]
$ sudo make install

jinoos@zookeeper1 /usr/local/zookeeeper/src/c]
$ find /usr/local/libzookeeper/ -type f
/usr/local/libzookeeper/include/zookeeper/zookeeper.jute.h
/usr/local/libzookeeper/include/zookeeper/zookeeper.h
/usr/local/libzookeeper/include/zookeeper/zookeeper_log.h
/usr/local/libzookeeper/include/zookeeper/proto.h
/usr/local/libzookeeper/include/zookeeper/zookeeper_version.h
/usr/local/libzookeeper/include/zookeeper/recordio.h
/usr/local/libzookeeper/lib/libzookeeper_st.so.2.0.0
/usr/local/libzookeeper/lib/libzookeeper_st.a
/usr/local/libzookeeper/lib/libzookeeper_mt.a
/usr/local/libzookeeper/lib/libzookeeper_mt.la
/usr/local/libzookeeper/lib/libzookeeper_mt.so.2.0.0
/usr/local/libzookeeper/lib/libzookeeper_st.la
/usr/local/libzookeeper/bin/cli_st
/usr/local/libzookeeper/bin/load_gen
/usr/local/libzookeeper/bin/cli_mt

jinoos@zookeeper1 /usr/local/zookeeeper/src/contrib/zkfuse]
$ cd contrib/

jinoos@zookeeper1 /usr/local/zookeeeper/src/contrib/zkfuse]
$ sudo apt-get install libfuse-dev

jinoos@zookeeper1 /usr/local/zookeeeper/src/contrib/zkfuse]
$ sudo apt-get install libboost-dev

jinoos@zookeeper1 /usr/local/zookeeeper/src/contrib/zkfuse]
$ sudo apt-get install liblog4cxx10-de

jinoos@zookeeper1 /usr/local/zookeeeper/src/contrib/zkfuse]
$ sudo ./configure

jinoos@zookeeper1 /usr/local/zookeeeper/src/contrib/zkfuse]
$ sudo make ; sudo make install

jinoos@zookeeper1 /usr/local/zookeeeper/src/contrib/zkfuse]
$ cd src

jinoos@zookeeper1 /usr/local/zookeeeper/src/contrib/zkfuse/src]
$ sudo LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/libzookeeper/lib/" \
./zkfuse -z 192.168.122.6:2181,192.168.122.7:2181,192.168.122.8:2181 -m /mnt/zookeeper -d
......
......
......

'컴퓨팅 > Zookeeper' 카테고리의 다른 글

Zookeeper FUSE (zkfuse)로 zookeeper노드 Mount 하기.  (0) 2013.05.27
Posted by 지누스

댓글을 달아 주세요



티스토리 툴바