Skip to main content

Posts

Showing posts from June, 2007

vsftpd restrict access

If you run vsftp as your ftp server, may be you want to config in /etc/vsftpd/vsftpd.conf To disable anonymous ftp logins, change anonymous_enable to NO [Default: YES] anonymous_enable=NO To jail some user in their home dir uncomment two following line [Default: NO] chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list and put a list of user [to be jailed] in /etc/vsftpd/chroot_list. Note that if chroot_local_user set to YES, meaning of list will be a list that not to be jailed. To jail all user in their home dir, add chroot_local_user=YES [Default: NO] chroot_local_user=YES

Desktop effects on Feisty, Cube and JAVA Swing problems

Even the "desktop effects" is just technology preview on Feisty. It still has some bugs but I like it. To enable go to System > Preferences > Destop Effects, then click "Enable Desktop Effects" button. It has two effects for now[as I known], "Windows wobble when move" and "Workspaces on a Cube". After enable it, windows wobble is work fine but not the cube effect. Notice that number of workspace will change to 1. If set it back to 2, when I change workspace[e.g. Ctrl+Alt+->] sometime it loose both panels[top and bottom] or sometime it give me blank screen[no panel,no icon] To make cube effect work open terminal and pnix@pnix-a7n:~$ gconftool-2 --type int --set /apps/compiz/general/screen0/options/hsize 4 pnix@pnix-a7n:~$ gconftool-2 --type int --set /apps/compiz/general/screen0/options/number_of_desktops 1 or use gui tool by type "gconf-editor" in terminal And navigate to: apps > compiz > general > screen0 > optio

Mount ISO, CUE/BIN, NRG, IMG, MDF files in ubuntu

I known that to mount iso file pnix@pnix-a7n:~$ sudo mount -o loop file.iso mountpoint or pnix@pnix-a7n:~$ sudo mount -o loop -t iso9660 file.iso mountpoint and for cue/bin file ,I convert it to iso first use bchunk pnix@pnix-a7n:~$ bchunk file.bin file.cue file.iso but how about the others. After some search, I collect tips to handle many types of image file in linux. For nrg [ nero image ], img [ clone cd] and mdf [ alcohol 120% ] files, We need nrg2iso, ccd2iso and mdf2iso to convert those image files to iso image. Luckily, All are in Feisty repos. pnix@pnix-a7n:~$ sudo aptitude install nrg2iso ccd2iso mdf2iso Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Building tag database... Done The following NEW packages will be installed: ccd2iso mdf2iso nrg2iso 0 packages upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 19.1kB of archiv

Your site is valued at: $136

Do you want to know the value of your website? I found this page calculate for you. My 2 months old blog, lj4newbies, was $136. wow.. How about others? www.osnews.com $4,734,127 freshmeat.net $21,656,733 slashdot.org $63,259,220 digg.com $479,965,116 www.microsoft.com $1,105,511,784 Google.com $3,138,729,453 yahoo.com $3,224,760,776

RealPlayer on Feisty

Today I try to open ptvthai.com[ the website that live broadcast rally against "council for national security" from sanamluang bangkok, uhh no politic here, Pls don't censor me ha ha ]. It needs realplayer plugin for firefox but "Plugin Finder Service" can't install it automatically. RealPlayer isn't on feisty repos yet for now and i can't wait. So to install i download RealPlayer10GOLD.bin, add execute permission and install it in $HOME/app/RealPlayer[ without sudo privileges ]. pnix@pnix-a7n:~/progdl$ wget http://forms.real.com/real/player/download.html?f=unix/RealPlayer10GOLD.bin --23:26:37-- http://forms.real.com/real/player/download.html?f=unix/RealPlayer10GOLD.bin => `download.html?f=unix%2FRealPlayer10GOLD.bin' . . Connecting to software-dl.real.com|66.203.123.22|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 5,802,563 (5.5M) [application/octet-stream] 100%[========================================

backslash, regex and replaceAll function in java

The Java String class has several methods that allow you to perform an operation using a regular expression on that string. One is replaceAll(String regex, String replacement) that take strings as arguments. Java string use the literal string "\\" for single backslash and in regular expression, the "\\" matches a single backslash too. This make [the regular expression as java string] single backslash becomes "\\\\". e.g. If you have a string "c:\test\test2\" and want to change to "c:/test/test2/", your code should look like class Bsl{ public static void main(String args[]){ String s="c:\\test\\test2"; String foreslash="/"; String regex="\\\\"; System.out.println(s.replaceAll(regex,foreslash)); } } result: [poj@mail cronprog]$ java Bsl c:/test/test2 [poj@mail cronprog]$ another example: the string "$" must be "\$" for java and again "\\$" for re

Diable ipv6 on linux???

I found this on ubuntuforums. It's about disabling ipv6 on ubuntu but should apply to every distros. Here is how to.. Make your /etc/modprobe.d/aliases look like this. alias net-pf-8 atm alias net-pf-9 x25 # 1, 2, 3 new lines alias net-pf-10 ipv6 off <<-- add alias net-pf-10 off <<-- add alias ipv6 off <<-- add #alias net-pf-10 ipv6 >>===comment the original line out alias net-pf-11 rose alias net-pf-12 decnet Anyway the method above doesn't work for me. After changing,reboot ifconfig output still had an ipv6 address and "ip a | grep inet6" output told me samething. To diable[on my machine] I change "alias net-pf-10 ipv6" to "alias net-pf-10 off ipv6"[like snowx1000 does] and ipv6 address will not show anymore. The more importance is why disable ipv6 The idea is they want to make a connection to destination faster. Someone say apps will first attempt a connection on IPv6. When this fails, they'll then switch to IPv4. It

Make sure Nvidia drivers is used by agp

After install nvidia drivers I notice that agp driver status says I use agpgart not nvidia drivers. pnix@pnix-a7n:~$ cat /proc/driver/nvidia/agp/status Status: Enabled Driver: AGPGART AGP Rate: 8x Fast Writes: Disabled SBA: Enabled pnix@pnix-a7n:~$ even nvidia module is already loaded. pnix@pnix-a7n:~$ lsmod|grep agpgart agpgart 35400 2 nvidia,nvidia_agp pnix@pnix-a7n:~$ Some old tutorials will advice you try to disable agpgart[for 2.4 kernel] but not for 2.6. From nvidia readme appendix F "On Linux 2.6, the agpgart.ko frontend module will always be loaded, as it is used by the NVIDIA kernel module to determine if an AGPGART backend module is loaded. When the NVIDIA AGP driver is to be used on a Linux 2.6 system, it is recommended that you make sure the AGPGART backend drivers are built as modules and that they are not loaded." this confirm by pnix@pnix-a7n:~$ modinfo nvidia filename: /lib/modules/2.6.20-16-gener

Converting dat to mpeg file, to burn vcd on ubuntu

Creating vcd [from dat file] on WinXP, I use "Nero Burning Rom". It can burn dat file to vcd directly. On ubuntu, AFAIK, No burning cd software to burn dat to vcd. I use k3b but it can't burn dat file. It support only mpeg-1 and mpeg-2 format. Dat file need to convert to mpeg first. Thist post will show how I install and use vcdgear to convert dat file to mpeg file. pnix@pnix-a7n:~/progdl$ wget http://www.vcdgear.com/files/vcdgear176-040415_linux.tar.gz --04:21:14-- http://www.vcdgear.com/files/vcdgear176-040415_linux.tar.gz => `vcdgear176-040415_linux.tar.gz' Resolving www.vcdgear.com... 66.98.192.104 Connecting to www.vcdgear.com|66.98.192.104|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 442,937 (433K) [application/x-tar] 100%[====================================>] 442,937 105.23K/s ETA 00:00 04:21:20 (87.02 KB/s) - `vcdgear176-040415_linux.tar.gz' saved [442937/442937] pnix@pnix-a7n:~/progdl$ tar xzf vcdgear

Fecora Core 7 release

"Fedora 7 has been released. The release features GNOME 2.18, KDE 3.5.6, fast user switching, hotplugging of display devices, a new theme, kvm, the exprimental Nouveau driver, and much more." from osnews other infomation this version will be.. -The first Fedora distribution with full Live CD/DVD capability. -Start with resizing and reading of NTFS file systems.