Install Phalcon PHP framework in openSUSE

Phalcon is a web framework implemented as a C extension offering high performance and lower resource consumption”. From the benchmark page, “The compiled nature of Phalcon offers extraordinary performance that outperforms all other frameworks measured in these benchmarks”. Personally i find it very easy to work with, less dirs and files for the project. And it’s documentation is quite organized and useful. Installation in Linux distros is quite easy for most of the parts. Let’s install in openSUSE 12.3 and 13.1. 1st of all let’s thank Mariusz Łączak for his useful work to provide repositories. Fire up a terminal and become root by su – .

If you are on openSUSE 12.3, add this repo:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”2″ tab_size=”4″]

zypper ar -f http://download.opensuse.org/repositories/home:/mruz/openSUSE_12.3/ Phalcon

[/cc]

For openSUSE 13.1:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”2″ tab_size=”4″]

zypper ar -f http://download.opensuse.org/repositories/home:/mruz/openSUSE_13.1/ Phalcon

[/cc]

zypper-add-repo-phalcon

Refresh the repos:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”2″ tab_size=”4″]

zypper ref

[/cc]

It will ask for the key to trust for the new repo, just type a to trust always. We are almost there.

Before installation of phalcon, we need to make sure that these dependencies are installed: mbstring, mcrypt, opensll, pdo/MySQL

If not, no worries install it by using this command:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”2″ tab_size=”4″]

zypper in php5-mbstring mcrypt openssl php5-pdo

[/cc]

Time to install phalcon:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”2″ tab_size=”4″]

zypper in php5-phalcon

[/cc]

And that’s it, but before jumping to your web dir to start a demo project, restart apache:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”2″ tab_size=”4″]

systemctl restart apache2.service

[/cc]

Phalcon documentation are self explanatory and easy to follow. Start here for a test project.

Upgrade to KDE 4.10 in openSUSE 12.2

KDE 4.10 is out and some users waited for it eagerly might had already updated to it, but if not yet it’s time to upgrade.

http://kde.org/announcements/4.10/

plasma-tasks
This how to will cover openSUSE 12.2, there are no repos for 12.1 at the time of writing this.
Open terminal, become root by su –  and type to add the following repos.
Before adding the repos, please disbale the other KDE repos like KDE 4.9 etc.

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”6″ tab_size=”4″]

zypper ar -f http://download.opensuse.org/repositories/KDE:/Release:/410/openSUSE_12.2/ KDER410
zypper ar -f http://download.opensuse.org/repositories/KDE:/Extra/KDE_Release_410_openSUSE_12.2/ KDE-ExtraR410

[/cc]

Now run ref to refresh the repos:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”4″ tab_size=”4″]

zypper ref

[/cc]

Upgrade by either:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”4″ tab_size=”4″]

zypper dup

[/cc]

OR

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”4″ tab_size=”4″]

zypper dup –from KDER410
zypper dup –from KDE-ExtraR410

[/cc]

And that’s it.

Install xscreensaver for Gnome 3.6 in openSUSE 12.2

By default Gnome screen saver is a black screen and a very annoying one trust me. Most of it’s functions will not work like goes to sleep mode every 1 or 2 minutes. Yes, i did modify it to my best but at the end i give up on it and installed xscreensaver. If you go to YaST and install it from there, it will ask you to remove gnome-screensaver, just accept to uninstall and install xscreensaver OR fire up a terminal and become root by su – , type:

zypper in xscreensaver

After installation open a new tab in terminal by Shift+Ctrl+T [Gnome 3.6]. Type:

xscreensaver-demo

Edit it to your taste or even disable it completely as i did.

Xscreensaver

Now a little bit tweak to start it on each boot. Type this as normal user in terminal OR Alt+F2:

gnome-session-properties

Click add button, give it any name you want, any comment you would like and paste this command in the Command text box:

[cc lang=”php” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”true” lines=”40″ tab_size=”4″]
xscreensaver -nosplash
[/cc]

Click add button and done.

Gnome session properties [Startup Apps]

That’s it. Enjoy!

Install Conky in openSUSE 12.2 Gnome 3.6

I will not go to any details what conky is, but in short “Conky is a program which can display arbitrary information”. Read more about conky here.

In this specific article i will show you how to install conky and use different themes to customize it in openSUSE 12.2 Gnome 3.6. You can try it in other desktops and distributions too.
1st of all lets install conky, become root in terminal by su – and type:

zypper in conky conky-cairo

We are all set to use conky now. By default you will see very basic information while running with minimal theme and customization. We will try this conky theme . As you can see in the screenshot, it’s conky lua. I have did slight modifications for my taste, will post the code if some one want to use the modified version.

Conky with conky lua theme

Download it from the above link. Extract the archive and you will see more archives inside, extract which one suites your taste. Inside every archive there will be these files: conkyrc, conky_ring.lua and image for each distro.
Create a folder in home [/home/username/.conky] dir named .conky and copy the conky_ring.lua file and the image. Rename conkyrc to .conkyrc and copy it to home dir. Change username to your username. We are almost there. Now if you run it in terminal by:

conky -c ~/.conkyrc

You will probably not see anything in Gnome shell 3.6, because of the own_window_type. If that’s the case, open .conkyrc file and look for own_window_type, change override to normal and restart conky. Also make sure that own_window is set to yes.

How to start it upon system boot:
1st of save the following code as .start_conky in your home dir:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”true” lines=”40″ tab_size=”4″]
#!/bin/sh
sleep 10
conky -d -c ~/.conkyrc
exit
[/cc]

It will fire up conky after 10 seconds of delay.

Conky with start script

Now fire up terminal OR Alt+F2, type:

gnome-session-properties

Click add button, give it any name you like, write a comment if you wish to and then click on browse button, go to your home dir and search for .start_conky, Use Ctrl+H to show hidden files. Click Add and done.

If you like to use my modified version. Just open .conkyrc file and paste the following code:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”90″ tab_size=”4″]
# Conky settings #
background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
#imlib_cache_size 0

temperature_unit fahrenheit

# Window specifications #

own_window_class Conky
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

border_inner_margin 0
border_outer_margin 0

minimum_size 250 250
maximum_width 250

alignment tr
gap_x 45
gap_y 55

# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# Text settings #
use_xft yes
xftfont caviar dreams:size=8
xftalpha 0.5

uppercase no

temperature_unit celsius

default_color FFFFFF

# Lua Load  #
lua_load ~/.conky/clock_rings.lua
lua_draw_hook_pre clock_rings

TEXT
${voffset 8}${color FF6600}${font caviar dreams:size=16}${time %A}${font}${voffset -8}${alignr 50}${color FFFFFF}${font caviar dreams:size=38}${time %e}${font}
${color FFFFFF}${voffset -30}${color FFFFFF}${font caviar dreams:size=18}${time %b}${font}${voffset -3} ${color FFFFFF}${font caviar dreams:size=20}${time %Y}${font}${color FF6600}${hr}
${voffset 140}${font caviar dreams:size=10}${alignr}HOME${font}
${font caviar dreams:size=12}${color FFFFFF}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WSAP temperature temperature 30} °C${font}

${color FFFFFF}${goto 25}${voffset 35}${cpu cpu0}%
${color FF6600}${goto 25}CPU
${color FFFFFF}${goto 50}${voffset 23}${memperc}%
${color FF6600}${goto 50}RAM
${color FFFFFF}${goto 75}${voffset 23}${swapperc}%
${color FF6600}${goto 75}Swap
${color FFFFFF}${goto 100}${voffset 25}${fs_used_perc /}%
${color FF6600}${goto 100}Disk
${color FFFFFF}${goto 125}${voffset 25}${downspeed wlan0}
${color FFFFFF}${goto 125}${upspeed wlan0}
${color FF6600}${goto 125}Net

# SYSTEM #
${color FF6600}${font caviar dreams:size=9}Linux: ${color FFFFFF}${kernel} kernel
${color FF6600}${font caviar dreams:size=9}Uptime: ${color FFFFFF}${uptime_short}
${color FF6600}${font caviar dreams:size=9}Processes: ${color FFFFFF}${processes}
${color FF6600}${font caviar dreams:size=9}Running: ${color FFFFFF}${running_processes}
[/cc]

One more thing, you would wish to use your city for weather, go to this site and choose your country under International Weather Conditions , get the code and paste in .conkyrc file this line:

[cc lang=”bash” escaped=”true” nowrap=”false” noborder=”true” line_numbers=”false” lines=”90″ tab_size=”4″]
${font caviar dreams:size=12}${color FFFFFF}${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ WSAP temperature temperature 30} °C${font}
[/cc]

Weather for conky

I also tried gotham theme, it’s clean and simple.
Setting it up is the same like conky lua. Download it from the link above and extract. There will be only one file .conkyrc. If you wana try it, stop conky {In terminal:[pidof conky, kill pidof]}, rename the conky lua .conkyrc file to some thing else and copy gotham .conkyrc file to home dir. Start it in terminal with: conky -c ~/.conkyrc and you will see the changes.

So that’s it for now, have fun with openSUSE and Conky. 🙂

KDE 4.9 is OUT, How to upgrade in openSUSE

Kde team proudly announced the new release of KDE plasma workspace and platform with new features and improvements. Some of the noticeable features include Dolphin File Manager, Konsole X Terminal Emulator, Activities, and the KWin Window Manager. If you are openSUSE user with KDE desktop, you will be interested to update to this new release.

Read the announcement for new features and improvements.

kde49-desktop

If you want to upgrade your openSUSE machine to this new release, this will be quite simple if you previously did any upgrading process. But no worries, i will make it simple if you did not upgrade before even. Before adding the repos below, please make sure that you had disabled other KDE repos like 4.8 or 4.7 etc.

1- Open YaST -> software repositories and add the following repos for you openSUSE box:

openSUSE 12.1:

http://download.opensuse.org/repositories/KDE:/Release:/49/openSUSE_12.1/

http://download.opensuse.org/repositories/KDE:/Extra/KDE_Release_49_openSUSE_12.1/

2- From here on, you can follow two steps to upgrade, either by YaST software management by switching the packages OR by terminal[best way].

Now open terminal, become root by su – and type:

zypper dup –from KDE-R49 && KDE-RE49

KDE-R49 and KDE-RE49 are the repos name which you just added in step 1, it can be different in your case[as you will name it].

Good luck with the upgrade process.

How to install Google Chrome in openSUSE

Don’t be confused about Chrome and Chromium. Both are browsers and using the same engines, then what’s the difference?, the difference is one is actively developed by open source community[Chromium] and the other is maintained and developed by Google[Chrome]. Google Chrome can say provide stable version, while Chromium is dev build version[unstable] which is stable though but have new features which then go to Google Chrome stable version later. Chromium is already provided in openSUSE default repositories. But for Google Chrome we need to add new repository. Which will have three versions, stable, beta, unstable. If you want to have different versions of this browser, install both Chromium and Chrome. Currently i’m running both versions, stable version from Google[Chrome] repository and dev build[Chromium] from openSUSE repositories. 1st of all open terminal and become root by su – , and then type, choose your system architecture:

64bit version

zypper ar http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome

32bit version

zypper ar http://dl.google.com/linux/chrome/rpm/stable/i386 Google-Chrome

Now type:

zypper ref

And install Google Chrome:

zypper in google-chrome-stable

Now you will have two versions of Chrome/Chromium browser.