07 March 2012

Mengecilkan Font Xubuntu

Hari ini ada klien yang telpon karena font komputer kerjanya tiba-tiba menjadi besar-besar. Penasaran dengan kejadian tersebut langsung meluncur dan nyoba sendiri, dan memang benar font dilayar monitor jadi berubah besar sekali :(

PC Client:
OS Linux Xubuntu
desktop Xfce

Bingung juga karena baru kali ini nemu masalah kayak gini, akhirnya cari di google Alhamdulillah ketemu solusinya...

Solusi (copas aja yah):

1) Edit the file ~/.config/xfce4/Xft.xrdb:

mousepad ~/.config/xfce4/Xft.xrdb

And paste in:

Xft.dpi: 96

Save and exit.

2) Edit /etc/X11/xorg.conf:

sudo mousepad /etc/X11/xorg.conf

And paste in under Section "Files" (if it’s not there alread):

FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/100dpi"

Save and exit.

3) Configure your DPI settings in /etc/X11/xorg.conf. You can follow this guide here: http://xubuntulinux.blogspot.com/2006/07/ubuntu-set-correct-dpi-for-x-server.html.

4) Log in and out. Your fonts should now be consistent.

Sumber: http://xubuntu.wordpress.com/2006/08/09/howto-fix-xfce-fonts/

20 June 2011

Konfigurasi applet openvpn networkmanager ubuntu 9.04

Konfigurasi applet openvpn networkmanager ubuntu 9.04 sudah dilakukan dengan benar, namun koneksi tunelling untuk openvpn tidak terbentuk. Penasaran dilakukan ujicoba koneksi dengan memakai console ( sudo openvpn client.conf ) berhasil.... lalu kenapa applet gak jalan yah

Setelah googling akhirnya ketemu solusi

Ternyata perlu dilakukan editing file /etc/dbus-1/system.d/nm-openvpn-service.conf
Tambahkan baris berikut diantara dua aturan policy yang ada

  user="at_console">
own="org.freedesktop.NetworkManager.vpnc"/>
send_destination="org.freedesktop.NetworkManager.vpnc"/>
>



Sehingga menjadi


"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
>
user="root">
own="org.freedesktop.NetworkManager.openvpn"/>
send_destination="org.freedesktop.NetworkManager.openvpn"/>
>
user="at_console">
own="org.freedesktop.NetworkManager.vpnc"/>
send_destination="org.freedesktop.NetworkManager.vpnc"/>
>
context="default">
own="org.freedesktop.NetworkManager.openvpn"/>
send_destination="org.freedesktop.NetworkManager.openvpn"/>
>
>

Sumber

19 March 2011

INSTALL XML-RPC DI UBUNTU 10.10

INSTALL XML-RPC DI UBUNTU 10.10

Silahkan baca dan coba
http://wonderfuldream.tistory.com/179
https://trac.macports.org/ticket/15443

This is for those who are trying (struggling) to make XML RPC applications using C/C++ under linux (Ubuntu) platform. In fact, I've played around with a couple of open source libraries to develop C++ XML RPC server and client application last several months.

After several trials and errors, I reckon xmlrpc-c library is the ever-existing most strong and competent library for XML-RPC application development considering others don't support server side multi-threading architecture, secure authentication and authorization mechanism and many more. Honestly, I am not linux guru (at all) or whatever that you can't solely rely on this information. I strongly recommend you to have some level of openness for this jobs. Just do try and read error messages carefully.

Everything on the web is born to be quite volatile. Likewise, i am not sure how long this information last.
Any questions regarding build issues, just google it like what i did. Google JUST know everything. For this article, you could ask me directly. But, I didn't say i can answer it. ;)


1. Prerequisites

Check whether below libraries are installed on your system. Otherwise, install before you play around with xmlrpc-c lib using Ubuntu software centre.

libxmlrpc-core-c3
libxmlrpc-core-c3-dev
libxmlrpc-c3
libxmlrpc-c3-dev
libcurl3-dbg
libcurl4-openssl-dev

Last two libcurl* library becomes important if you are using this libs for xmlrpc client development. Without these two libs, sample client applications comes with library itself do not be compiled. And more importantly, make sure your platform is 32 bit version of Ubuntu. In my case, i installed Ubuntu using wubi installer.

If you just downloaded and installed via wubi, its installation default setting is 64 bit which is error-prone environment for xmlrpc-c development. If you are going to use wubi installer, rather than double-clicking it, open command and type below.

> wubi --32bit

This would force wubi to install 32 bit Ubuntu.


2. Download XMLRPC-C library

You can get xmlrpc-c library through source forge website (http://sourceforge.net/projects/xmlrpc-c/)
Via the link above you could download two types of libraries. The one is Ubuntu package (*.deb) and the other is tar ball.

I recommend you to download tarball and build yourself rather than installing package because i personally suffered package installation failure. It possibly related to some sort of dependency error - as error message means - and i couldn't resolve it. As of today (14, Oct, 2010), the latest super stable version of xmlrpc-c library is 1.06.41. You may know how to unzip tarballed file. ($tar -xvzf filename)


3. Installation

It's relatively easy if you followed from the top without any issues. It's all about configure, make and make install. For your assurance and mental health, it's always better idea to do this kind of stuffs under root account. In Ubuntu, it's sudo as you may already know. Then, it becomes like below.

$sudo ./configure
$sudo make
$sudo make install

if there is no error message when you complete above commands, then you are almost there. (congratulation!) But the reality is not that simple as always. If you encountered some error messages during configure and make. It's may be related to file linkage problem. Check /usr/local/include directory, there must be xmlrpc_client.h symbolic link file which points to xmlrpc-c/client.h. However, you might have found the symbolic linkage has broken (it's red-colored). Actually there is no such name of file(client.h) under the path of /usr/local/include/xmlrpc-c. Then you have to copy that file from somewhere else.
You can find the file(client.h) from your_download_path/xmlrpc-c-1.06.41/include/xmlrpc-c directory. Just copy the file into above directory to rebuild the link, and repeat above commands. Now check whether the build is successful using browsing your_download_path/xmlrpc-c-1.06.41/examples directory. If you can find xmlrpc_sample_add_client and xmlrpc_sample_add_server binaries, then you succeeded.


PATCH

I just installed macports and wanted to install xmlrpc-c. Curl was installed before xmlrpc-c due to another package depending on it, and still the same error as above is thrown when xmlrpc-c is being built.

A quick search on google reveals, that Gentoo and Debian have similar problems when installing xmlrpc-c against curl-7.18.1 (7.18.2 is the version macports installed)
http://bugs.gentoo.org/216139 provides a patch to solve this error (within xmlrpc-c NOT curl)
Line 1217 in lib/curl_transport/xmlrpc_curl_transport.c reads:

curl_easy_setopt(curlSessionP, CURLOPT_SSLENGINE_DEFAULT); 

needing to be corrected to

curl_easy_setopt(curlSessionP, CURLOPT_SSLENGINE_DEFAULT,1); 

As suggested by the patch from gentoo I manually changed it after xmlrpc-c failed and this solved the problem instantly, and xmlrpc-c compiled fine.
Maybe macports can supply a patch for all others?

Here's the gentoo patch in raw text, seeing as I don't know how to commit it to the ports. Note that the line needs to be changed to 1217 (aswell as adapting the version), for xmlrpc-c 1.06.11!!

--- xmlrpc-c-1.06.09/lib/curl_transport/xmlrpc_curl_transport.c.orig 2008-04-06 18:34:12.000000000 +0200 +++ xmlrpc-c-1.06.09/lib/curl_transport/xmlrpc_curl_transport.c 2008-04-06 18:34:35.000000000 +0200 @@ -1214,7 +1214,7 @@              curl_easy_setopt(curlSessionP, CURLOPT_SSLENGINE,                               curlSetupP->sslEngine);          if (curlSetupP->sslEngineDefault) -            curl_easy_setopt(curlSessionP, CURLOPT_SSLENGINE_DEFAULT); +            curl_easy_setopt(curlSessionP, CURLOPT_SSLENGINE_DEFAULT,1);          if (curlSetupP->sslVersion != XMLRPC_SSLVERSION_DEFAULT)              curl_easy_setopt(curlSessionP, CURLOPT_SSLVERSION,                               curlSetupP->sslVersion); 

regards,
-Brian



07 May 2010

KOMPILASI OPENSSH V.4.7p1 PADA FEDORA CORE 3

KOMPILASI OPENSSH V.4.7p1 PADA FEDORA CORE 3

Secara default Fedora Core 3 menyertakan paket Openssh versi lama. Update Openssh ke versi 4.7p1 dimaksudkan untuk meningkatkan masalah keamanan terutama untuk mengaktifkan pilihan "ForceCommand".

Adapun cara instalasinya:

Update zlib ke versi 1.2.5 terbaru, download paket zlib di http://zlib.net/zlib-1.2.5.tar.gz

  • # cd /usr/local/src
  • # wget -c http://zlib.net/zlib-1.2.5.tar.gz
  • # tar xzvf zlib-1.2.5.tar.gz
  • # cd zlib-1.2.5
  • # ./configure
  • # make
  • # make install

Hapus Openssh yang ada, lalu install paket openssh. Download di http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-4.7p1.tar.gz

  • # rpm -qa | grep openssh
  • # rpm -e openssh.xxxxx

Install paket openssh yang baru

  • # cd /usr/local/src
  • # wget -c http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-4.7p1.tar.gz
  • # tar xzvf openssh-4.7p1.tar.gz
  • # cd openssh-4.7p1
  • # ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-ssl-dir=/usr
  • # make
  • # make install

Ubah/Edit file "/etc/ssh/sshd_config" untuk mengaktifkan "Force Command"

Jalankan sshd dengan cara

  • # /usr/local/sbin/sshd -f /etc/ssh/sshd_config

Tambahkan di rc.local

  • # echo "/usr/local/sbin/sshd -f /etc/ssh/sshd_config" >> /etc/rc.d/rc.local

11 December 2009

Konfigurasi Wpa_suplicant

Konfigurasi Wpa_suplicant

Wpa_suplicant adalah utility di Linux untuk melakukan koneksi wireless dengan menggunakan security wpa2 personal.
Berikut ini adalah konfigurasi wpa_suplicant dan file-file yang perlu diedit

  • File /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=1
ap_scan=1
fast_reauth=1
network={
ssid="atas"
key_mgmt=WPA-PSK
proto=WPA RSN
pairwise=CCMP TKIP
group=CCMP TKIP
psk="atas"
priority=10
}

  • file /etc/sysconfig/wpa_suplicant
INTERFACES="-iwlan0"
DRIVERS="-Dwext"
OTHER_ARGS="-u -f /var/log/wpa_supplicant.log"

07 September 2009

Mounting Flsahdisk Menggunakan Label

Mounting Flsahdisk Menggunakan Label

Terkadang ada kendala ketika kita melakukan mounting flashdisk menggunakan device hardwarenya (ex: sda, sdb, sdc dst) karena posisi mereka kadang berubah-rubah.

Ada cara jitu untuk mengatasinya yaitu dengan menggunakan metode mounting berdasarkan label pada flashdisk tersebut, adapun caranya adalah sebagai berikut:
  • format flashdisk menggunakan utility mkfs.ext3

# mkfs.ext3 /dev/sda1

  • Beri label menggunakan utility tune2fs, misal akan diberikan label dengan nama senin

# tune2fs -L senin /dev/sda1

  • Buat direktori /mnt/backup, lalu coba mounting flashdisk di direktori backup dengan perintah mount

# mkdir /mnt/backup

# mount -L senin /mnt/backup

  • Cek hasilnya

Dibawah ini script singkat untuk melakukan backup

#!/bin/bash

mount -L senin /mnt/backup

cp /home/user/*.dat /mnt/backup

umount /mnt/backup

22 June 2009

CUPS: Menghapus Printer /dev/null

CUPS: Menghapus Printer /dev/null

Untuk menghapus printer cups yang punya URL:/dev/null bisa dilakukan dengan cara

  1. Stop cups daemon { service cups stop }
  2. Hapus remote cache { rm -f /var/cache/cups/remote.cache }
  3. Jalankan cups daemon { service cups start }
Selamat mencoba ....