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 구차니
파일방2013. 7. 9. 10:55


[링크 : http://pssc.egloos.com/5668498]
    [링크 : http://www.kicad-pcb.org/] 회로+PCB 아트웤
    [링크 : http://en.wikipedia.org/wiki/KiCad]

[링크 : http://sourceforge.net/projects/free-cad/] 모델링
    [링크 : http://en.wikipedia.org/wiki/Freecad]

'파일방' 카테고리의 다른 글

startrail - 일주사진 합성 프로그램  (0) 2013.08.13
웹기반 스케쥴러  (0) 2013.07.18
yaffs2 파일 시스템 열어보기(윈도우)  (0) 2013.07.04
phpfreechat  (0) 2013.02.06
ajaxchat  (0) 2013.02.06
Posted by 구차니
보안체계에서 식별자로 사용하기 위해
ip 만으로는 부족하여 mac을 도입하려고 생각중..
그런데 혹시나 해서 찾아보니 MAC 에 대한 의견이 분분한것 같다.

경찰에서는 mac은 개인정보라고 하고
다른쪽에서는 아니라고 하고..


머 솔찍히 MAC도 변경 가능하기에(조금 귀찮지만) UUID 라고 하긴 모호하지만
IP 기반에서 식별 가능한 몇 안되는 키워드이니 민감할수 밖에 없으려나?

[링크 : http://blog.daum.net/saschajin/11335]
[링크 : http://www.lawtimes.co.kr/LawNews/News/NewsContents.aspx?serial=76156]
[링크 : http://www.etnews.com/news/contents/internet/2788110_1488.html]
[링크 : http://www.lbskorea.or.kr/bbs/bbsView.php?code=bbs_dn&id=108]
[링크 : http://chanwoo.org/134]

'개소리 왈왈 > 정치관련 신세한탄' 카테고리의 다른 글

종편 투자자 목록 공개(?)  (0) 2013.07.16
한 소녀의 神風  (0) 2013.07.14
6.25  (0) 2013.06.25
NLL 관련 대화록 전문  (0) 2013.06.25
ㅋㅋㅋ 이런 유머도 또 없겠어 ㅋㅋㅋㅋ  (0) 2013.06.11
Posted by 구차니
Programming/web 관련2013. 7. 9. 08:03
는 안되는 기분인데..

서버 자체가 공유기 뒤에 있어서 인지
공유기 내부 사설망 이외에는 전부 mac을 얻어오지 못한다 ㅠㅠ

어찌보면 당연한거긴 한데..(mac은 lan에서 사용될뿐 wan에서는 ip로 하니)
웬지 억울한건 기분탓인가...?

[링크 : http://superuser.com/questions/188799/how-to-find-the-mac-address-of-a-remote-computer]

'Programming > web 관련' 카테고리의 다른 글

NoSQL  (0) 2014.04.09
w3c 규격 번역  (0) 2014.03.17
축약주소 만들기 서비스  (0) 2013.07.08
php-mobile-detect  (0) 2013.02.23
php if/else/echo  (0) 2012.11.30
Posted by 구차니
Programming/web 관련2013. 7. 8. 22:00

'Programming > web 관련' 카테고리의 다른 글

w3c 규격 번역  (0) 2014.03.17
wan 에서 mac address 얻기  (0) 2013.07.09
php-mobile-detect  (0) 2013.02.23
php if/else/echo  (0) 2012.11.30
TD 태그 - Chrome 과 IE 차이?  (0) 2011.05.30
Posted by 구차니
Programming/php2013. 7. 7. 20:21
$_SERVER[] 변수는 서버에서 관리되는 내용을 받을수 있다.
단, Mac address는 php만으로는 안되고
exec를 통해 arp 조회를 하거나 javascript의 허가 하에 받아올수 있다고 한다.


또한, REMOTE_ADDR은 proxy 사용시 제대로 표기 안되므로
HTTP_X_FORWAREDE_FOR를 써야 한다고 한다.

'REMOTE_ADDR' The IP address from which the user is viewing the current page.
'REMOTE_HOST' The Host name from which the user is viewing the current page. The reverse dns lookup is based off the REMOTE_ADDR of the user.
'REMOTE_PORT' The port being used on the user's machine to communicate with the web server.
'REMOTE_USER' The authenticated user.

If you are serving from behind a proxy server, you will almost certainly save time by looking at what these $_SERVER variables do on your machine behind the proxy.
$_SERVER['HTTP_X_FORWARDED_FOR'] in place of $_SERVER['REMOTE_ADDR']

[링크 : http://php.net/manual/en/reserved.variables.server.php]

'Programming > php' 카테고리의 다른 글

php framework / 읽을꺼리  (0) 2014.04.09
php 메뉴얼  (0) 2014.03.28
index.php가 다운받아지는 문제점 -_-  (0) 2013.02.22
php ++,-- 연산자  (0) 2012.12.03
php 간단정리  (0) 2012.11.26
Posted by 구차니
하다하다 안되서 비장의(!) 수단 적외선 카메라 ㅋㅋ

카드 정도는 뚫어버리는 위력에 깜놀 -_-a

카드로 가로막으면 이렇게!
(마그네틱 선의 적외선 차단능력은 짱짱 ㅋㅋ) 


엌ㅋ 슈발 마이아이 ㅋㅋㅋ


거리에 따라서는 5mV 까지는 올라가는데 이걸 5V로 증폭하려면 어떻게 해야하려나 ㅠㅠ


마그네틱 부분으로 막혀서 0.02mV 까지 떨어진다.


2013/07/04 - [embeded/ATmega/ATtiny (AVR)] - IR LED 수광부 ST-23G를 이용한 장난질

---
2013.07.08 추가
LM324와 EL-1K / ST-1K를 이용하는 회로도이다.
[링크 : http://blog.naver.com/jinung33/60044946859 ]
Posted by 구차니
init script에 내용이 비어있었는데
그러면.. JTAG에서 reset을 걸었을때 SDRAM interface가 disable 되기 때문인듯?
결론은.. init script를 무슨수가 있어도 찾던가 만들던가... 인가?


'하드웨어 > PalmPalm Tynux Box' 카테고리의 다른 글

Tynuxbox SDRAM 초기화 관련 내용  (0) 2013.07.27
PXA255 init script 고찰  (0) 2013.07.11
palmpalm FS 구조  (0) 2013.07.07
palmpalm = PXA255 + Intel 28F128J3  (0) 2013.07.03
tynuxbox X와 H-JTAG (wiggler / parallel)  (0) 2013.07.02
Posted by 구차니