FreeBSD weechat irc Client install
IRC Server 를 설치 하다 보니 weechat 을 오랜만에 설치 합니다.
심플하게 terminal 에서 irc 를 사용한다고 하면 weechat 이 좋을거 같습니다.
gnome 이나 xfce Desktop 사용시에는 xirc 를 추천 합니다. 🙂
Linux irc Client 의 경우 https://www.tecmint.com/best-irc-clients-for-linux/ 사이트에서 가장 많이쓰는 irc client 를 확인할수 있습니다.
ports 로 weechat 설치
설치하다가 오류가 나서 pkg 로 설치 했습니다.
root@bsd11-Client:~ # whereis weechat weechat: /usr/ports/irc/weechat root@bsd11-Client:~ # cd /usr/ports/irc/weechat && make install clean ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[6]: stopped in /usr/ports/emulators/tpm-emulator *** Error code 1 Stop. make[5]: stopped in /usr/ports/security/trousers *** Error code 1 Stop. make[4]: stopped in /usr/ports/security/trousers *** Error code 1 Stop. make[3]: stopped in /usr/ports/security/gnutls *** Error code 1 Stop. make[2]: stopped in /usr/ports/security/gnutls *** Error code 1 Stop. make[1]: stopped in /usr/ports/irc/weechat *** Error code 1 Stop. make: stopped in /usr/ports/irc/weechat root@bsd11-Client:/usr/ports/irc/weechat # make MAKE_JOBS_UNSAFE=yes install clean ~중략 [0/1] /usr/local/bin/cmake -H/usr/ports/emulators/tpm-emulator/work/tpm_emulator-0.7.4 -B/usr/ports/emulators/tpm-emulator/work/.build -- Configuring done -- Generating done -- Build files have been written to: /usr/ports/emulators/tpm-emulator/work/.build ninja: error: manifest 'build.ninja' still dirty after 100 tries *** Error code 1 Stop. make[6]: stopped in /usr/ports/emulators/tpm-emulator *** Error code 1 Stop. make[5]: stopped in /usr/ports/security/trousers *** Error code 1 Stop.
pkg 명령어로 weechat 을 설치 합니다.
검색을 해보니 그냥 바이너리로 설치하는게 방법일거 같아서 pkg 명령어를 이용하여 설치 합니다.
서버 데몬이 아닌 간단히 의존성 없는 APP를 설치할 경우 pkg 를 이용하는것이 시간과 정신건강에 좋습니다. 🙂
root@bsd11-Client:~ # pkg install weechat To run tcsd automatically, add the following line to /etc/rc.conf: tcsd_enable="YES" You might want to edit /usr/local/etc/tcsd.conf to reflect your setup. If you want to use tcsd with software TPM emulator, use the following configuration in /etc/rc.conf: tcsd_enable="YES" tcsd_mode="emulator" tpmd_enable="YES" To use TPM, add your_account to '_tss' group like following: # pw groupmod _tss -m your_account Message from lua52-5.2.4: ===> NOTICE: The lua52 port currently does not have a maintainer. As a result, it is more likely to have unresolved issues, not be up-to-date, or even be removed in the future. To volunteer to maintain this port, please create an issue at: https://bugs.freebsd.org/bugzilla More information about port maintainership is available at: https://www.freebsd.org/doc/en/articles/contributing/ports-contributing.html#maintain-port root@bsd11-Client:~ # sysrc 를 통하여 Deamon 을 enable 시켜줍니다. root@bsd11-Client:~ # sysrc tcsd_enable="YES" tcsd_enable: -> YES root@bsd11-Client:~ # sysrc tcsd_mode="emulator" tcsd_mode: -> emulator root@bsd11-Client:~ # sysrc tpmd_enable="YES" tpmd_enable: -> YES root@bsd11-Client:~ # cat /etc/rc.conf hostname="bsd11-Client" keymap="us.iso.kbd" ifconfig_em0="DHCP" sshd_enable="YES" powerd_enable="YES" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev="AUTO" zfs_enable="YES" tcsd_enable="YES" tcsd_mode="emulator" tpmd_enable="YES" root@bsd11-Client:~ #
일반유저에서 weechat 을 실행 합니다.
$ whoami test1 $ weechat-curses
아래와 같은 화면을 볼수 있습니다.
/server add testirc 192.168.0.100/6667 를 입력하여 접속할 서버의 config 를 생성 합니다.
.weechat 디렉토리의 irc.conf 파일에 [server] 섹션 부분이 추가 됩니다.
/exit
exit 를 입력하여 weechat 에서 빠져 나옵니다.
weechat 을 실행 하고 나면 user directory 에 .weechat 디렉토리가 생성 됩니다.
.weechat 디렉토리의 irc.conf 파일을 설정 합니다.
일반적인 접속 테스트만 진행하기 위하여 address 부분과 autoconnect , nick , username 만 설정 하였습니다.
$ vi irc.conf [server_default] addresses = "192.168.0.100/6667" anti_flood_prio_high = 2 anti_flood_prio_low = 2 autoconnect = on autojoin = "" autoreconnect = on autoreconnect_delay = 10 autorejoin = off autorejoin_delay = 30 away_check = 0 away_check_max_nicks = 25 capabilities = "" command = "" command_delay = 0 connection_timeout = 60 ipv6 = off local_hostname = "" msg_kick = "" msg_part = "WeeChat ${info:version}" msg_quit = "WeeChat ${info:version}" nicks = "test1,test11,test12,test13,test14" nicks_alternate = on notify = "" password = "" proxy = "" realname = "" sasl_fail = continue sasl_key = "" sasl_mechanism = plain sasl_password = "" sasl_timeout = 15 sasl_username = "" split_msg_max_length = 512 ssl = off ssl_cert = "" ssl_dhkey_size = 2048 ssl_fingerprint = "" ssl_priorities = "NORMAL:-VERS-SSL3.0" ssl_verify = on usermode = "" username = "test1" [server] testirc.addresses = "192.168.0.100/6667" testirc.proxy = "" testirc.ipv6 testirc.ssl testirc.ssl_cert = "" testirc.ssl_priorities testirc.ssl_dhkey_size testirc.ssl_fingerprint = "" testirc.ssl_verify testirc.password testirc.capabilities testirc.sasl_mechanism testirc.sasl_username testirc.sasl_password testirc.sasl_key testirc.sasl_timeout testirc.sasl_fail testirc.autoconnect testirc.autoreconnect testirc.autoreconnect_delay testirc.nicks = "test" testirc.nicks_alternate testirc.username = "test" testirc.realname testirc.local_hostname testirc.usermode testirc.command testirc.command_delay testirc.autojoin testirc.autorejoin testirc.autorejoin_delay testirc.connection_timeout testirc.anti_flood_prio_high testirc.anti_flood_prio_low testirc.away_check testirc.away_check_max_nicks testirc.msg_kick testirc.msg_part testirc.msg_quit testirc.notify testirc.split_msg_max_length
설정내용은 별도로 주석을 달지 않았습니다.
설정내용은 차후 업데이트 하도록 하겠습니다.
weechat 을 접속하여 irc server 에 접속을 합니다.
$ weechat-curses
/join #testirc
channel 로 접속을 합니다.
weechat 설치가 완료 되었습니다. 🙂
charset 의 경우 .weechat 디렉토리의 $ charset.conf 에서 설정 할수 있습니다.
charset 의 경우 아래와 같이 변경 할수 있습니다.
$ cd .weechat/ $ vi charset.conf [default] decode = "iso-8859-1" encode = "UTF8"
decode 를 UTF8 로 변경 하여도 다시 iso-8859-1 로 변경 됩니다.
Locale 변경
freebsd 의 경우 Default C 로 locale 이 설정 되어 있습니다.
사용하는 user locale 을 변경 하기 위해선 home Directory 의 .login_conf 파일 수정이 필요 합니다.
$ vi .login_conf # see login.conf(5) # #me:\ # :charset=iso-8859-1:\ # :lang=de_DE.ISO8859-1: me:\ :charset=ko_KR.UTF-8:\ :lang=ko_KR.UTF-8: 재접속후 확인 $ locale LANG=ko_KR.UTF-8 LC_CTYPE="ko_KR.UTF-8" LC_COLLATE="ko_KR.UTF-8" LC_TIME="ko_KR.UTF-8" LC_NUMERIC="ko_KR.UTF-8" LC_MONETARY="ko_KR.UTF-8" LC_MESSAGES="ko_KR.UTF-8" LC_ALL= $
irc 접속하여 한글 테스트
혹시나 charset decode 부분을 UTF8 로 변경이 가능할수 있을거 같아 찾아 봤지만..
이런 메시지를 확인 했습니다. 🙂
weechat 에서 설정을 바꿀경우 /set charset.default.decode "UTF8" 으로도 바꿀수 있지만 decode 를 바꾸면 아래와 같은 메시지를 확인 할수 있습니다.
x23:21:39 weechat =!= | charset: UTF-8 is not allowed in charset decoding options (it is internal and default charset: decode of UTF-8 is OK even if you specify another
x | charset to decode)
x23:21:39 weechat =!= | Error: failed to set option "charset.default.decode"
/set charset 에서 확인시
charset.default.decode string "iso-8859-1" 선택하여 확인 하면 아래와 같은 메시지를 확인 할수 있습니다. 🙂
charset.default.decode: global decoding charset: charset used to decode incoming messages when they are not UTF-8 valid
Comments