Software

You are currently browsing the articles from KomKid.Net matching the category Software.

Export/Import Google Chrome Extensions

เคยมั้ยที่ มีเหตุจำเป็นต้องเปลี่ยน User หรือปัญหาอื่น ๆ ที่ทำให้ต้องใช้งาน Chrome ใหม่ แต่ไม่มี Extension ที่ถูกใจตามมาด้วย
ปัญหานี้แก้ไขได้ด้วยการ Export แล้วนำมา Import ใหม่ดังนี้
1. Extensions ของ Google Chrome จะเก็บอยู่ที่ /home/user/.config/google-chrome/Default/Extensions สำหรับ Ubuntu และ C:\Documents and Settings\UserName\Local Settings\Application Data\Google\Chrome\User Data\Default สำหรับ Windows
แต่จะเห็นว่ามันไม่ได้เก็บเป็นชื่อ Extensions แต่เป็นรหัสอะไรซักอย่าง

2.ใช้คำสั่งเพื่อดูรายละเอียดของ Extensions ดังนี้
2.1 เปิดหน้า Extensions ขึ้นมา chrome://extensions/
2.2 กดปุ่ม shift+ctrl+j
2.3 ป้อน code ดังนี้

1
returnExtensionsData=function(a){var o=[];for(var i=0,e=a.extensions,len=a.extensions.length;i<len;i++){o.push({id:e[i].id,name:e[i].name});}console.log('var extdata='+JSON.stringify(o)+';');};requestExtensionsData();

2.4 จะได้ผลลัพธ์ประมาณนี้

1
2
3
4
var extdata=[
{"id":"dabddpakolmhhlcblnooeacilidlbblh","name":"Publish sync for google+ & facebook"},
{"id":"lnlgojabfogikedjanecphloghlegpdm","name":"Phone 2 Google Chrome™"},
{"id":"oadboiipflhobonjjffjbfekfjcgkhco","name":"Google Chrome to Phone Extension"}];

3.จากขั้นตอนที่ผ่านมาจะเห็นว่า id จะตรงกับชื่อ folder ที่นี้ก็ดูตรง name ซึ่งเป็นชื่อ Extension ก็ไป copy folder นั้นมา แล้วก็คลิกตรง “Load unpacked extension… แล้ว browse ไป folder ที่เรา copy มา ก็เป็นอันเสร็จเรียบร้อย

ที่มา : http://superuser.com/questions/154770/how-to-export-extensions-of-google-chrome

Written by Komkid on January 23rd, 2012 with no comments.
Read more articles on IT Tips and JavaScript and Software.

Ubuntu : Shutter add-ons

อ้าว Shutter (โปรแกรมสำหรับ capture screen) ทำไม capture แล้ว edit ไม่ได้หว่า
search ดูถึงได้รู้ว่า ขาด add-ons บางอย่างไปนี่เอง ว่าแล้วก็ติดตั้งซะเลย

1
2
apt-get install libgoo-canvas-perl
apt-get install gnome-web-photo

อันแรกเอาไว้ capture แล้ว edit ได้
อันที่สองเอาไว้ capture หน้า web page ยาว ๆ มันจะ scroll ให้อัตโนมัติ

Written by Komkid on October 20th, 2010 with no comments.
Read more articles on IT Tips and Software and Ubuntu.

Expanding the size of a virtual disk

เมื่อ OS ใน Virtual Box เต็ม จะทำอย่างไรกันดีเล่าพี่น้อง
ความจริงวิธีที่จะทำ มันไม่ตรงกับหัวข้อครับ เพราะมันไม่ใช่การขยาย แต่มันเป็นการสร้างใหม่
1.เลือก VDI Image เป้าหมายที่ต้องการขยาย

2.สร้าง VDI Image อันใหม่ให้มีขนาดที่ต้องการ
3.เพิ่ม Image อันใหม่เป็น Slave และ เพิ่ม linux Image เข้าไปใน CD สำหรับใช้ Boot ตามตัวอย่างใช้ Parted Magic

4.เปิด terminal พิมพ์ nano /proc/paritions เพื่อดูขนาด harddisk

5.ใช้คำสั่ง dd โดยสังเกตขนาดตามรูป จะโอนจาก 10G(hda) ไปเป็น 30G(hdb) ก็ใช้คำสั่ง

1
dd if=/dev/hda of=/dev/hdb

6.รอจนเสร็จแล้ว shutdown
7.สร้าง OS อันใหม่ แล้วเพิ่ม VDI Image อันใหม่ กับ image ของ Parted Magic boot อีกทีเพื่อ resize partition เพราะ image ใหม่มีขนาด 30 GB ก็จริง แต่ขนาด partition ยังเท่าเดิม

8.เสร็จแล้วก็ shutdown แล้วเอา image ของ Parted Magic ออกก็จะได้ OS ใหม่ใหญ่กว่าเดิมไว้ใช้งาน

Written by Komkid on July 22nd, 2010 with no comments.
Read more articles on Admin and IT Tips and Software and Ubuntu.

Create Screenshot from movie

Ubuntu : Totem Movie Player
1.เปิดไฟล์
2.เข้าเมนู Edit -> Create Screenshot Gallery…

3.เลือกความกว้าง สูงสุดได้ 500 pixel
4.เลือกจำนวนภาพหรือทำเครื่องหมายเพื่อให้โปรแกรมคำนวณให้ก็ได้

Windows : Media Player Classic
1.เปิดไฟล์
2.เข้าเมนู View -> Options…
3.เลือก Output เป็น VMR9 (windowed)

4.เข้าเมนู File -> Save Thumbnails…
5.ตั้งชื่อไฟล์ ชนิด จำนวนแถว ขนาด ด้านล่าง

ขอบคุณภาพประกอบจาก www.thailandtorrent.com

Written by Komkid on May 18th, 2010 with no comments.
Read more articles on IT Tips and Software and Ubuntu.

Ubuntu : Install OCS Inventory NG

OCS Inventory NG เป็น Asset Management Software แบบ Open Source สำหรับจัดการข้อมูล Hardware และ Software ในระบบเครือข่าย รองรับ Client ที่เป็น Windows, Linux, MacOS ฯลฯ

* Relevant inventory information.
* Powerful deployment system allowing to distribute software installation or scripts on computers without overloading the network.
* Web Administration Console.
* Multiple operating systems support, including Microsoft Windows, Linux, *BSD, Sun Solaris, IBM AIX, HP-UX, MacOS X.
* Lightweight bandwith usage: 5 KB for a full Windows inventory.
* High performance: about 1 000 000 of computers inventoried per day using a server bi-Xeon 3 GHz and 4 GB RAM.
* 3-Tier architecture using current standards, HTTP/HTTPS protocol and XML data formatting.
* Based on well known products such as Apache web server, MySQL database server, PHP and PERL scripting languages.
* Web service accessible through SOAP interface.
* Plugins support through API.
* …

http://www.ocsinventory-ng.org

ขั้นตอนการติดตั้งสำหรับ Server ที่เป็น Ubuntu
1.ติดตั้ง Package ที่จำเป็น

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#apache, php, mysql
apt-get install apache2
apt-get install php5 libapache2-mod-php5 php5-gd
apt-get install mysql-server
apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
 
apt-get install make
sudo aptitude install libc6-dev
 
#perl
sudo aptitude install perl libapache2-mod-perl2 libxml-simple-perl libcompress-zlib-perl libdbi-perl libapache-dbi-perl
sudo aptitude install libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl libnet-ip-perl libsoap-lite-perl
 
cpan SOAP::Lite #optional for web service

2.ติดตั้ง OCS Inventory NG Server

1
2
3
4
wget http://launchpad.net/ocsinventory-server/stable-1.3/server-release-1.3.1/+download/OCSNG_UNIX_SERVER-1.3.1.tar.gz
tar -xvzf OCSNG_UNIX_SERVER-1.3.1.tar.gz
cd OCSNG_UNIX_SERVER-1.3.1
./setup.sh

Do you wish to continue ([y]/n)? y
Which host is running database server [localhost] ? [enter]
On which port is running database server [3306] ? [enter]
Where is Apache daemon binary [/usr/sbin/apache2] ? [enter]
Where is Apache main configuration file [/etc/apache2/apache2.conf] ? [enter]
Which user account is running Apache web server [www-data] ? [enter]
Which user group is running Apache web server [www-data] ? [enter]
Where is Apache Include configuration directory [//etc/apache2/conf.d/] ? [enter]
Where is PERL Intrepreter binary [/usr/bin/perl] ? [enter]
Do you wish to setup Communication server on this computer ([y]/n)? y

Where to put Communication server log directory [/var/log/ocsinventory-server] ? [enter]
To ensure Apache loads mod_perl before OCS Inventory NG Communication Server, Setup can name Communication Server Apache configuration file ‘z-ocsinventory-server.conf’ instead of ‘ocsinventory-server.conf’. Do you allow Setup renaming Communication Server Apache configuration fileto ‘z-ocsinventory-server.conf‘ ([y]/n) ? y
Do you wish to setup Administration Server (Web Administration Console) on this computer ([y]/n)? y
Do you wish to continue ([y]/n)? y

Where to copy Administration Server static files for PHP Web Console [/usr/share/ocsinventory-reports] ? [enter]
Where to create writable/cache directories for deployement packages and IPDiscover [/var/lib/ocsinventory-reports] ? [enter]

1
2
/etc/init.d/apache2 restart
nano /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php #set username & password of mysql

3.เรียกดูได้ที่ http://localhost/ocsreports
4.คลิก send เพื่อสร้าง database จะได้ database ชื่อ ocsweb
6.เข้าใช้งานที่ http://localhost/ocsreports โดยใช้ username=admin password=admin
7.ติดตั้ง Agent สำหรับ Windows โดยใช้ตัว setup จาก http://launchpad.net/ocsinventory-windows-agent/trunk/win32-agent-release-4061/+download/OCSNG_WINDOWS_AGENT_4061.1.zip (สามารถทำ silent install ได้ด้วย)

การติดตั้ง Agent สำหรับ Windows
1. แบบ manual ใช้ตัว setup จาก http://launchpad.net/ocsinventory-windows-agent/trunk/win32-agent-release-4061/+download/OCSNG_WINDOWS_AGENT_4061.1.zip
2. แบบ deploy ผ่าน Active Directory โดยทำผ่าน Group Policy ใส่ไว้ใน Computer Configuration -> Windows Settings -> Scripts -> Startup
2.1 คลิก Show files แล้ว rename OcsLogon.exe เป็น IP เครื่อง OCS Server เอามาวางไว้ในนั้น เช่น 192.168.0.252
2.2 Add Script โดยกด Browse หาไฟล์ในข้อ 2.1
2.3 ใส่ Parameters ดังนี้

/S = Silent
/DEBUG = สร้างไฟล์ log
/NP = No Proxy
/INSTALL = Install Service Agent
/DEPLOY:4061 = ติดตั้ง Agent รุ่น 4.0.6.1
/SERVER:192.168.0.252 = ติดต่อไปที่ Server 192.168.0.252

3. เมื่อเครื่อง Client Boot ขึ้นมาก็จะติดต่อไปที่ Server เพื่อทำการ Upgrade หรือติดตั้งตัว Agent โดยดูผลลัพธ์ได้ที่ C:\OCS-NG

Written by Komkid on May 16th, 2010 with no comments.
Read more articles on Admin and Networking and Software and Ubuntu.

« Older articles

No newer articles