Archive for the 'Ubuntu Lucid Lynx' Category

E: Unable to locate package mongodb-org

I got this error “E: Unable to locate package mongodb-org” when following installation instructions from mongodb.com

Solution was pretty simple, instead of


sudo apt-get install -y mongodb-org

try


sudo apt-get install mongodb

Command to find Ubuntu version

In order to find out which version of ubuntu, open Ubuntu command line and type


lsb_release -a

This command should output something like


No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety

Increasing php 5.6 performance of ec2 instance with opcache and php-fpm

We have installed Apache 2.4 and php 5.6 while migrating from windows server to aws and things have been running pretty good on t2.micro instance for the web server and RDS instance for the database. However, it can run better and this is where opcache and php-fpm come into play.

To install php-fpm and opchache for php 5.6 on amazon linux, simply run:


sudo yum install php56-fpm
sudo yum install php56-opcache

You would need to have proxy and proxy_fcgi for php-fpm, check if those are enabled:


httpd -M | grep proxy

if not, enable:


sudo a2enmod proxy proxy_fcgi

To enable php-fpm we had to edit our vhosts to include this configuration:


vi /etc/httpd/conf.d/vhost.conf


<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
</FilesMatch>

For reference, more details on configuration here.

start php-fpm, restart apache


sudo service php-fpm restart
sudo service httpd restart

Opcache gave us a significant performance boost.

How to replace Windows new line characters in Ubuntu

I have tried executing a bash script edited in Windows, which gave me an error:

vagrant@vagrant-ubuntu-trusty-64:/var/www/magento2$ sh /vagrant/scripts/deploy.sh
: not foundripts/deploy.sh: 2: /vagrant/scripts/deploy.sh:
/vagrant/scripts/deploy.sh: 4: set: Illegal option -

I tried executing it with bash, which gave me more details showing windows new line character as a problem:

vagrant@vagrant-ubuntu-trusty-64:/var/www/magento2$ bash /vagrant/scripts/deploy.sh
/vagrant/scripts/deploy.sh: line 2: $'\r': command not found
: invalid option/deploy.sh: line 4: set: -

To solve this problem, I replaced Windows new lines with Linux:

sed -i 's/\r$//' /vagrant/scripts/deploy.sh

If you have this problem, replace filename with the name of your file:

sed -i 's/\r$//' filename

How to use Terminal as a desktop background in Ubuntu

terminal in desktop background in Ubuntu

terminal in desktop background in Ubuntu

Having a quick access to Terminal window in Ubuntu helps speed up daily tasks quite a bit. As we described in the previous post, you can install Guake, which is a convenient Quake style Terminal window with a few nice features.

Here we will show how to take it one step further and embed Terminal window in desktop.

There are quite a few ways to accomplish the task, even using some third-party terminals, but we will take at the two most used ways.

1) If you use Compiz package, it is pretty easy to embed Terminal in the desktop.

First, you need to add a new terminal profile. Open a Terminal window and go to File > New Profile. Let’s call this profile desktop-embed-profile.

Second, go through the options and mark as following: Turn Off “Show Menubar By Default” option in “General” tab.  Under “Title and Command” tab put “desktop-embed-profile” as initial title and select “keep initial title” in the drop down box below for “when terminal commands set their own titles”. Under “Colors” you may have to experiment to see which options you like the best for your desktop. Just leave as is for now if you want or change whatever you feel like changing. Next tab “Background” – select “transparent background” option and move the slider as you feel needed, it controls the transparency.

Now lets configure the Compiz options. Go to Compiz Configuration Manager.

a) Activate the “regex matching”.

b) Activate “windows decoration”. In window decoration plugin now add “!title=^desktop-embed-profile$” with no quotes in “Decoration windows” field.

c) Activate “window rules”. In window rules plugin now add “title=^desktop-embed-profile$” with no quotes in a few fields: Skip taskbar, Skip pager, Below, Sticky, Non resizable windows, Non minimizable windows, Non maximizable windows, Non closable windows.

d) Activate “place windows”. In this plugin click the “Fixed window placement” setting and add new item to “windows with fixed positions”. Fill “Positioned windows” field with “title=^desktop-embed-profile$” and set the window position with sliders, measured in pixels. 0 x and 0 y are the top left corner positions. Select the checkbox for “Keep in Workarea” and close the window.

At last, lets disable the blinking cursor for this profile. Open configuration manager (gconf-editor in Terminal)  and get down to apps > gnome-terminal > profiles > Profile1 (if this is your first profile) – set the cursor_blink_mode option to off.

Now you are done with the plugin settings, press ALT+F2 to run this command:

gnome-terminal --window-with-profile=desktop-embed-profile

It will embed the terminal into your desktop. Type exit if you need to get rid of it.

 

2) If you don’t use Compiz, get devilspie package:

sudo apt-get install devilspie

and create a configuration file in your home directory:

mkdir ~/.devilspie

now lets create a config file:

gedit ~/.devilspie/DesktopConsole.ds

Paste the configuration, something like:

(if
        (matches (window_name) "desktop-embed-profile")
        (begin
                (set_workspace 4)
                (below)
                (undecorate)
                (skip_pager)
                (skip_tasklist)
                (wintype "utility")
                (geometry "+20+20")
                (geometry "900x600")
        )
)

but change the geometry values – first one with “+” signs is the offset while the second one is the width and hight.

Now open a new terminal window and go to File > New Profile. Name it “desktop-embed-profile” without quotes in “Title and Command”.

Go through the options and do the following:

Turn Off “Show Menubar By Default” option in “General” tab.

Under “Colors” you may have to experiment to see which options you like the best for your desktop.

Next tab “Background” – select “transparent background” option and move the slider as you feel needed, it controls the transparency.

In the “Scrolling” tab select “disabled” for the “Scrollbar is” option.

Add to start up if you want to start this every time when your machine turns on. In System > Preferences > Startup Applications add these 2:

devilspie
gnome-terminal --window-with-profile=desktop-embed-profile

Restart your pc and enjoy.

 

These are the 2 easy ways to enable Terminal in the Desktop background. There are more ways, but hopefully you will find one of these more helpful.

Compiz on Lucid Lynx and Load Time

I was going to record my own video, but there are already so many out there that I decided to save some time and include the one of many that I found on youtube. Compiz consists of a few packages that you can install, this video shows examples from the standard compizconfig-settings-manager and compiz-fusion-extra-plugins. While compiz is not really new, it is still a lot of fun to play around with. BTW, this was THE reason I installed Ubuntu a few years ago.

Here is a video:

It just looked so cool, but gets old once you play around for a bit. It is still fun to show to the friends when they come over. Especially to Mac-heads since they are always so proud of their apples, which by the way is built on Linux anyway. We would constantly have Windows-Mac arguments with no outcome, however, once they see Ubuntu, they have nothing to say. Viruses – same results, the look and effects – Ubuntu wins, load time – Lucid Lynx is fast here as well, applications – Ubuntu with Wine wins. 🙂 I love the way Linux uses the consoles, allowing to have a few desktops at the same time. It is so convenient, especially when you code and have one desktop for one project. Makes multitasking so much easier. Ubuntu seems a lot faster than anything I have tried so far. Seems like I can get done a lot more, a few seconds faster here, a few there adds up a lot of extra time to put into something useful instead of just waiting for some app or load/reboot. Here is another video I just found on the load time comparison between Lucid Lynx and Windows 7. Even though it is not precise, I still found it pretty useful.

Anyways, there are too many videos on Ubuntu out. Just want to say that Lucid Lynx is perfect for my second pc.

P.S. I found out about compiz after seeing my friend’s pc. He is a hardcore FreeBSD guy and showed me Beryl over 3 years ago. I was really impressed and a few month later I found Ubuntu and Compiz. I am not sure which one came out first, Beryl or Compiz, but they seem to be very close.

Lucid Lynx Review

lucid lynx

I have been playing with the new Ubuntu. Lucid Lynx works great out of the box. The boot time got improved and it loads very fast. No errors, no bugs, all the drivers work perfectly for my relatively new custom i7 with the latest hardware. I had trouble with my logitech keyboard and mouse last time I tried Ubuntu, but this time everything worked great. Not even one problem.

Installation was super easy – download and burn the os from http://www.ubuntu.com/, make pc boot from cd and click “install” once it loads. I will try to go through detailed installation process soon as I will reinstall Lucid Lynx one more time with everything I need just to see how fast it will install with all the server packages, and perhaps when I will try to put it on a laptop.

Finding applications is relatively easy via the software center, just look for a couple of the best rated apps that fit the requirements and keep the one you like the best. There are quite a few new ones that I haven’t used yet,  so I will probably post on it later as well. Usually you hear about all the cool apps before even trying, but who knows, may be I will be able to discover a gem that is not too popular yet. After all, its all free and ready for download. 🙂

Lucid Lynx is great so far. I still rely on Windows for personal use due to the software limitations, but will be looking more through http://appdb.winehq.org/ and trying to make everything I use on Windows work on Linux. Last time I could not get Dreamweaver to work without crashing, hopefully it will be different this time.

Intro to Lucid Lynx

lucid lynx

Ubuntu 10.04, codenamed “Lucid Lynx” was released on April 29, 2010 almost as scheduled (a little delay due to the bug in a boot loader) and includes the 2.6.32-21.32 kernel which has quite a few performance updates. The next version, Ubuntu 10.10 (“Maverick Meerkat”), scheduled for  October 10 2010.

Talking about performance, they removed HAL from the boot process, which makes Lucid boot quite a bit faster.

Lucid Lynx is now available in 29 languages: Spanish, English (United Kingdom), Brazilian Portuguese, German, French, Italian, Hungarian, Swedish, Russian, Chinese (Simplified), Dutch, Portuguese, Finnish, Danish, Japanese, Greek, Korean, Czech, Catalan, Polish, Galician, Chinese (Traditional), Slovenian, Bulgarian, Asturian, Vietnamese, Basque, Turkish and Serbian.

Likewise-open package got updated. It is version 5.4 now. nVidia drivers got updated as well and run on Nouveau by default. Ubuntu 10.04 comes with Gnome 2.30, which has just a few extra features. Wonder what upcoming Gnome 3 would be like… 🙂

Lucid featured 2 new themes, Ambiance (Dark) and Radiance (Light), which have quite a few changes. They got new wallpapers and icons as well. We will probably have to put it into a different post.

New Ubuntu has a few new social features. MeMenu, which is built on the Gwibber provides easy access to Twitter, Facebook, Flickr and a few other social platforms and allows to see several feeds at the same time.

OS has a new feature to purchase favorite songs right from the desktop. Not sure if you need it, but it is there now and works well with Rhythmbox player. It has improved sync features for easier file sharing.

You can download Lucid Lynx here, which list the most popular downloaded images.

We are not sure if a lot of Mac users get hurt by the economy and switch to Linux, but what catches the attention right away is the placement of the window buttons. They are on the left-side now. While it can be changed, many users seem to like it. As for me, I still run Windows at work and on my laptop, so I think I will be looking into changing it shortly.