2011年10月13日 星期四

Set up FreeNX with LXDE on Arch Linux

1. install poptop server
pacman -S pptpd
2. edit the configuration file
vim /etc/pptpd.conf
--

option /etc/ppp/pptpd-options
localip 172.16.1.254
remoteip 172.16.1.1-253
localip is ip of pptp server
remoteip is the ip range which vpn client will get from

3. edit /etc/ppp/pptpd-options
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 168.95.1.1
ms-dns 168.95.192.1
require-mppe-128 enables encryption
ms-dns is dns server address

4. start pptp server
/etc/rc.d/pptpd start
5. add username and password to /etc/ppp/chap-secrets for ppp authentication
<username>     pptpd     <password>   *
6. make your iphone be a pptp client, General -> Network -> VPN -> Add a VPN -> PPTP
then fill all required fields and save

7. turn on VPN then you'll see the timer start timing

2011年5月17日 星期二

Set up PPTP VPN between Arch Linux and iPhone

1. install poptop server

pacman -S pptpd

2. edit the configuration file

vim /etc/pptpd.conf
--

option /etc/ppp/pptpd-options
localip 172.16.1.254
remoteip 172.16.1.1-253

localip is ip of pptp server
remoteip is the ip range which vpn client will get from

3. edit /etc/ppp/pptpd-options

name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 168.95.1.1
ms-dns 168.95.192.1

require-mppe-128 enables encryption
ms-dns is dns server address

4. start pptp server

/etc/rc.d/pptpd start

5. add username and password to /etc/ppp/chap-secrets for ppp authentication

<username> pptpd <password> *

6. make your iphone be a pptp client, General -> Network -> VPN -> Add a VPN -> PPTP
then fill all required fields and save

7. turn on VPN then you'll see the timer starts to timing

2011年3月27日 星期日

Adding Static ARP on Windows 7

1. run cmd as administrator

2.

netsh

3. switch to interface/ipv4 subtree

interface ipv4

4. store=persistent will make it load this entry automatically at every boot

add neighbors "InterfaceName" "IP" "MAC" store=persistent

2011年3月23日 星期三

Connect Nokia Phone as USB Modem without PC Suite on Windows

1. install nokia cable drivers from http://nds1.nokia.com/files/support/global/phones/software/Nokia_Connectivity_Cable_Driver_eng.msi then connect your phone

2. Device Manager -> Modems -> Nokia Phone -> Properties -> Advanced -> Extra Initialization Commands -> +CGDCONT=,,"APN"
# APN of chunghwa telecom = internet

3. add a new dailup network, type *99# into dail no. and leave the rest blank

4. you can also uncheck "prompt for name and password" in properties because it is unnecessary

2010年12月22日 星期三

Home & End don't work when login to OpenSUSE 11.2 with Putty

solution is to edit /etc/inputrc

136c136
< $if term=xterm
---
> #$if term=xterm
169c169
< $else
---
> #$else
181c181
< $endif
---
> #$endif

Start services at boot on OpenSUSE

start a service

insserv <service>

stop a service from starting

insserv <service>

to see in which runlevels a service script is invoked

chkconfig -l <service>

2010年5月23日 星期日

iMon VFD on Arch Linux

1. you have to install lirc which provides kernel module ( driver ) support for soundgraph imon devices

pacman -S lirc

2. use the command, modinfo, to find out all parameters of a module

modinfo lirc_imon
--

filename: /lib/modules/2.6.33-ARCH/kernel/drivers/misc/lirc_imon.ko
..
..
parm: debug:Debug messages: 0=no, 1=yes(default: no) (int)
parm: display_type:Type of attached display. 0=autodetect, 1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect) (int)
..
..

3. create a module setting for imon vfd

vi /etc/modprobe.d/lirc_imon.conf
--

options lirc_imon display_type=1

4. enable lirc_imon module

modprobe lirc_imon

after that, my linux created two device files, /dev/lirc0 /dev/lcd2

5. copy correct remote setting to /etc/lircd.conf, my model is imon pad

cp /usr/share/lirc/remotes/imon/lircd.conf.imon-pad /etc/lircd.conf


6. start lirc daemon

/etc/rc.d/lircd start


7. install LCDproc in AUR

yaourt lcdproc

8. edit server configuration file, /etc/LCDd.conf

vi /etc/LCDd.conf
--

..
..
Driver=imon
..
..
[imon]

# select the device to use
Device=/dev/lcd2

# display dimensions
Size=16x2
..
..

9. start lcdproc server daemon

/etc/rc.d/lcdd start

10. edit client configuration file, /etc/lcdproc.conf

vi /etc/LCDd.conf
--
# address of the LCDd server to connect to
Server=localhost

# Port of the server to connect to
Port=13666

# set reporting level
ReportLevel=7

# report to to syslog ?
ReportToSyslog=false

# run in foreground [default: false; legal: true, false]
#Foreground=true

# PidFile location when running as daemon [default: /var/run/lcdproc.pid]
#PidFile=/var/run/lcdproc.pid

# slow down initial announcement of modes (in 1/100s)
#delay=2

# display name for the main menu [default: LCDproc HOST]
#DisplayName=lcdproc


## screen specific configuration options ##

[CPU]
# Show screen
Active=True
OnTime=1
OffTime=2
ShowInvisible=false


[Iface]
# Show screen
Active=True

# Show stats for Interface0
Interface0=eth0
# Interface alias name to display [default: ]
Alias0=LAN

# Show stats for Interface1
#Interface1=eth1
#Alias1=WAN

# Show stats for Interface2
#Interface2=eth2
#Alias2=MGMT

# for more than 3 interfaces change MAX_INTERFACES in iface.h and rebuild

# Units to display [default: byte; legal: byte, bit, packet]
unit=bit

# add screen with transferred traffic
#transfer=TRUE


[Memory]
# Show screen
Active=True


[Load]
# Show screen
Active=True
# Min Load Avg at which the backlight will be turned off [default: 0.05]
LowLoad=0.05
# Max Load Avg at which the backlight will start blinking [default: 1.3]
HighLoad=1.3


[TimeDate]
# Show screen
Active=True
# time format [default: %H:%M:%S; legal: see strftime(3)]
TimeFormat="%H:%M:%S"
# date format [default: %x; legal: see strftime(3)]
DateFormat="%x"


[About]
# Show screen
Active=false


[SMP-CPU]
# Show screen
Active=false


[OldTime]
# Show screen
Active=false
# time format [default: %H:%M:%S; legal: see strftime(3)]
TimeFormat="%H:%M:%S"
# date format [default: %x; legal: see strftime(3)]
DateFormat="%x"


[BigClock]
# Show screen
Active=false


[Uptime]
# Show screen
Active=false


[Battery]
# Show screen
Active=false


[CPUGraph]
# Show screen
Active=false


[ProcSize]
# Show screen
Active=false


[Disk]
# Show screen
Active=false


[MiniClock]
# Show screen
Active=false
# time format [default: %H:%M; legal: see strftime(3)]
TimeFormat="%H:%M"


# EOF

11. run lcdproc as root because of the permission of default PidFile location

sudo lcdproc

12. various clients were made for different displays dimensions so the only way is modify the source code if you want to make a client fit for your lcd