GNU Screen에 vertical split 적용

atie의 이미지
17899
points
6
points

한동안 제가 스크린샷 올리는 것이 뜸했는데, 그 동안 dwm/awesome/fluxbox 이것저것 써보다가 새 랩탑 장만하고 Gnome/Compiz로 다시 돌아왔습니다. OTL

화면 가로가 넓어져서 이전 랩탑에 vertical split을 적용했던 것 보다 훨씬 보기가 편하네요.

터미널은 그놈터미널입니다. 설정은, http://forum.compiz-fusion.org/showthread.php?t=3624

Vertical split 패치는, http://fungi.yuggoth.org/vsp4s/

저는 우분투 Gutsy에서 Hardy의 screen 패키지 소스에 위 패치를 적용을 했습니다. 제가 적용한 순서를 적어보면,

http://packages.ubuntu.com/hardy/misc/screen 에서 dsc, orig.tar.gz, diff.gz를 다운받습니다. (apt sourcelist에 hardy repo를 추가하지 않았을 때)

다운 받은 dir에서, dpkg-source -x *.dsc로 소스 패키지를 풀고, screen-4.0.3 dir로 이동합니다.

패치.bz2 파일을 압축 푼 diff 파일을 dpatch로 확장자를 변경한 후 debian/patches 디렉토리 아래에 넣습니다.

아래 형식으로 그 dpatch 파일을 수정합니다.

cat debian/patches/999wrp_vertical_split_0.3_4.0.2.dpatch | head -10
#! /bin/sh /usr/share/dpatch/dpatch-run                                                                
## 999wrp_vertical_split by  Bill Pursell 
##                                                                                                     ─────────────────────────────────────────────────────────────────────────────────────────────────────
## DP: Vertical split
                                                                                                       
--- screen-4.0.3.orig/comm.c    2003-09-08 14:25:08.000000000 +0000
+++ screen-4.0.3/comm.c 2006-07-07 02:39:24.000000000 +0000                                            
@@ -309,6 +309,7 @@ struct comm comms[RC_LAST + 1] =                                                   link:
   { "vbellwait",       ARGS_1 },
   { "verbose",         ARGS_01 },          

#가 붙은 dpatch 헤더를 넣고, 패치 내의 모든 old/new dir path를 screen-4.0.3.orig/screen-4.0.3으로 각각 변경을 했습니다.

debian/patches/00list에 그 dpatch 명을 추가합니다. 저는 999wrp_vertical-split_0.3_4.0.2.dpatch라고 명했습니다.

cat debian/patches/00list | tail -3
40cjk_eastasian                                                                                        
50EXP_tilde_expansion                                                                                  
999wrp_vertical_split_0.3_4.0.2     

debian/changelog에 다음처럼 파일 처음에 변경사항을 추가합니다. (이 경우는 선택사항이지만, 이렇게 습관을 들이면 패키지 update를 막고/푸는 요령이 생겨 유용합니다.)

cat debian/changelog | head -10
screen (4.0.3-7ubuntu1.1) hardy; urgency=low                                                           
                                                                                                       
  * Added vertical split patch from <a href="http://fungi.yuggoth.org/vsp4s/" title="http://fungi.yuggoth.org/vsp4s/">http://fungi.yuggoth.org/vsp4s/</a>                                  ─────────────────────────────────────────────
    - 999wrp_vertical_split_0.3_4.0.2.dpatch      

 -- who <who's email>  Sat, 22 Dec 2007 21:42:54 +0900        

이제 빌드에 필요한 패키지를 설치합니다. apt-get build-dep screen 명령을 치거나 debian/control 파일을 한 번쯤 살펴보는 것도 좋습니다.

screen-4.0.3 dir에서 dpkg-buildpackage -rfakeroot 명령으로 패키지를 빌드한 후, sudo dpkg -i ../screen*.deb 명령으로 설치합니다.

짧게 쓰는 것이 잘 안되네요. 필요한 다른 패키지를 만들 때도 유용한 팁이서 첨부 그림 설명보다 훨씬 길어졌습니다.

화면 하단에 보이는 것은 conky이고, 그 밑에는 awn이 숨겨져 있습니다. 위젯처럼 보이는 것들은 screenlet 이고요. 스샷은 파일 크기를 고려해서 jpg로 변경했습니다.

첨부 파일파일 크기
ss20071222.jpg366.26 KB
eunjea의 이미지
3733
points

와~ 좋네요. 마침

1
point

와~ 좋네요.
마침 텀창을 루트에 깔아 놓는 방법을 찾고 있었는데
글에 언급하신 링크가 도움이 되었습니다.

--
/~eunjea

첨부 파일파일 크기
20071224.jpg336.06 KB
익명 사용자의 이미지

xwinwrap으로 urxvt를

1
point

xwinwrap으로 urxvt를 embed 하는 방법도 있습니다.

xwinwrap -argb -st -sp -b -g -nf -fs -- urxvt +sb -depth 32 -bg rgba:0000/0000/0000/2424 -embed WID -b 50 -bd rgba:0000/0000/0000/0000 &

eunjea의 이미지
3733
points

좀 더 찾아보니 Devil's

1
point

좀 더 찾아보니 Devil's Pie 이런걸 사용하는 방법도 있군요.

http://ubuntuforums.org/showthread.php?t=202249&highlight=terminal+deskt...

http://www.burtonini.com/blog/computers/devilspie

http://foosel.org/linux/devilspie

그러고 보니 아주 예전에 구식 창 관리자(twm 같은...)를 쓸때는 이런게 훨씬 더 간단했던 것 같아요.

--
/~eunjea

atie의 이미지
17899
points

관련없는 내용이지만

0
points

관련없는 내용이지만 위에 첨부된 제 화면을 보면 아래의 내용 이해가 쉬울 듯 해서 이 글에 덧붙입니다.

그 동안은 avant-window-navigator를 conky 바 아래로 auto-hide 해서 사용을 해왔는데, 소스를 수정해서 conky 바 왼쪽 옆에 항상 표시되도록 하려고 했습니다. 그런데 소스를 보는 중에 이미 bar_pos를 gconf-editor로 변경을 할 수 있도록 해 놓았더군요. Duh... (awn-manager에는 설정 항목이 없습니다.)

gconf-editor에서, apps : avant-window-navigator : bar : bar_pos
0 이면 왼쪽, 기본값 0.5 이면 중간, 1 이면 오른쪽 정렬이 됩니다.

이제 아쉬운 것 딱 두 가지는,
- dwm에서 쓰던 dict 스크립트를 동작하게 하는 것 (compiz 어디선가 마우스 버튼 이벤트를 막는가 봅니다.)
- cmus로 노래 들을 때 앨범 표지 보이는 c 프로그램 갖는 것 (rtorrent로 iso 받고 있으면 last.fm 듣는 속도도 아까울 때가 있더군요.)

추가: 아 한 가지 더, real transparent conky 버전 (nautilus 4 배경화면 보이기 패치를 하고도 conky가 pseudo transparent라 안쓰고 있네요.)

추가2: dzendict 스크립트가 동작하게 dzen의 main.c를 다음과 같이 수정을 하였습니다.

--- main.old.c  2008-01-15 10:26:24.000000000 -0600
+++ main.c      2008-01-15 10:16:13.000000000 -0600
@@ -347,7 +347,7 @@
        /* window attributes */
        wa.override_redirect = 1;
        wa.background_pixmap = ParentRelative;
-       wa.event_mask = ExposureMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | KeyPressMask;
+       wa.event_mask = ExposureMask | ButtonReleaseMask | ButtonPressMask | ButtonMotionMask | EnterWindowMask | LeaveWindowMask | KeyPressMask;
 
 #ifdef DZEN_XINERAMA
        queryscreeninfo(dzen.dpy, &si, dzen.xinescreen);

compiz와 dzen을 조합해서 쓰는 경우가 극히 드물어서 별 도움 안되는 수정이겠지만 후에 제가 참고할 필요가 있는 경우를 대비한 수정 글입니다.
----
I paint objects as I think them, not as I see them.

좋네요

0
points

터미널을 바탕화면에 깔고 screen에 vertical split 쓰니까 좋네요.
고맙습니다. 덕분에 많이 배웠습니다.

저는 KDE를 쓰는데, 이리저리 해보니까 urxvt를 사용하는게 가장 좋은것 같습니다. 다음과 같이 실행해서 씁니다.

kstart --windowclass urxvt --skippager --alldesktops --onbottom \       
    urxvt -name DesktopConsole -title DesktopConsole -fade 20 +sb -tr \
    -fg white -bg black -bl -b 0 -w 0 -geometry 160x48+0+100 \ 
    -e bash -c "screen"

이것을 $HOME/.kde/Autostart/05Urxvt 스크립트에 저장해놓으면, KDE 실행할때마다 자동으로 뜨게 되지요.

그리고 screen이 자동으로 vertical split 되게 하려고 $HOME/.screenrc에 "vert_split"을 추가했습니다.

댓글 보기 옵션

원하시는 댓글 전시 방법을 선택한 다음 "설정 저장"을 누르셔서 적용하십시오.