Loading Search...

Thursday, June 07, 2012

cygwin/x to x-win32

there're some x-win32 apps out there...
some are freeware and some donationware

introducing...
the free and opensource cygwin/x stripped down to under 20meg.
no install. just unzip and run.

get it here, while still hot...
http://wiki.dennyhalim.com/xwin


-- tips & tricks on computers and gadgets denny on IT ; let's doIT documenting the brain

Samba Full Audit with Super Fast Logging

usually, if/when you enable samba audit module, you will feel significant drop in performance, especially when your share folder simultaneously accessed by many users.

to have full audit logging without performance degradation, you will need a very fast write to log folder/partition. and what is faster than RAM?

so, we mount RAM to be used as our samba logging, put this line into /etc/fstab
tmpfs  /sambalog  tmpfs  defaults,noexec,nosuid,nodev  1 0

now, we tell samba and syslog to write their log to /sambalog:
# this line into /etc/syslog.conf
user.*;user.!warn /sambalog/fullaudit.log

#and this line into /etc/samba/smb.conf
log file = /sambalog/smbd.log

then, restart samba & syslog:
service smb restart
service syslog restart

now, watch /sambalog grows and feel the performance boost.

wait...
what the heck we do logging for if everything's gone on next boot!

ok, let's get back those logs from RAM:
# cat /etc/cron.d/logbak
*/5 * * * *  root zip -ru "/var/log/bak-$(date +%d).zip" /sambalog

all logs will be zipped back to hdd for safe keep.


-- tips & tricks on computers and gadgets denny on IT ; let's doIT documenting the brain

Sharing Scanner over Network from Centos

first, install xsane and all dependencies to use scanner
yum install xsane

check to see if your scanner detected
scanimage -L


for epson, you might need to install latest driver from here:
http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX


test scan
scanimage --format tiff > gambar.tiff

if everything works, install xinetd and set it to start saned
# yum install xinetd

# cat /etc/xinetd.d/saned
service sane-port
{
   port = 6566
   socket_type = stream
   server = /usr/sbin/saned
   user = root
   group = root
   wait = no
}

# cat /etc/sane.d/saned.conf
localhost
192.168.0.0/24

change saned.conf to match you network subnet.
for security, you might want to change which user and group saned run as.

start it up:
chkconfig xinetd on
service xinetd restart

scan from windows, over network:
first download: http://sanetwain.ozuzo.net/#download
extract to new folder and run ScanImage.exe
enter you linux ip address into the hostname and click OK.

now you can use your scanner over network.

-- tips & tricks on computers and gadgets denny on IT ; let's doIT documenting the brain