Linux/Ubuntu2013. 7. 10. 16:24
korea 에서 Main으로 바꾸니 더욱 빨라진 기분..
(기분이라기 보다는 느낌? ㅋㅋㅋ
바꾸기 전에는 국내 서버에서 30kB/s 이렇게 날아오던던게 메가급으로 날아온다 -_-
어떻게 국내가 더 느려진겨?)

 
Posted by 구차니
Linux/Ubuntu2013. 7. 10. 16:16
비정상 실행시 /etx/X11/xorg.conf.failsafe 파일을 가지고 노는게 나을려나..
$ ll /etc/X11/
total 96
drwxr-xr-x  10 root root  4096 Jul 10 16:00 ./
drwxr-xr-x 127 root root 12288 Jul 10 15:56 ../
lrwxrwxrwx   1 root root    13 Sep  9  2012 X -> /usr/bin/Xorg*
-rwxr-xr-x   1 root root   709 Apr  1  2010 Xreset*
drwxr-xr-x   2 root root  4096 Feb 14 07:09 Xreset.d/
drwxr-xr-x   2 root root  4096 Feb 14 07:09 Xresources/
-rwxr-xr-x   1 root root  3730 Jan 20  2012 Xsession*
drwxr-xr-x   2 root root  4096 Feb 14 07:10 Xsession.d/
-rw-r--r--   1 root root   265 Jul  2  2008 Xsession.options
-rw-r--r--   1 root root   601 Feb 14 07:09 Xwrapper.config
drwxr-xr-x   2 root root  4096 Feb 14 07:10 app-defaults/
drwxr-xr-x   2 root root  4096 Feb 14 07:10 cursors/
-rw-r--r--   1 root root    18 Feb 14 07:09 default-display-manager
drwxr-xr-x   4 root root  4096 Feb 14 07:09 fonts/
-rw-r--r--   1 root root 17394 Dec  3  2009 rgb.txt
drwxr-xr-x   3 root root  4096 Feb 14 07:10 xinit/
drwxr-xr-x   2 root root  4096 Jan 24  2012 xkb/ 

아래 경로로 옮겨진 10-monitor.conf를 생성해서 가지고 노는게 좋으려나?
$ ll /usr/share/X11/xorg.conf.d/
total 36
drwxr-xr-x 2 root root 4096 Feb 14 07:09 ./
drwxr-xr-x 5 root root 4096 Feb 14 07:09 ../
-rw-r--r-- 1 root root 1099 Jan 19 21:39 10-evdev.conf
-rw-r--r-- 1 root root  590 Dec  8  2012 11-evdev-quirks.conf
-rw-r--r-- 1 root root  364 Dec  8  2012 11-evdev-trackpoint.conf
-rw-r--r-- 1 root root 1593 Dec  8  2012 50-synaptics.conf
-rw-r--r-- 1 root root  115 Dec  8  2012 50-vmmouse.conf
-rw-r--r-- 1 root root  842 Dec  8  2012 50-wacom.conf
-rw-r--r-- 1 root root  590 Dec  8  2012 51-synaptics-quirks.conf


아무튼
$ sudo service lightgdm stop 
$ sudo X -configure 
라고 입력하니 $HOME 에 xorg.conf.new 라고 빈내용의 설정파일이 생성된다.

$ cat xorg.conf.new
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        Screen      1  "Screen1" RightOf "Screen0"
        Screen      2  "Screen2" RightOf "Screen1"
        Screen      3  "Screen3" RightOf "Screen2"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/X11/misc"
        FontPath     "/usr/share/fonts/X11/cyrillic"
        FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/Type1"
        FontPath     "/usr/share/fonts/X11/100dpi"
        FontPath     "/usr/share/fonts/X11/75dpi"
        FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
        FontPath     "built-ins"
EndSection

Section "Module"
        Load  "glx"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor2"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor3"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "NoAccel"                   # [<bool>]
        #Option     "AccelMethod"               # <str>
        #Option     "Backlight"                 # <str>
        #Option     "DRI"                       # [<bool>]
        #Option     "ColorKey"                  # <i>
        #Option     "VideoKey"                  # <i>
        #Option     "Tiling"                    # [<bool>]
        #Option     "LinearFramebuffer"         # [<bool>]
        #Option     "SwapbuffersWait"           # [<bool>]
        #Option     "XvPreferOverlay"           # [<bool>]
        #Option     "HotPlug"                   # [<bool>]
        #Option     "RelaxedFencing"            # [<bool>]
        #Option     "XvMC"                      # [<bool>]
        #Option     "Throttle"                  # [<bool>]
        #Option     "ZaphodHeads"               # <str>
        #Option     "DelayedFlush"              # [<bool>]
        #Option     "TearFree"                  # [<bool>]
        #Option     "PerCrtcPixmaps"            # [<bool>]
        #Option     "FallbackDebug"             # [<bool>]
        #Option     "DebugFlushBatches"         # [<bool>]
        #Option     "DebugFlushCaches"          # [<bool>]
        #Option     "DebugWait"                 # [<bool>]
        #Option     "BufferCache"               # [<bool>]
        #Option     "TripleBuffer"              # [<bool>]
        Identifier  "Card0"
        Driver      "intel"
        BusID       "PCI:0:2:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"                  # [<bool>]
        #Option     "kmsdev"                    # <str>
        #Option     "ShadowFB"                  # [<bool>]
        Identifier  "Card1"
        Driver      "modesetting"
        BusID       "PCI:0:2:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "Rotate"                    # <str>
        #Option     "fbdev"                     # <str>
        #Option     "debug"                     # [<bool>]
        Identifier  "Card2"
        Driver      "fbdev"
        BusID       "PCI:0:2:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "ShadowFB"                  # [<bool>]
        #Option     "DefaultRefresh"            # [<bool>]
        #Option     "ModeSetClearScreen"        # [<bool>]
        Identifier  "Card3"
        Driver      "vesa"
        BusID       "PCI:0:2:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "Card1"
        Monitor    "Monitor1"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen2"
        Device     "Card2"
        Monitor    "Monitor2"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen3"
        Device     "Card3"
        Monitor    "Monitor3"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

xrandr 로 모니터 지원 해상도를 설정하면 된다는데 어떻게 설정을 해야 하려나..
$ xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0 +
   1600x1200      65.0     60.0  
   1680x1050      60.0  
   1680x945       60.0  
   1400x1050      74.9     60.0  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1440x900       75.0     59.9  
   1280x960       60.0  
   1366x768       60.0  
   1360x768       60.0  
   1280x800       74.9     59.8  
   1152x864       75.0  
   1280x768       74.9     59.9  
   1024x768       75.0     70.1     60.0
   1024x576       60.0  
   800x600        72.2     75.0     60.3     56.2  
   848x480        60.0  
   640x480        75.0     72.8     60.0  
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis) 

Section "Monitor"
  Identifier "Monitor0"
  Modeline "1920x1080_60.00" 82.97 1000 1064 1168 1336 1000 1001 1004 1035 -HSync +Vsync
EndSection

Section "Screen"
  Identifier "Screen0"
  Device "HDMI-1"
  Monitor "Monitor0"
  DefaultDepth 24
  SubSection "Display"
    Depth 24
    Modes "1920x1080_60.00" "1024x768"
  EndSubSection
EndSection 
[링크 : http://samuelmartin.wordpress.com/2012/05/29/enabling-resolutions-in-ubuntu-12-04-lubuntu-12-04/]
[링크 : http://ubuntu.or.kr/viewtopic.php?p=103635

Posted by 구차니
Linux/Ubuntu2013. 7. 10. 14:38
집에 아이피가 공유기를 사용하여 192.168.0.x대로 되어있고
PPTP를 NAT 사용하지 않고 안드로이드 폰으로 연결하는 경우에 대한 설정이다.

일단 서버 아이피는 192.168.0.199로 고정되어 있고
회선은 KT 이므로 DNS는 168.126.63.1 와 168.126.63.2 로 설정하였다.

pptp 사용시 암호는 username / password 이며
공유기에서는 1723 번 포트를 포워딩 해주어야 한다.

$ sudo apt-get install pptpd
$ sudo vi /etc/pptpd.conf
# (Recommended)
localip 192.168.0.199
remoteip 192.168.0.234-238,192.168.0.245 

$ sudo vi /etc/ppp/pptpd-options
# Network and Routing

# If pppd is acting as a server for Microsoft Windows clients, this
# option allows pppd to supply one or two DNS (Domain Name Server)
# addresses to the clients.  The first instance of this option
# specifies the primary DNS address; the second instance (if given)
# specifies the secondary DNS address.
# Attention! This information may not be taken into account by a Windows
# client. See KB311218 in Microsoft's knowledge base for more information.
#ms-dns 10.0.0.1
#ms-dns 10.0.0.2
ms-dns 168.1
26.63.1
ms-dns 168.1
26.63.2  

$ sudo vi /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
username        pptpd   password                * 



혹시나 했지만.. packet forwarding이 설정되지 않으면 안된다.
NAT와는 별개로 포워딩은 켜줘야 PPTP로 전송이 됨.

$ sudo vi /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1 

$ sudo sysctl -p

[링크 : http://prettygom.com/entry/우분투에서-pptp-VPN-설정]


---
안드로이드에서 테스트
PPTP로 설정후


아이디 / 암호를 넣고


접속하면 끝!


상태바에도 올라간다!

 
Posted by 구차니
Linux2013. 7. 6. 15:14
parted 등으로 하드 디스크에서 offset을 알아 낸뒤
mount 시에 offset 옵션을 이용하여 마운트를 시키면 된다.

# parted hda.img
GNU Parted 1.7.1
Using /data/rabbit/disk_image/test2
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit
Unit?  [compact]? B
(parted) print
Disk /data/rabbit/disk_image/test2: 10262568959B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number  Start        End           Size         Type     File system  Flags
1      32256B       106928639B    106896384B   primary  ext3         boot
2      106928640B   1184440319B   1077511680B  primary  linux-swap
3      1184440320B  10256924159B  9072483840B  primary  ext3
(parted) quit

#mount -o loop,ro,offset=32256 hda.img /mnt/rabbit

[링크 : http://www.andremiller.net/content/mounting-hard-disk-image-including-partitions-using-linux]

'Linux' 카테고리의 다른 글

ltrace strace ldd readelf objdump 결과물  (0) 2013.11.26
Linux Router Project - Dead!!!  (2) 2013.11.26
리눅스 포팅  (0) 2013.06.19
fstab 필드 항목 내용  (0) 2013.05.24
원하는 cpu에서 프로세스 실행하기 (리눅스)  (0) 2013.03.18
Posted by 구차니
Linux2013. 6. 19. 18:53
백수되면 tynux palmpalm 에 리눅스 올려 볼까 하는데 미리 찾아 놔봐야지 머..

[링크 : http://onestep.tistory.com/78]

---
2013.07.02 추가
[링크 : http://recipes.egloos.com/5383584
[링크 : http://www.jiniya.net/wp/archives/5589]
Posted by 구차니
Linux/Ubuntu2013. 6. 14. 12:07
의외로 싱겁게
$ sudo apt-get install 대신
$ sudo apt-get source

패키지 마다 다르지만 svn으로 관리하는 녀석은 실행하는 경로에 받아 버리니 주의!

$ sudo apt-get source ngircd
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
알림: 'ngircd' 패키징은 다음 'Svn' 버전 컨트롤 시스템에서 관리합니다:
svn://svn.debian.org/pkg-irc/
소스 아카이브를 485 k바이트 받아야 합니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu/ precise/universe ngircd 18-2 (dsc) [1,272 B]
받기:2 http://kr.archive.ubuntu.com/ubuntu/ precise/universe ngircd 18-2 (tar) [465 kB]
받기:3 http://kr.archive.ubuntu.com/ubuntu/ precise/universe ngircd 18-2 (diff) [19.2 kB]
내려받기 485 k바이트, 소요시간 0초 (547 k바이트/초)
gpgv: Signature made 2011년 11월 18일 (금)  using DSA key ID 3FD29468
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./ngircd_18-2.dsc
dpkg-source: info: extracting ngircd in ngircd-18
dpkg-source: info: unpacking ngircd_18.orig.tar.gz
dpkg-source: info: applying ngircd_18-2.diff.gz
dpkg-source: info: upstream files that have been modified:
 ngircd-18/config.guess
 ngircd-18/config.sub
 ngircd-18/src/testsuite/Makefile.in

[링크 : http://askubuntu.com/questions/28372/how-do-i-get-the-source-code-of-packages-installed-through-apt-get]
Posted by 구차니
Linux2013. 5. 24. 09:41
fstab에 nfs 넣는건
mount로 하듯 option 항목에 -o 내용을 넣어주면 되는데
뒤에 두개 0 0 이 먼지 궁금해서 조사해보니
dumpfsck의 여부라고 한다.

근데.. nfs로 하면 remount 시도가 더 문제가 되지 않으려나?

[링크 : http://jikime.tistory.com/448]
2011/03/22 - [Linux] - fstab

Posted by 구차니
Linux2013. 3. 18. 07:41
윈도우에서 작업관리자의 '선호도 설정'과 같은 녀석이 리눅스에는 존재하지 않을까?
라는 궁금증이 들어서 검색을 해보았는데
tasket 이라는 유틸리티 형태로 존재한다.

그다지 쓸일은 없을지 모르겠지만..
process migration 등에 관심이 있음 이걸 시작점으로 검색해보면 재미난게 나올듯.

[링크 : http://insidexino.net/2757347]
[링크 : http://coffeenix.net/board_view.php?bd_code=1702]
[링크 : http://linux.die.net/man/1/taskset]

'Linux' 카테고리의 다른 글

리눅스 포팅  (0) 2013.06.19
fstab 필드 항목 내용  (0) 2013.05.24
삼성 SCX4622FK 리눅스에 설치하기  (0) 2012.10.13
삼성 프린터 리눅스 드라이버 설치하기  (0) 2012.09.25
리눅스 배포판 확인하기  (0) 2012.07.28
Posted by 구차니
Linux/Ubuntu2013. 1. 15. 09:18

$ sudo apt-get install rpm2cpio 
$ rpm2cpio [rpm 파일 이름] | cpio -idv
[링크 : http://bs-secretroom.blogspot.kr/2012/10/rpm.html

2009/11/04 - [Linux] - 설치하지 않은 rpm에 포함된 파일의 내용 보기

Posted by 구차니
Linux/Ubuntu2012. 11. 23. 10:06
업그레이드 해볼까 하고 했더니 SSH를 통해서는 위험하다고 겁주네 -_-

$ do-release-upgrade
Checking for a new ubuntu release
Done Upgrade tool signature
Done Upgrade tool
Done downloading
authenticate 'precise.tar.gz' against 'precise.tar.gz.gpg'
extracting 'precise.tar.gz'

캐시 읽는 중

패키지 관리자 확인 중

SSH를 통해 계속 진행하시겠습니까?

현재 세션은 SSH에서 돌아가고 있습니다. SSH를
이용한 세션에서 업그레이드를 하는 것은 추천하지
않습니다. 업그레이드에 실패할 경우 복구하기가
힘들어 집니다.

진행하시면 '1022' 포트로 추가 SSH데몬을 시작할
것입니다.
계속 진행하시겠습니까?

계속 [yN]
 



Posted by 구차니