Kamis, 16 Februari 2012

Menjalankan Power Point 2007 di LINUX

Menjalankan Power Point 2007 di LINUX

Sebelum membaca tutorial ini ada baiknya anda sudah selesai menginstall Microsoft Office 2007 pada Linux anda melalui wine, kendala setelah instalasi selesai adalah Powerpoint-nya tidak bisa berjalan sesuai harapan...

Untuk itu coba ikuti petunjuk berikut :


1. jalankan configurasi wine..


2. pada tab Libraries  tambahkan riched20 pada New Override for Library dan add


Riched20



Riched20

3. tambahkan lagi usp10 dan add


usp10
usp10

4. Pada kolom existing overrides klik riche20 dan klik edit dan centang "native (windows)"


Library Wine
Library Wine

5. sehingga hasilnya tampak seperti pada gambar..


6. klik OK


dan sekarang jalankan Power Point 2007, insyaAllah aplikasi tersebut sekarang berjalan normal.


PS : Gunakanlah software asli jangan bajakan, apabila anda tidak mampu beli software asli, gunakan software opensource  yang bebas digunakan dan gratis (tidak perlu membayar), program alternatif dari Microsoft Office adalah LibreOffice. LibreOffice adalah program opensource yang memiliki fitur yang hampir sama dengan Microsoft Office.

http://www.stisitelkom.ac.id

Menjalankan Power Point 2007 di LINUX

Edit Teks Menggunakan Vi Dalam Linux

Edit Teks Menggunakan Vi Dalam Linux

Edit Teks Dalam Putty

Ada banyak program edit teks dalam linux, salah satunya adalah "Vi".

Vi merupakan program untuk melakukan pengelolaan teks yang standar terinstall pada semua distribusi Linux. Artikel ini akan memberikan panduan bagi anda yang baru mulai menggunakan vi.

Moda Operasi Vi


Pada vi ini terdapat 2 buah moda operasi yaitu;

  • Moda Perintah / command

  • Moda Tulis


Dalam moda perintah kita dapat menjalankan perintah yang tersedia untuk mempermudah kita mengedit atau melakukan suatu aksi pada file teks yang sedang kita buka. Sementara dalam moda tulis kita dapat menambahkan atau mengurangi teks ke dalam file tersebut.

Pertama kali dibuka vi akan berjalan pada moda perintah dan siap menerima perintah yang kita berikan, contohnya dapat anda lihat dibawah.

Berikut ini akan dijelaskan juga perintah-perintah yang ada pada modus perintah didalam editor vi.

Membuka dan Menutup File Teks


Membuka file teks dengan vi dapat dilakukan melalui perintah sederhana;
vi namafile

Sementara untuk menutup file teks dapat dilakukan melalui perintah-perintah berikut;

Untuk menutup editor gunakan perintah yang terdapat didalam editor vi. Menuliskan perintah biasanya didahului dengan titik dua (:), dan diakhiri dengan <Return> atau tombol <Enter>. Berikut ini beberapa contoh perintah, perintah-perintah berikut dapat dijalankan pada moda perintah, apabila sebelumnya kita berada pada moda tulis, cukup tekan tombol Escape <Esc> untuk masuk ke moda perintah;

























PerintahFungsi
:xUntuk menyimpan perubahan dan langsung keluar dari editor vi
:qUntuk keluar dari vi, apabila ada perubahan yang belum disimpan, perintah ini tidak dapat dijalankan sebelum perubahan tersebut ditulis ke file (:w)
:wqUntuk menyimpan perubahan dan langsung keluar dari editor vi
:q!Untuk keluar dari vi dan mengabaikan perubahan yang sudah dibuat sebelumnya

Menambah, Mengubah, dan Menghapus Teks


Apabila kita ingin mengedit file, kita harus terlebih dahulu masuk ke moda tulis dan keluar dari moda perintah, berikut beberapa contoh perintah yang memungkinkan kita melakukan perubahan pada sebuah file teks;

Menambah Teks

























PerintahFungsi
iMenyisipkan teks sebelum kursor
IMenyisipkan teks sebelum kursor dan menempatkan kursor di awal baris
aMenyisipkan teks sesudah kursor
AMenyisipkan teks sesudah kursor dan menempatkan kursor di akhir baris

Perintah diatas akan aktif sampai kita menekan tombol <Esc> untuk kembali ke moda perintah.

Merubah Teks

















PerintahFungsi
rMerubah satu karakter sebelum kursor, tidak perlu diakhiri dengan tombol
RMerubah karakter dimulai dari kursor, harus diakhiri dengan tombol

Menghapus Teks

































PerintahFungsi
xMenghapus satu karakter setelah kursor
NxMenghapus sejumlah (N) karakter dimulai dari karakter setelah kursor
dwMenghapus satu kata dimulai dari karakter setelah kursor
dNwMenghapus sejumlah (N) kata dimulai dari karakter setelah kursor
ddMenghapus satu baris, baris tempat kursor berada
dNd atau NddMenghapus sejumlah (N) baris dimulai dari baris tempat kursor berada

Perintah Lain


Berikut adalah contoh perintah lain yang sering digunakan dan bisa sangat berguna dalam melakukan pengolahan file teks;

Pencarian Teks

















PerintahFungsi
/kataMencari keberadaan "kata" ke teks setelah kursor, kursor akan berhenti ke "kata" pertama yang ditemukan
?kataMencari keberadaan "kata" ke teks sebelum kursor, kursor akan berhenti ke "kata" pertama yang ditemukan

Menghitung Baris





























PerintahFungsi
:.Memeriksa kursor kita berada di baris keberapa
:=Memeriksa jumlah baris pada sebuah file teks
^g (Ctrl +g)Memunculkan keterangan nama file yang sedang kita buka, informasi baris kursor, informasi jumlah baris file, dll
:set numberMemunculkan Line Number di sebelah kiri editor
:NMeletakkan kursor ke baris ke (N) di dalam file teks

Referensi



Sabtu, 28 Januari 2012

Memulai Usaha Kuliner

Kemampuan untuk membuat makanan yang lezat tidak menjamin sebuah keberhasilan dalam membuat usaha. Mengetahui cara membuat makanan dan dapat mengelola bisnis adalah dua hal yang berbeda.

Jika anda sudah menguasai trik memproduksi masakan ataupun makanan ringan, maka kini saatnya anda harus mengetahui bagaimana caranya untuk memulai bisnis anda. Berikut tips sederhana Memulai Usaha Kuliner :

Modal

Buat daftar dari yang termahal sampai dengan yang termurah, coret yang tidak bisa dijangkau, sisakan 3 daftar modal terendah dan jadikan itu sebagai target jangka pendek anda.

 

Jenis Makanan

Tidak perlu muluk-muluk, mulai saja dari jenis makanan yang anda kuasai, misalnya anda piawai membuat kue lumpur berbagai rasa seperti lumpur telor, lumpur daging, lumpur kelapa, lumpur kentang, atau lumpur pandan. Dalami kemampuan anda tersebut.

Manajemen Waktu

Pengaturan waktu harus diperhitungkan sejak awal, seperti kapan saat belanja bahan baku, menimbang dan meracik bahan baku, menyimpannya sebelum diolah bahkan sampai pada saat mengolahnya dan mengantarnya tepat waktu sesuai dengan yang sudah dijanjikan. Ingat kepuasan hati pelanggan adalah nomor satu.

Sample Makanan

Menyertakan sample makanan diluar menu yang telah dipesan merupakan promosi terselubung yang sangat bagus, beritahu pelanggan bahwa itu merupakan bonus pesanan, sehingga di kemudian hari pelanggan dengan mudah memesan karena sudah tahu rasanya.

Tingkatkan terus kualitas

Perbaharui dan perbaiki kualitas dari masakan buatan anda. Untuk mengetahui kualitas rasa dari masakan, anda dapat membagi sampel kepada teman atau saudara tedekat untuk memperoleh reaksi mereka terhadap produk anda. Setelah itu anda perbaiki agar sesuai dengan keinginan mereka.

Jalin kerjasama

Strategi penjualan lainnya adalah anda bisa juga melakukan kerjasama dengan beberapa usaha kantin. Anda dapat mensuplai masakan setiap harinya untuk dijualkan di kantin tersebut.

Kamis, 26 Januari 2012

Simpan Data Gratis di Internet

Simpan Data Gratis di Internet


Tempat penyimpanan data di Internet bukanlah hal yang baru. Zaman sekarang sudah banyak yang menawarkan puluhan/ratusan giga byte (Gb) atau bahkan terra byte (Tb)!

Adrive, Simpan Data Gratis di Internet

Kali ini saya membahas ADrive, nama yang mungkin untuk beberapa orang akan mengingatkan pada Xdrive (sesama penyedia jasa penyimpanan data online) yang kini sudah tutup. ADrive menawarkan tike jenis akun Basic (50 GB, gratis), Signature (50 GB dengan berbagai fitur extra, $6.5 per bulan), Premium (>100GB, tergantung pihan anda & mulai dari $13.95).

Proses sign-up jika anda belum punya akun relatif sederhana & cepat. Satu hal yang saya pikir sangat bagus adalah ketika membuat password ADrive meminta anda membuat password yang cukup kuat: minimal 8 huruf & harus berisikan kombinasi hurug besar/kecil/angka. Ini menunjukkan kalau ADrive cukup memperhatikan masalah keamanan. Sayang koneksi SSL (Secure Socket Layer; dimana file dienkripsi ketika diupload/download) tidak tersedia untuk akun gratis.

Adrive mengandalkan Java Applet untuk mengupload file berbabasiskan web dan desktop software. Sayangnya cara kedua hanya dapat digunkan bagi pengguna akun non-gratis. Namun versi Java Applet ini cukup mudah digunakan, walau tampilannya yang biru glossy mungkin agak berbeda bagi pengguna awam.

tmpA145

Ketika proses upload, terdapat bar indicator proses upload.

tmpDF7E

Setelah proses upload selesai, muncul layar utama ADrive dimana anda dapat mengatur semua dokumen yang ada.

tmp4553

Satu hal lagi yang menarik, ADrive sudah melakukan kerja sama dengan Zoho. Jadi untuk dokumen office anda dapat langsung mengeditnya online (jika anda memiliki akun di Zoho). Caranya, cukup klik gambar kaca pembesar di bagian kanan nama file dan pilih Edit in Zoho.

Jika anda punya file yang ingin diberikan/dilihat orang lain, cukup klik Share & otomatis file tersebut dipindahkan ke folder My Shared Files. Dari dalam folder ini dengan mengklik icon kaca pembesar disamping nama file, anda dapat melihat URL file tersebut termasuk pilihan untuk mengirimkan file tersebut via Email.

Secara keseluruhan ADrive mudah digunakan, relatif cepat & memberikan ruang yang cukup lega untuk penyimpanan dokumen.

Alternatif lain yang saya gunakan:



Live Logs Viewer

 








ClearOS merupakan salah satu distro Linux yang cukup terkenal sebagai Firewall murah-meriah (baca: gratis). Sudah cukup banyak artikel, blog,bahkan e-book (ada juga yang berbahasa Indonesia) yang membahas ClearOS sebagai firewall, jadi saya tidak akan membahas itu disini.

Salah satu yang menarik dari ClearOS (dan hampir semua proyek OpenSource) ada kemampuan untuk dikembangkan menggunakan aplikasi tambahan atau extensi. Terdapat beberapa aplikasi yang selalu saya install pada sistem ClearOS, dan caranya cukup mudah karena sudah dibuatkan repository oleh Tim Burgess, salah seorang developer ClearOS.

Menambahkan Repo Tim

Anda harus menggunakan console ClearOS (untuk keluar dari webconsole ClearOS tekan Ctrl+Alt+F2, dan untuk kembali tekan Ctrl+Alt+F7) untuk menjalankan perintah berikut. Jika Anda menggunakan PuTTY, dapat copy perintah di bawah dan di paste menggunakan klik kanan pada prompt:
rpm --import ftp://timburgess.net/RPM-GPG-KEY-TimB.txt
wget ftp://timburgess.net/repo/clearos/5.2/os/timb-release-1-0.noarch.rpm
rpm -Kv timb-release-1-0.noarch.rpm
rpm -Uvh timb-release-1-0.noarch.rpm

Setelah repo Tim terpasang kita dapat mulai memasang aplikasi tambahannya.

Live Logs Viewer


Membaca ribuan baris file log bukan hal yang menyenangkan, apalagi yang Anda cari ada pada bagian terakhir file log Smile, belum lagi ClearOS memiliki batasan jumlah baris log yang dapat ditampilkan. Aplikasi Live Logs Viewer menampilkan 100 baris (dapat diubah) terakhir dari file log dan di update secara real-time. Sangat berguna untuk trouble-shooting system.

tmp7E01

Instalasi:
 yum --enablerepo=timb install app-livelogs 

Setelah instalasi Anda dapat melihat aplikasinya di Webconfig > Reports Menu > System > Live Logs

 

SMART Status Report


SMART merupakan singkatan dari Self-Monitoring, Analysis, and Reporting Technology dan digunakan untuk mengecek “kesehatan” hard disk Anda.

smart standard

Instalasi:
yum --enablerepo=timb install app-smart

Setelah instalasi masuk ke System Menu > Hardware > SMART

Anda juga dapat melakuka test SMART sederhana dengan aplikasi ini.

 

Bonus: Midnight Commander


Midnight Commander (atau lebih sering disingkat sebagai MC) sebenarnya bukan aplikasi spesifik ClearOS karena terdapat di semua varian *nix. Jika Anda pernah menggunakan Norton Commander (NC) di zaman DOS, maka MC akan terasa sangat familiar karena memang MC merupakan clone dari NC. Dengan MC anda dapat dengan mudah melakukan navigasi dari dalam console termasuk melakukan berbagai tipe operasi file seperti copy (F5), move (F6) dan membuat folder (F7).

Instalasi:
yum install mc

Setelah instalasi untuk memanggilnya cukup mengetik: mc

tmpF40C

Untuk berpindah dari panel kiri ke kanan cukup dengan menekan Tab pada keyboard. Untuk keluar dan kembali ke console tekan F10.

Jika tampilan mc Anda tidak rapi (banyak character aneh) ketika menggunakan PuTTY pastikan koneksi PuTTY Anda menggunakan UTF-8 (Window > Translation pilih UTF-8).

tmpEC2D


http://www.blaszta.com

 

 

 







Kamis, 19 Januari 2012

Grub Menu Burg on Ubuntu

Grub Menu Burg on Ubuntu - Community Ubuntu Documentation

Introduction


 

BURG stands for Brand-new Universal loadeR from GRUB. It's based on GRUB, and add features like new object format and configurable menu system. This page shows its usage.



Install using binary package



  • For Ubuntu 10.04 and 10.10 users, add the following PPA :


sudo add-apt-repository ppa:bean123ch/burg


  • For Ubuntu 11.04 users, add the following PPA :


sudo add-apt-repository ppa:n-muench/burg


  • Then use the following command to download and install the loader, themes and emulator:


sudo apt-get update && sudo apt-get install burg


  • During the installation, it should ask you to write the new boot loader to MBR. If you skip that step, you can later use the following command to update MBR of hd0:


sudo burg-install "(hd0)"

 

or ( FIXME ??? burg-pc package does not exist ! )



sudo dpkg-reconfigure burg-pc

 

Install using source code


 

Build from scratch


 

To compile burg project, you need to have the following software in your OS:


gcc gcc-multilib (to compile x86_64 targets from i386 os, or vice verse) bison autoconf automake gettext GNU make ruby python



Debian/Ubuntu


 

Use the following command to install them:



sudo apt-get install gcc gcc-multilib bison autoconf automake gettext make ruby python

 

OSX


 

You need to install Xcode. I've successfully compiled burg from 10.4 Tiger with Xcode 2.5, 10.5 Leopard with Xcode 3.0, and 10.6 Snow Leopard with Xcode 3.2.


The latest version of BURG depends on gettext, which is not shipped with OS. You need to install the one from macport. You also need to install autoconf and automake, as the ones in Xcode can't find gettext macro properly.


For 10.4 Tiger, bison is too old, you need to install it from macport.


Macport uses prefix /opt/local, you need to pass the following parameter in configure:



./configure CFLAGS="-I/opt/local/include" LDFLAGS="-L/opt/local/lib"

 

Windows


 

You need to install mingw32 or cygwin. ruby is not included in mingw32 so you need to install it separately.



Get Source Code


 

You need bazaar to download source from launchpad. Initial import:



bzr branch lp:burg

 

Later, you can use the following command to update to latest version from the work directory:



bzr pull

 

After fetching the code, you should run autogen.sh to regenerate the makefiles:



./autogen.sh

 

Build and install (pc)


 

Use the following commands to compile burg (assumes you're in the work directory):



mkdir bin_pc
cd bin_pc
../configure --with-platform=pc --prefix=${HOME}/burg_pc
make
make install

 

In this example, I use sub directory bin_pc to store compiled files for pc platform, this avoids generating a lot of files in the source directory, and you can have different build directories for different platform.


The prefix is used to specify a target prefix when running make install. I suggest not to use default location otherwise it could overwrite the grub2 package.


Note: new version of BURG uses gettext, and grub-mkconfig expects to find gettext.sh in the bin directory, so you need to make a symbol link:



cd ${HOME}/burg_pc/bin
ln -s /usr/bin/gettext.sh gettext.sh

 

Also, with the above prefix, the config file is at ${HOME}/burg_pc/etc/default/burg.


After the above steps, burg is installed to ${HOME}/burg_pc, you need to install it to MBR in order to use it as boot loader.


WARNING: the following step only works in Linux, don't try it in OSX or Windows.



cd ${HOME}/burg_pc/sbin
sudo ./burg-mkconfig -o /boot/burg/burg.cfg
sudo ./burg-install "(hd0)"

 

Build and install (efi)


 

The build process is quite similar to pc, just change --with-platform parameter. You also need to add --target if compile 64-bit target from 32-bit OS, or vice verse:


32-bit EFI



mkdir bin_efi32
cd bin_efi32
../configure --with-platform=efi --target=i386 --prefix=${HOME}/burg_efi32
make
make install

 

64-bit EFI



mkdir bin_efi64
cd bin_efi64
../configure --with-platform=efi --target=x86_64 --prefix=${HOME}/burg_efi64
make
make install

 

You need to generate an EFI image using burg-mkimage, for example:



cd ${HOME}/burg_efi64/bin
./burg-mkimage -o grub64.efi minicmd part_gpt part_msdos part_apple fat ext2 hfsplus hfs ntfs reiserfs xfs iso9660 udf ls search loopback linux chain reboot halt appleldr help configfile hexdump loadbios memrw fixvideo crc sh video efi_fb gfxterm font png loadcfg normal coreui gfxrgn txtrgn nmenu emenu

 

Copy grub64.efi to a location where it can be found by rEFIt. You also need to create a config file burg.cfg in the same directory as grub64.efi, for example:



menuentry "Boot OSX" {
search -s -f /usr/standalone/i386/boot.efi
chainloader /usr/standalone/i386/boot.efi
}

menuentry "Boot MBR" {
appleloader HD
}
menuentry "Boot CD" {
appleloader CD
}

 

New Menu System


 

Usage


 

To enable the new menu system, you can download the themes from:


http://groups.google.com/group/burg-devel


There are currently three themes in the files section:


theme_default.tar.gz Default themes, containing theme minimum, proto, ubuntu and winter


proto: proto.png


ubuntu: ubuntu.png


winter: winter.png


theme_sora.tar.gz Sora themes created by Evan Gillies, containing theme sora, sora/clean and sora/extended.


theme_chiva.tar.gz Chiva theme created by snolice in ubuntu cn forum, containing theme chiva.


Extract them to burg directory:



cd /boot/burg
sudo tar -xzf ~/theme_default.tar.gz
sudo tar -xzf ~/theme_sora.tar.gz
sudo tar -xzf ~/theme_chiva.tar.gz

 

Then edit burg config file, which should be /etc/default/burg if you are using the ubuntu ppa package. GRUB_THEME select the theme, and GRUB_GFXMODE sets screen resolution, for example:



GRUB_THEME=ubuntu
GRUB_GFXMODE=640x480

 

Finally, you need to generate burg.cfg with (ubuntu includes command update-burg which does exactly the same thing)



sudo burg-mkconfig -o /boot/burg/burg.cfg

 

If you decide to change the theme later, you need to rerun update-burg to update burg.cfg.






The burg.cfg for EFI mode is normally construct by hand. To enable themes, just need to append these lines at the end of burg.cfg:



set gfxmode="0x0"
set gfxfont="Unifont Regular 16"
load_config /boot/burg/ubuntu/theme.txt
menu_viewer.ext

 

The theme file defines the following hot keys:




  • e - edit the current command

  • t - edit the current title

  • c - open a terminal window

  • 2 - open two terminal window

  • F5 - mapped to ctrl-x, used to finish edit and save the result

  • F6 - move to next anchor, normally have the same function as TAB, but it is useful in cases where TAB is used for other function (such as term),

  • F8 - toggle between text and graphic mode

  • F9 - shutdown

  • F10 - reboot

  • ESC - return from popup window


The following sections describe the format of theme file in details.



Basic Structure


 

The format of theme file is quite straightforward, {} is used to start a child node, and = is used to set properties, for example:



screen {
panel {
extend = 1
valign = center
halign = center

panel {
class = frame
id = __menu__
}
}

panel {
id = __timeout__
attach_bottom = 1
width = 60%
halign = center
height = 1
progressbar {
width = 100%
height = 100%
color = "red:brown"
}
}
}

mapkey {
f5 = ctrl-x
}

 

The topmost element in a theme file defines a section, each section have a specific function. For example, screen section is used to define screen layout, while mapkey section defines key mappings.


There are two command to read theme file, load_config and merge_config:



load_config /boot/burg/default.txt

 

The difference between load_config and merge_config is that if a section already exists, merge_config merges the new section into existing one, while load_config replaces it.



Data Representation


 

The theme file is supposed to work in both text and graphic mode, so there can be multiple components packed inside a single property.



Size


 

All properties that specify size uses the following representation:



10

 

10 character size in text and graphic mode. In graphic mode, the size is calculated using system default font, which is set using gfxfont variable. Please note that width=1 and height=1 is not the same size in pixels.



10%

 

The size is 10 percentage of parent widget, in both text and graphic mode.



10/1

 

10 pixels in graphic mode, and 1 character in text mode. Either component can use the percentage notion as well, such as:



10%/20%

 

10 percent in graphic mode, 20 percent in text mode.



Color


 
red

 

Red, in both text and graphic mode.


The recognized color named is as follows:




  • black, blue, green, cyan, red, magenta, brown, light-gray - can be used as foreground or background color in text mode.

  • dark-gray, light-blue, light-green, light-cyan, light-red, light-magenta, yellow, white - can only be used as foreground in text mode.


red/blue

 

Foreground color is red, background color is blue, works in both text and graphic mode.



#808080/red/blue

 

Use #808080 in graphic mode, foreground color red, background color blue in text mode.


Widgets become selectable if there is associated command. In this case, you may want to use different color when the widget is in selected state, this can be achieved by joining two color together with ":":



cyan/blue:light-gray/blue

 

When the widget is selected, foreground color is light-gray, otherwise it's cyan. Background color is blue in both situation.



Image


 
,,blue,#0

 

Draws a blue rectangle box, in both text and graphic mode.



,,blue,c

 

Draws a blue rectangle box using fill character 'c', in both text and graphic mode.



,,blue,#0x250F

 

Draws a blue rectangle box, using unicode glyph 0x250f as fill character, in both text and graphic mode.



/splash.png,,blue,#0

 

Draws image /splash.png in graphic mode, blue rectangle box in text mode, you can also specify a fill character.



/splash.png,,blue

 

Draws image /splash.png in graphic mode, nothing in text mode.



/splash.png

 

Same as above, but uses default scaling method and background color.



none,,blue,#0

 

Draws blue rectangle box in text mode, nothing in graphic mode.


In the above examples, the second parameter are all empty, it specify the scaling method of images, and can use one of the following value:




  • scaling (default) - scale the image to fit the width/height of widget.

  • center - draw the image at the center

  • tiling - repeat the image until it fills the area.

  • minfit - keeps ratio scaling, it ensures the entire image is shown, but it can leave blank at top/bottom or left/right.

  • maxfit - keeps ratio scaling, it ensures no blank is left, but the image can be truncated at top/bottom or left/right.


For drawing methods that leaves blanks (center and minfit), it uses the color in third parameter as background.


Just like color, you can joined two image together using ":" to specify different image when the widget is selected.



,,cyan/blue,#0x250F:,,light-gray/blue,#0x2554

 

Common Properties


 

Some properties are shared by all widgets. This includes properties used by layout manger, command, anchor and class.



Layout manager


 

You can place a widget in one of two ways. You can set its location directly, or you can let the layout manager figure it out for you.


For absolute positioning, you can use the following properties:




  • attach_top - distance to the top border of parent

  • attach_bottom - distance to the bottom border of parent

  • attach_left - distance to the left border of parent

  • attach_right - distance to the right border of parent

  • attach_hcenter - offset from the horizontal central line

  • attach_vcenter - offset from the vertical central line


If none of the above properties are set, layout manager would try to calculate the position of widget for you. You can control its placement using these properties:




  • extend - if set to 1, extend the widget in the direction of parent.

  • valign - can be top, center, bottom or extend (default).

  • halign - can be left, center, right or extend (default).


The parent widget uses the following properties to control the placement of children:




  • direction - The direction, its value can be top_to_bottom (default), bottom_to_top, left_to_right or right_to_left.

  • space - The space left between two children.


You can also set the size of widget with these properties:




  • width - width of widget

  • height - height of widget


If one of the above properties is not set, layout manager would try to calculate the width/height for you, which is normally the minimum size to contain its children, although it can also be expanded using the extend property mentioned above.


Sometimes you want the layout manager to calculate the size for you, but you don't want the widget to because too large or too small. In this case, you can use the following properties to limit the size of auto calculated widgets:




  • min_width - minimum width of widget

  • max_width - maximum width of widget

  • min_height - minimum height of widget

  • max_height - maximum height of widget


Please note that these properties have no effect if the size is set explicitly using width/height property.



Command


 

The command property associate action for current widget. Once it's set, the widget become selectable, navigation keys like up/down/left/right jumps to the next widget with command property set, and enter key execute the command.


To specify multiple commands to run in this property, use '\n' as separator. For example:



command = "chainloader +1\nboot"

 

Anchor


 

Sometime you need to group some widgets together. For example. when navigating inside a menu, you may want to loop back to the last item when using the previous key on the first item. This can be archived by setting anchor to 1 in the parent widget. Key like tab jumps to the next selectable widget in another anchor, so it can be used to switch between different menus.



Class


 

Many widgets share the same property value. For example, we need to draw a rectangle box in many occasion, such as in menu, sub menu, terminal window, etc. Instead of duplicate the same set of properties many times, we can give it a name using the class property, the real property is set in the class section.


If class property is not set, it would try to locate default properties using widget name.



screen {
panel { class = frame }
panel { class = frame }
}

class {
frame {
top_left = ",,cyan/blue,#0x250F:,,light-gray/blue,#0x2554"
top = ",tiling,cyan/blue,#0x2501:,,light-gray/blue,#0x2550"
top_right = ",,cyan/blue,#0x2513:,,light-gray/blue,#0x2557"
left = ",tiling,cyan/blue,#0x2503:,,light-gray/blue,#0x2551"
right = ",tiling,cyan/blue,#0x2503:,,light-gray/blue,#0x2551"
bottom_left = ",,cyan/blue,#0x2517:,,light-gray/blue,#0x255A"
bottom = ",tiling,cyan/blue,#0x2501:,,light-gray/blue,#0x2550"
bottom_right = ",tiling,cyan/blue,#0x251B:,,light-gray/blue,#0x255D"
}

screen {
background = ":,,blue,#0"
}
}

 

Widgets


 

Widget is the basic element to construct the user interface. There are several widgets, each have a set of properties to control its behavior.



panel


 

Panel is a container for other widgets. You can set the border for panel. There are four set of border properties, from outward to inward:




  • padding_size, padding_top, padding_bottom, padding_left, padding_right - This is the most outward layer of empty strip for panel, padding_size set the default value for all four borders, you can overwrite specific size with property like padding_top.

  • border_color, border_size, border_top, border_bottom, border_left, border_right - The second layer, consists of solid color.

  • top_left, top, top_right, left, right, bottom_left, bottom, bottom_right - The third layer, consist of 8 images.

  • margin_size, margin_top, margin_bottom, margin_left, margin_right - The most inward layer, an empty strip to prevent children widgets from getting too closed to borders,

  • background - Background image. This includes the space reserved by margin_*.


screen


 

screen is the topmost widget. It's just like panel, but it doesn't have a external border so it only uses property margin_* and background.



text


 

Text is a widget to show single line of text. It has the following properties:




  • text - The string to show

  • gfx_text - The string to show in graphic mode, if it's not set, both text and graphic mode shows the same text.

  • color - Text color

  • font - Text font


image


 

Image is a widget to show a single image, Property:




  • image - The image to show


edit


 

Edit is a widget to show a edit box. Properties:




  • max_lines - The maximum number of lines to store. max_lines=1 means single line edit. max_lines=0 means unlimited lines. If it's not set, default value 100 is used.

  • lines - The number of lines to show in screen. This is used to calculate the height of widget, so don't mix it with height property.

  • columns - The number of columns to show in screen. This is used to calculate the width of widget, so don't mix it with width property.

  • text - The initial text. You can set multiple lines of using the \n separator.

  • color - Text color.

  • font - Text font.


In the edit widget, use ctrl-x to save the current edit and returns, ESC to cancel.



term


 

Terminal emulator, it shares properties with edit widget.



password


 

Password is a single line edit widget, but unlike edit, it shows * instead of the real input character. It uses properties columns, color and font.



progressbar


 

This is used to show the process bar before timeout is reached. Property:




  • color - The color of progress bar. First component is the color for passed time bar, and second component is for remaining time bar. If there is not second component, only the first bar is visible.


circular_progress


 

Same as the progressbar, but a circle instead of a bar. Properties:




  • tick - the image/colors to use to use for each progress tick around the circle

  • background - the image to use as the background of the circle (note, to make the ticks appear outside the background image, there needs to be a transparent border on the background image.)

  • num_ticks - the number of ticks to draw around the circle. Between 0 and 100. default: 24

  • start_angle - sets the starting location of the ticks. 90 degrees is the top. between 0 and 360. default: 0

  • clockwise - set this to 1 to make the ticks rotate clockwise. default: 0 (counter-cockwise)


Template


 

Template is used to define composite component. For example:



dialog_hello {
panel {
parameters = "text=text.text"
class = frame
text {}
}
}

 

The property parameters defines the mapping between parameters and internal properties. This template accepts one parameter text, which is mapped to the text property of text widget.


Some template are used internally so they must be defined in the theme file:




  • dialog_message - shows a dialog box with single text message. Must accepts text parameter which is the content of the text.

  • dialog_password - shows a password input dialog. Must accepts username and password parameter which mapping to the username and password input text.

  • template_submenu - Template used to generate sub menus.

  • template_menuite - Template used to generate the boot menu items. Must accepts title and class parameter.


Here are the definition of these templates in the default theme file:



dialog_message {
panel {
parameters = "text=text.text"
class = frame
margin_size = 1
margin_bottom = 0
space = 1
attach_hcenter = 0
attach_vcenter = 0
text {}
panel {
class = frame
command = true
halign = center
margin_left = 1
margin_right = 1
text { text = OK }
}
}
}

dialog_password {
panel {
parameters = "username=__user__.text:password=__pass__.text"
class = frame
margin_size = 1
margin_bottom = 0
attach_hcenter = 0
attach_vcenter = 0

panel {
direction = left_to_right
space = 1
text {
extend = 1
valign = center
text = Username
}
panel {
class = frame
margin_left = 1
margin_right = 1
edit {
id = __user__
max_lines = 1
}
}
}

panel {
direction = left_to_right
space = 1
text {
extend = 1
valign = center
text = Password
}
panel {
class = frame
margin_left = 1
margin_right = 1
password {
id = __pass__
}
}
}

panel {
class = frame
command = true
halign = center
margin_left = 1
margin_right = 1
text {
text = OK
}
}
}
}

template_submenu {
panel {
class = frame
}
}

template_menuitem {
panel {
parameters = "class=image.class:title=text.text"
class = select
direction = left_to_right
image {}
text { valign = center }
}
}

 

This theme pop up the sub menu alongside parent, if you prefer to show the sub menu full screen, you can replace template_submenu with this:



template_submenu {
panel {
width = 100%
height = 100%

panel {
id = __child__
class = frame
valign = center
halign = center
extend = 1
}
}
}

 

Here, the widget with id child is the place to insert auto generated (using template_menuitem) sub menu items.


You can control the placement of popup submenu using the popup property, for example:



screen {
panel {
id = __menu__
popup = left
}
}

template_submenu {
panel {
class = frame
popup = right
}
}

 

The values can be:




  • left, right, top, bottom - the position of popup submenu related to the current selected widget.

  • abs - Absolute position, submenu starts at (0, 0).


The popup is not set, menu system tries to decide popup position automatically,


With template, the screen section is very simple:



screen {
panel {
extend = 1
valign = center
halign = center

panel {
class = frame
id = __menu__
}
}

panel {
id = __timeout__
attach_bottom = 1
width = 60%
halign = center
height = 1
progressbar {
width = 100%
height = 100%
color = "red:brown"
}
}
}

 

The widget with id menu is the place to insert auto generated top level menu items defined with menuentry statement in grub.cfg. The widget with id timeout is used for timeout control. When auto booting is paused by key press, widget with id timeout and all its children would be hidden.

%0

Easy Picture Resize in Ubuntu

Nautilus Image Converteris a plugin or extension for Ubuntu‘s file manager that lets you quickly and easily resize and rotate image files. Once installed, all you have to do is right-click a picture file, or a group of them, and choose either “Resize Images…” or “Rotate Images…“.

In the Resize Images dialogue you can choose from predefined sizes via “Select a size:” (96×96 & 128×128 for thumbnails or avatars, as well as wallpaper dimensions for older 4:3 screen resolutions 640×480, 800×600, 1024×768 & 1280×960), “Scale:” it to a certain percentage, or choose your own “Custom size:“.

You will note that for “Append” the default is to save these altered images as copies with .resized added to the file name. You can choose “Resize in place” instead, but note that this overwrites the original, so use with caution.


With the Rotate Images dialogue, you can choose from 3 predefined angles via “Select an angle:“, being 90° clockwise, 90° counter-clockwise and 180°. If you need a bit more precision than that, just define your own angle with “Custom angle:“.

Like the resizer, the default behaviour is to save the output as a copy, this time with .rotated appended to the file name, though you can choose ”Rotate in place” to overwrite the original.


This handy little plugin is installed very easily via Synaptic, but even quicker is to enter the following into a terminal:

sudo apt-get install nautilus-image-converter

The image converter options will be available in the context menu after a reboot, or you can log out and back in again if you want the changes to take effect immediately.

°ºÒθÓº°


Click here for more Nautilus Extensions!

Guide to Customising & Enhancing Nautilus