Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Sunday, 30 July 2017

copy paste in ubuntu unix linux using key board shortcuts commands

copy paste in ubuntu unix linux using key board shortcuts commands





First to copy, select the text that you want to copy using mouse and then press ctrl + shift + c ( This make the text to copy to clip board)

Then simply to paste this content into a file press  ctrl + shift + v
{ Read More }


Friday, 28 July 2017

Creating Desktop Launchers in 11 10 Ubuntu Oneiric

Creating Desktop Launchers in 11 10 Ubuntu Oneiric


As you might have already noticed, Oneiric doesnt let you create launchers by right-clicking the desktop. Different people have different needs, but I love to have CCSM and compiz --replace launchers (at least) at my desktop so I can just double-click those whenever disaster strikes. Thankfully, there is a workaround for creating launchers at the desktop in Oneiric.

First of all, make sure that the package gnome-panel is installed. It would do no harm, sitting there quietly. So, get to a Terminal and run:

sudo apt-get install --no-install-recommends gnome-panel

Now from the Alt + F2 run dialog or, even more conveniently, from a Terminal, run:

gnome-desktop-item-edit ~/Desktop/ --create-new

Name your launcher and enter the command to be launched as shown in the screenshot below. Clicking the OK button would immediately create the launcher.


Copying Existing Launchers

The above method you primarily need to create custom launchers that arent already present on your system; for creating launchers based on existing ones, there is a much easier method: simply copying them!

Therefore, navigate in Nautilus to /usr/share/applications, there youll find the vast majority of existing, system-wide launchers, and theyll be presented to you with the names and icons with which they also turn up in the Dash, Unity Launcher, and menus.

Now, you only got to do a simple copy & paste onto your desktop, whether directly on it or into its corresponding directory in your home directory. Done!

The executable bit will be automatically set, making the newly created copy of the concerning .desktop file a working launcher - it isnt set on the files in /usr/share/applications in the first place, since those arent executed, but sourced. Fortunately, Nautilus automatically takes care of that; but if you copy the launcher files via the command line, e.g. the Terminal, youd need to set it yourself!

User-Specific Launchers

User-specific launchers, including those of Wine and your possibly earlier created custom ones, are located in ~/.local/share/applications in your home directory (press Ctrl + H to see the hidden files/directories). Their executable bit also isnt set by default, but unlike the system-wide launchers, they turn up in Nautilus with their actual file names and generic icons (Wine launchers have at least their public names in their file names). Also unlike system-wide launchers, Nautilus wont automatically set the executable bit upon creating the copy, so youd need to set it yourself via Right-Click > Properties > Permissions.
{ Read More }


Thursday, 27 July 2017

Create Bash Aliases With Arguments In Ubuntu

Create Bash Aliases With Arguments In Ubuntu


The scenario here may not be the same with you but the point is you want your bash alias to work with parameters.

Say I want to display a files content in colors and I want the output to display line numbers as well.

For the color part, I used pythons syntax highlighter called pygments and I used bash built-in line numbering command called nl.

Now to achieve my goal, I have to pipe nl to the result of pygmentize:

pygmentize test.php | nl

This is quite a hassle especially if you have to do it frequently only with different files. Unfortunately, bash alias does not directly accept parameters. The solution is to create a bash function.

ccat() { pygmentize $1 | nl }

or multi-line:

function ccat() { 
pygmentize $1 | nl
}

I named the function ccat (custom cat) because it works like a cat command but the syntax is highlighted.

Put this function in ~/.bashrc and then restart your terminal or use source:

ccat test.php

{ Read More }


Tuesday, 25 July 2017

Converting mp4 to mp3 in Ubuntu

Converting mp4 to mp3 in Ubuntu



Converting mp4 files to mp3 can easily be done via the terminal. First install ffmpeg and the necessary codecs by typing:

sudo apt-get install libav-sudo apt-get install ffmpeg libavcodec-extra-52
sudo apt-get update
sudo apt-get install ffmpeg libavcodec-extra-53
Than you can convert your file via:
ffmpeg -v 5 -y -i inputfile.mp4 -acodec libmp3lame -ac 2 -ab 192k outputfile.mp3

For example go to the video folder and convert your file like this:
cd Videos
ffmpeg -v 5 -y -i writelikethewind.mp4 -acodec libmp3lame -ac 2 -ab 192k writelikethewind.mp3

This should look something like this:

Note that I use ls to get a listing of alle the files in the current directory.

Also read my article on converting between different video format.
{ Read More }


Create a live system ISO for your Ubuntu based Linux machines using Systemback

Create a live system ISO for your Ubuntu based Linux machines using Systemback


Jack Wallen introduces you to an easy way to create live ISO images of your currently running Linux system with Systemback.
Systemback
You have that Linux desktop or server precisely how you want it and are interested in either creating a spot-on backup or a live ISO that you can then install on other (similar) hardware. How do you do it? You could go through the process of learning a number of commands to take care of the process, or you could install and use a handy tool called Systemback.
The Systemback tool allows you to create restore points, backups, and live images of a running system. Currently, it only works for Ubuntu derivatives based on 14.04, 14.10, and 15.04. It does, however, work like a champ (and does so quite easily).
I want to show you how to install and quickly make a live image of your current Linux system.

Installation

You wont find Systemback in the standard repositories, so you must first add the repo with the command:
sudo add-apt-repository -y ppa:nemh/systemback
Now, update apt with the command:
sudo apt-get update
Finally, install Systemback with the command:
sudo apt-get install systemback
Youll have to okay the dependencies before the install will begin. The dependencies will vary, based on what you have installed.
At this point, you should be able to start Systemback from the Unity Dash or your desktop start menu. You can also start Systemback from the command line with:
sudo systemback
You are now ready to create a live ISO.

Usage

Using Systemback is quite easy. From the main window (Figure A), select the location to house the ISO image (by clicking the ... button under Storage Location).
Figure A
Figure A
The Systemback main window.
Click the Live system create button and, in the new window (Figure B), give the live system a name, change the storage location (this location will need to have more than 4 GB of available space), and click Create new. You can optionally include user data files by checking the associated box.
Figure B
Figure B
Creating the live ISO image.
Note: If your .sblive file is larger than 4 GB, the conversion to a ISO is not possible. This is a file system limitation.
Depending on the size of your installation, the process will take some time to complete, so grab a cup of coffee or administer a server or two. After its installed, you should find an .sblive image in the defined storage location ready to convert to ISO. This image can either be written to a USB device or used to create a live ISO image. From the Created Live images window, select the image you want to convert, and then click Convert to ISO. When this process is completed, youll find the .iso file in the storage location ready to be written to disk. With that disk, you can then install the live image on other machines.
The best time to use Systemback is on a close-to-newly installed system. This is simply because of the file system size limitation. If youve installed too many applications on the system, the size will reach beyond 4 GB, and you wont be able to convert it. You can, however, still create restore points for a system. To create a restore point, first make sure youve selected a Storage directory, and then click the Create New button.
Once youve created a restore point, you can then go back to that restore point by simply selecting it from the left side of the window (Figure C) and then clicking System Restore on the right side.
Figure C
Figure C
Restoring from a restore point.
In the resulting window (Figure D), select the type of restore you want to do, if you want to include user configuration files, and click Next. This will begin the restore process.
Figure D
Figure D
Restore point options.
Systemback is a great way to create live images based on a pre-existing system and restore points in case you need to roll a Linux machine backward.
Do you administer or use Linux machines? If so, what do you use for your Linux backup/restore systems? Share your experience in the discussion thread below.

Source: http://www.techrepublic.com/article/create-a-live-system-iso-for-your-ubuntu-based-linux-machines-using-systemback/
{ Read More }


Thursday, 20 July 2017

Create Symbolic Links in Ubuntu

Create Symbolic Links in Ubuntu


The 2 types of links are hard links and soft links .

A hard link is essentially a file with multiple names, there are multiple copies of the file. So that if one of the hard links is deleted, the file persists to exist.

A soft link (also called symlink or symbolic link) is a file system entry that points to the file name and location. Deleting the symbolic link does not remove the original file. If, however, the file to which the soft link points is removed, the soft link stops working, it is broken.

Symbolic links can be created both from the terminal and from nautilus (file manager, GUI). 
 

Terminal

 

The syntax for creating a symbolic link is,
ln -s target source
where,
  • target - The existing file/directory you would like to link TO.
  • source - The file/folder to be created, copying the contents of the target. The LINK itself.
For more help see ln --help

Example:
ln -s /home/nargren/Pictures /home/nargren/Pictures_Backup
This would create a symbolic link directory called "Pictures_Backup" to my "Pictures" directory. All the content in either of the 2 directories would appear in the other one as well.

GUI

 

You can easily create a symbolic link to a folder or file by middle clicking on the folder with the mouse and dragging it to its new location, while holding the middle mouse button.

Remove Symbolic Links

 

To remove a symbolic link, be it a file or directory, simply remove the created link. This can be done either through nautilus (GUI) or using the rm and rm -f commands in the terminal.

Use of Symbolic Links

 

Symbolic links are especially useful on computers with dual-boot, running for example Windows and Linux. As symbolic links can be created across partitions and file systems, windows folders can be linked to appropriate Ubuntu folders.

I will bring my own example of using Mozilla Thunderbird as e-mail client. I would like to have my emails and profiles available, including all my downloaded emails on both operating systems. This could be done either by downloading all new e-mails when I start the software on any of the two operating systems, or via symbolic links. As I had problems downloading new emails with multiple clients, I have chosen to make a symbolic link.

I have linked my Windows
[USER]AppDataRoamingThunderbird
 folder to the Ubuntu directory
 home/.thunderbird
This allowed me to download my emails only once and have them available on both Windows and Linux while keeping my entire profile.
{ Read More }


Thursday, 6 July 2017

Cron to be deprecated in favor of Upstart in Ubuntu

Cron to be deprecated in favor of Upstart in Ubuntu


Ubuntus Upstart is an init daemon replacement, quite analagous to OS Xs launchd. Launchd also replaced cron on OS X - and upstart plans to replace cron on Ubuntu. No telling when, but all my cron jobs will need to be reformatted.

Update: Sept 2011. Three years later and still waiting...

{ Read More }


Friday, 2 June 2017

Couple of Ubuntu Linux Tips

Couple of Ubuntu Linux Tips


I had a number of really good Linux particularly Ubuntu specific tips lying around , so i thought instead of posting them separately it would be way better to post them together as a single article . Some of the tips i have discussed below helps you change default operating system to load in case of time out in the grub boot loader , logging in to system automatically without having to worry about typing in your login credentials , installing DVD playing support , viewing chm files in Mozilla Firefox , Improving quality of font rendered on LCD Displays , increasing your laptops battery life , Installing cool graphics effect , enabling delete option etc .


1. Logging in automatically

Ubuntu by default does not come with automatic log-in enabled so whenever you start ubuntu you have to type in your login credentials . Now however if you want a particular user to be logged in automatically whenever ubuntu starts you can do that easily by following these steps :

1. Go to System -> Administration -> Log-In Window
2. In the dialog box that appears go to Security tab and click on " Enable Automatic login" and click on the user you want to login automatically .


2. Increasing your laptops battery life

Intel a year back released a tool called PowerTop that uses no of features available in the Linux Kernel to make Linux Kernel power efficient and hence helps you conserve your precious laptop battery . Powertop does this by providing you entire list of running application and amount of power they are consuming , so turning of the non-essential one causes one to use less power and hence increases your battery life .

Here is text from PowerTop project about PowerTop

Computer programs can make your computer use more power. PowerTOP is a Linux tool that helps you find those programs that are misbehaving while your computer is idle. The application that misbehaved the most was the Linux kernel. However, as of version 2.6.21, the Linux kernel went tickless, and no longer has a fixed 1000Hz timer tick. The result (in theory) is huge power savings because the CPU stays in low power mode for longer periods during system idle.

However... there are many things that can ruin the party, both inside the kernel and in userspace. PowerTOP combines various sources of information from the kernel into one convenient screen so that you can see how well your system is doing at saving power, and which components are the biggest problems.

PowerTOP has these four basic goals:
  • Show how well your system is using the various hardware power-saving features
  • Show you the culprit software components that are preventing optimal usage of your hardware power savings
  • Help Linux developers test their application and achieve optimal behavior
  • Provide you with tuning suggestions to achieve low power consumption

Now , however PowerTop does not come preinstalled with ubuntu and you have to install it separately (assuming you have all your repositories in order) issue the following command in the terminal window to install power-top :

sudo apt-get install powertop


and after completing above step launch powertop by typing in following in terminal mode ( should be run in super-user administrator mode )

powertop

or
sudo powertop
Powertop in action


3. bypassing trash and deleting files directly

By default nautilus does not come with option to delete file directly , so well whenever you delete file it goes into the Trash . Now however if you want an option to delete file directly without the file going into Trash you can do so by following these steps :

First open nautilus by either clicking on Home Folder ( on menubar at top go to Places -> Home Folder) once nautilus is open go to (Edit -> Preferences )
in the menubar at top of the frame of nautilus , and in the dialog box go to Behaviour you will find a dialog box like this :



In this dialog box enable "Include a Delete command that Bypasses Trash " and close the dialog box . Now whenever you want to delete a file permanently , just right click on the file and chose Delete to delete file permanently .

4. Improving clarity of fonts on LCD/Laptop Displays

Ubuntu does not enable Subpixel smoothing by default which improves the clarity of fonts on LCD displays . To enable it go to (System -> Preference -> Appearance ) and click on the Fonts tab

You will find a window like the one shown below , chose "Subpixel smoothing(LCD)" and close the window you should be able to see the change immediately .
Dialog Box With Subpixel smoothing Enabled

Same Dialog Boxes one with Subpixel smoothing enabled and one with Best shapes enabled

5. Enabling Cool Graphics Effects

Unlike previous releases of Ubuntu where one had to manually download and install compiz,beryl etc (Compiz Fusion is composite window manager that provides best features of Compiz and Beryl) from Repositories if one wanted to have glitzy visual effects . Ubuntu 7.10 comes with Compiz Fusion pre-installed and on supported hardware offers a wide array of Visual Effect . Now depending on graphic hardware of computer one could chose from three level of Visual Effect (From System -> Preferences -> Appearance )

None : - This mode causes Ubuntu to use Metacity instead of Compiz Fusion , with no visual effect

Basic : - Has only simple visual effects like shadows , fading windows-menus etc

Advanced : - Recommended for PC with descent graphic hardware , enables effects like wobbly windows, transparency , animated workspace switching etc
Visual Effect Dialog Box
Now , the biggest advantage of Compiz Fusion is even on really slow hardware one can have descent set of visual effects even on my slow laptop i could use Extra graphics effects though it was painful while using application like OpenOffice because of my slow hardware.

However , compiz-fusion is capable of much more and you can enable more desktop effects /customize compiz by typing the following command in the terminal window : -

sudo apt-get install compizconfig-settings-manager
After completing above step , you can customize compiz by going to System > Preferences > Advanced Desktop Effects Settings .

6. Opening CHM Files using Mozilla Firefox


Mozilla Firefox is a powerful platform and it can be extended to do a number of cool things by installing different plug ins and one really useful addon is a CHM viewer .

To install CHM reader addon go to the following site and click on install button , procedure after that is quite self explanatory owing to extremely easy interface of Mozilla Firefox .


After clicking install button you will find a dialog box like this just click the "Install Now" button in this dialog box

After installing you can easily open chm files from Mozilla Firefox , In the File submenu you will find a option of opening chm files .
File Menu in Firefox showing new option to open CHM file


Firefox rendering a CHM file

7.
1.Changing default operating system to load in case of time-out in grub

Most of the Linux distributions these days use GRUB as default boot-loader . Now after completing installation , if not specified during the time of installation if grub sets Linux as the default operating system to load in case of a time-out . Now even though this is what most users would want still if some one wants to have windows or any other operating system as a default operating system one can do it easily by following the steps below :

Firstly you have to open menu.lst file which is the configuration file of grub loader . Now to modify it you need super-user(administrator ) privileges , to open the file type in the following command .

sudo gedit /boot/grub/menu.lst

Now add a default option like this and set its value to a number that is the sequential order of operating system you want to load in the grub configuration file .

for example for the grub file :

default 5

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=4bc9176e-77b6-4067-97c4-6c25c6c6b7a2 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,5)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=4bc9176e-77b6-4067-97c4-6c25c6c6b7a2 ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,5)
kernel /boot/memtest86+.bin
quiet

title Fedora (2.6.23.1-42.fc8)
root (hd0,2)
kernel /boot/vmlinuz-2.6.23.1-42.fc8 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.23.1-42.fc8.img
### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Vista/Longhorn (loader)
root (hd0,0)
savedefault
makeactive
chainloader +1

To load windows automatically , i added

default 5


at the top of menu.lst


8. Installing Audio/Video and DVD Playback support

he first thing anyone who wants to use Ubuntu as a replacement to their windows operating system would like to do is install support for all kind of audio/video multimedia codecs . Ubuntu does not come installed with support for major audio/video formats because of licensing issue and other issues . To install support for audio/video codecs type in the following command in the terminal window : -

sudo apt-get install gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg gstreamer0.10-plugins-ugly
And if you want to install mp3 support in nautilus you may like to install mpg123 which is a nice command line based utility for playing mp3 files and it works well even on modest hardware .

sudo apt-get install mpg123

This would enable most of the popularly used codecs in the Totem Movie player which uses the GStreamer framework to play audio/video files.

and to install DVD playing support , type in the following command in the terminal window (Note playing DVD in certain regions through the lib being installed below might be illegal so do it at your own risk ) :

sudo apt-get install totem-xine libxine1-ffmpeg libdvdread3


and

sudo /usr/share/doc/libdvdread3/install-css.sh


After issuing the above command whenever you insert DVD , automatically it would start playing in totem .

Article Written by : Ambuj Varshney (blogambuj@gmail.com)
For Linux on Desktop , http://linuxondesktop.blogspot.com
(C) 2008 , Ambuj Varshney
{ Read More }


Tuesday, 30 May 2017

Creating a MySQL db on Ubuntu as a normal user

Creating a MySQL db on Ubuntu as a normal user


Lately I tried to create a MySQL db on Ubuntu (version 11 which has MySQL 5.1 preinstalled). I was logged in under my normal username but I got a surprise when running the mysql_install_db command.
 $ /usr/bin/mysql_install_db --datadir=./mysql/data Installing MySQL system tables... 130806 22:17:21 [Warning] Cant create test file /home/andreash/mysql/data/andreas-Ub-2.lower-test 130806 22:17:21 [Warning] Cant create test file /home/andreash/mysql/data/andreas-Ub-2.lower-test Installation of system tables failed! Examine the logs in ./mysql/data for more information. ... 

There were not log files though and checking directories and permissions didnt reveal any problems.
So I started to search and found that Ubuntu uses a security mechanism called apparmor which can be used to control certain aspects of an application.
In regards to MySQL that means that there exists a MySQL profile which defines which directories can be accessed (and how) by the MySQL programs. The profile for the daemon mysqld is defined in /etc/apparmor.d/usr.sbin.mysqld and looks like this:

 # Last Modified: Tue Jun 19 17:37:30 2007 #include <tunables/global> /usr/sbin/mysqld { #include <abstractions/base> #include <abstractions/nameservice> #include <abstractions/user-tmp> #include <abstractions/mysql> #include <abstractions/winbind> capability dac_override, capability sys_resource, capability setgid, capability setuid, network tcp, /etc/hosts.allow r, /etc/hosts.deny r, /etc/mysql/*.pem r, /etc/mysql/conf.d/ r, /etc/mysql/conf.d/* r, /etc/mysql/*.cnf r, /usr/lib/mysql/plugin/ r, /usr/lib/mysql/plugin/*.so* mr, /usr/sbin/mysqld mr, /usr/share/mysql/** r, /var/log/mysql.log rw, /var/log/mysql.err rw, /var/lib/mysql/ r, /var/lib/mysql/** rwk, /var/log/mysql/ r, /var/log/mysql/* rw, /{,var/}run/mysqld/mysqld.pid w, /{,var/}run/mysqld/mysqld.sock w, /sys/devices/system/cpu/ r, # Site-specific additions and overrides. See local/README for details. #include <local/usr.sbin.mysqld> } 

So in order to enable MySQL to access a subdirectory of my $HOME I had to edit the file as root (sudo vi ...) and add this line to the list (I put it right under the /sys/devices line)

 /home/andreas/mysql/** rw, 

The apparmor man page explains the syntax and attributes in detail. For my purposes it suffices to know that ** stands for the directory and all subdirectories underneath and rw is of course read/write.

Then this new profile needs to be activated replacing the old one via

 $ sudo apparmor_parser -rv /etc/apparmor.d/usr.sbin.mysqld Replacement succeeded for "/usr/sbin/mysqld". 

Finally running the MySQL program again did create the databases.

 Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: ... 

Not knowing much about apparmor yet I wonder how one would go about to allow all users (on a bigger multi-user server) to use MySQL or any other application which is secured in the same way. It would be impractical to add all users home directories to the profile file so I guess there must be some shortcut. This needs more reading.
{ Read More }


Create swap after ubuntu installation

Create swap after ubuntu installation


For newer version of ubuntu swap is very important. Question is why?

1. On hibernate system save all data from ram to swap.
2. When ram is full, swap is used as a secondary ram

Recently released ubuntu uses caching in ram. Its means save recently closed application data in ram, so that when you will use the application again it can load it quickly. Cache increase performance. For that ram becomes full (2GB or less). When ram fill with cache and system needs more ram it backup old cache in swap. If you dont have a swap then your system behave slow when ram is full.

What happen if you have already installed your system without swap partition? Fortunately ubuntu has option to create a swap as file.

Step 1: Allocate a file  sudo fallocate -l 2048m /mnt/swap_file.swap

Step 2: Change permission sudo chmod 600 /mnt/swap_file.swap

Step 3: Format the file for swapping device  sudo mkswap /mnt/swap_file.swap

Step 4: Add swap  sudo swapon /mnt/swap_file.swap

Step 5: Open fstab  sudo gedit /etc/fstab

Step 6: Add entry in fstab  /mnt/swap_file.swap none swap sw 0 0 


source : here
{ Read More }


Monday, 29 May 2017

cool retro term terminal emulator mimics the looks of old CRT screens Ubuntu PPA

cool retro term terminal emulator mimics the looks of old CRT screens Ubuntu PPA


Remember cool-old-term? The gorgeous Terminal Emulator has a name change and is now called cool-retro-term. And I think retro fits the description better, a welcome change. More importantly, cool-retro-term now comes in a nicely packaged Ubuntu PPA making the whole installation process a breeze.

cool retro term ubuntu ppa

Install cool-retro-term in Ubuntu (PPA available for 15.10, 14.04 LTS)

Remember all the hoops you had to jump through just to install cool-retro-term (previously called cool-old-term) in your Ubuntu? Well, thats all history now. The new releases of cool-retro-term Terminal Emulator comes with its own Ubuntu repositories with support for Ubuntu 15.10, Ubuntu 14.04 LTS and limited support for Ubuntu 15.04.

For those who didnt read our one year old post about cool-retro-term Terminal Emulator, here are a few things you should know. cool-retro-term is a Terminal Emulator that mimics the look and feel of old-school CRT monitors. First released more than a year and a half ago, cool-retro-term had gone through several iterations and is now ever more stable and lightweight. Highlight though is the availability of new stable releases via PPA for Ubuntu based distros. Heres how you install cool-retro-term in Ubuntu 15.10 (Wily) and Ubuntu 14.04 LTS.

sudo add-apt-repository ppa:bugs-launchpad-net-falkensweb/cool-retro-term
sudo apt-get update
sudo apt-get install cool-retro-term

The above steps should work with Ubuntu 14.10 (Utopic) and Ubuntu 15.04 (Vivid) as well. If you like the project and wish to contribute, head over to Swordfish Labs. Thanks for reading.
{ Read More }


Wednesday, 17 May 2017

CPU information under Ubuntu server

CPU information under Ubuntu server


If you want to see all the CPU info (specs) of your server, run this:

cat /proc/cpuinfo


it will show you something like this:

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Celeron(R) CPU 3.06GHz
stepping : 1
cpu MHz : 3058.933
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc up pebs bts pni dtes64 monitor ds_cpl tm2 cid cx16 xtpr
bogomips : 6117.86
clflush size : 64
cache_alignment : 128
address sizes : 36 bits physical, 48 bits virtual
power management:
{ Read More }


Sunday, 14 May 2017

Creating a patch to fix an Ubuntu bug

Creating a patch to fix an Ubuntu bug


Today Im preparing a patch to fix Launchpad Bug #117984, which is also Gnome Bug #451734.

References: Ubuntu Wiki, Ubuntu Packaging Guide

It turns out that to do it properly, you need to make two patches. The first one is a .diff file for Debian and upstream. The second creates a .debdiff patch for Ubuntu.

There are circumstances, of course, where one of the patches is not neccessary, and some of these steps can be skipped.

    Note: Use steps 1-9 & 14-15 for just an upstream (.diff) patch. Use steps 1-4,5-7,11-13 & 15 for just an Ubuntu (.debdiff) patch.
  1. Open a terminal window
  2. Create a working directory with the command mkdir working
  3. Move to the working directory with the command cd working
  4. Download the latest source package using the command apt-get source packagename. This method automatically appends an .orig suffix, and unpacks the file, too. DONT download the source from packages.ubuntu.com; instead ADD the repos to your Software Sources control panel using the instructions at the Ubuntu Wiki
  5. Make a copy of the unpacked folder with cp -r package-folder package-folder-orig
  6. Go into the unpacked folder (not the orig) with cd package-folder.
  7. Edit the file using nano path/to/file/to/fix. Fix the file
  8. Return to the working directory with cd ..
  9. Use diff -Nurp package-folder-orig package-folder > upstream-bug#.diff to create the upstream patch.
  10. Go back into the unpacked folder (not the orig) with cd package-folder.
  11. Use the command dch -i to update the changelog. Show the change and list the bug# fixed.
  12. Use debuild -S -us -uc to create the debdiff patch.
  13. Attach the .debdiff patch to the bug in Launchpad.
  14. Attach the upstream .diff patch to the Launchpad bug AND the upstream bug.
  15. Delete the working directory, and all contents.
Update February 5, 2009: Accepted and fixed!
{ Read More }


Wednesday, 10 May 2017

Creating Bookmarks in Ubuntu File Manager Nauitilus

Creating Bookmarks in Ubuntu File Manager Nauitilus


It is very handy to have some extra directories added to the sidebar in the Ubuntu file manager (Nautilus) to allow quick navigation, especially if one has rather complex file structures on your computer.

Adding bookmark

  1. First, open the file manager
  2. Select the directory you would like to add to the sidebar and enter that directory (!)
  3. Once inside the directory, go to the Ubuntu title bar and select Bookmarks/Add Bookmark (Note that if you are not inside the directory, it will not work!)


  4. The directory will appear in the sidebar of the file manager, granting fast access from now on to the files within that directory.

    Remove Bookmark


    If you want to remove the bookmark from the sidebar right-click it and select remove.
    { Read More }


    Saturday, 6 May 2017

    Create Ubuntu Live USB With Persistant Storage With uSbuntu Live Creator

    Create Ubuntu Live USB With Persistant Storage With uSbuntu Live Creator


    You can create a LIVE USB with Ubuntu 8.10 or 9.04 with persistent storage so that the work can be saved on the USB as is not the case in Live CD�s and Live USB.It can create LIVE Bootable USB from Disk Images (ISO), CD, or Download the Distro.It supports Ubuntu, Kubuntu, Xubuntu, Mint or CrunchBang.You can also load from the created LIVE USB in Windows with a special portable version of Virtual Box.All the data stored in the usb persistent storage are hidden and the data is stored in a special file called casper-rw.

    uSbuntu Live Creator will also create a portable(no installation) version of VirtualBox, that can be launched by running Launch_usb.exe located in the Portable-VirtualBox folder in your USB Drive, so that you can launch ubuntu right in windows.

    Features :

    • Create bootable USB device from Ubuntu, Kubuntu, Xubuntu, Mint or CrunchBang
    • Enable persistency of your data
    • Launch Ubuntu directly in Windows with a special Portable VirtualBox
    • Hides created files on the drive.

    Steps to create a Bootable Ubuntu USB Drive :

    • Prepare your USB, ie., Format the drive with FAT32 or FAT partition
    • Download and launch the uSbuntu Live Creator and choose a USB key or drive in the list
    • Select a ISO file or CD of Ubuntu/Kubuntu/Xubuntu 8.10 or 9.04
    • Choose the size of persistency data.
    • Check the options you want
    • Click the thunder to start the creation

    Next, launch Portable Virtual Box and from the Boot Options you can start Ubuntu in

    • Persistent Mode (your data will be persistent)
    • Live Mode (all your data will be discarded after reboot)
    • Install (to install Ubuntu on your hard drive)
    • Integrity Check (check the files on your key)
    • Memory Test (can diagnose RAM problems)

    The data on your Ubuntu can be backed up by simply copying the �casper-rw file� in your Windows OS.

    Downlaod uSbuntu Live Creator

    { Read More }


    Thursday, 4 May 2017

    Create Ubuntu Live DVD using Pinguy Builder

    Create Ubuntu Live DVD using Pinguy Builder


    Remastersys was one of the best tool for live DVD creation. Remastersys project seized and not available now. Now Pinguy Builder available for this purpose. Pinguy Builder developed from Remastersys source code. So Pinguy Builder is very easy to use tool for live dvd creation.

    I tried to build Live DVD from Ubuntu MATE Linux. MATE Desktop available with this Ubuntu distro. MATE desktop gives classic look, not like Unity.

    1. Download and install Ubuntu MATE version either 14.04 or 16.04.

    2. Download Pinguy Builder package. Choose appropriate version. Read the instructions in the download page first. Pinguy Builder Version 4 works with Ubuntu 16.04 and select version 3 for Ubuntu 14.04.

    3. Install Pinguy Builder.
    Open terminal and install the package.

    sudo su
    dpkg -i pinguybuilder*

    The package required dependancy files. The command execution will end with error messages. Try to install dependency files,

    apt-get install -f

    Pinguy Builder can find in System > Administration after installation.


    4. Prepare system for Live DVD creation (Add and remove applications).
    5. Build Live DVD using backup/Dist option.
    { Read More }


    Wednesday, 26 April 2017

    Creating Your ultimate Ubuntu 7 10 Desktop

    Creating Your ultimate Ubuntu 7 10 Desktop


    Creating Your ultimate Ubuntu 7.10 Desktop

    Ubuntu 7.10 Codenamed Gusty Gibbon was released few weeks back with much fanfare ,now Ubuntu for past couple of years has been one of the most popular Desktop Linux distributions . Ubuntu 7.10 includes a number of features , applets and Wizards to simplify desktop Linux experience however because of many licensing restrictions it does not include out of the box support for popular audio/video codecs and many commercial but good applications . Also because of the limitation of trying to accommodate all kind of applications on single CD Ubuntu comes with a limited set of applications .

    Now , i often have arguments with my friends who are new to computers that windows is better , mac is better and blah blah blah and they often use this argument that its difficult for newbies to install applications , codecs etc on Linux as a way to justify their arguments . So well i decided being such a Linux fanatic i have to do something about it so well i thought of writing a guide sort of step by step tutorial that would allow anyone to have a kicking Linux desktop with most of the codecs enabled and descent set of applications in few steps .

    Steps Written in RED are of paramount importance and other steps may not work correctly if these steps are not followed .

    Step 1 : - Enabling Additional Repositories

    Now many applications need additional repositories to be installed or some to be enabled in Synaptic package manager so before trying out steps given below ensure that repositories in order.

    Launch Synaptic Package Manager (System -> Administration -> Synaptic Package Manager ) , then in Synaptic package manager go to (Settings -> Repositories ) you will find window like this . Ensure that all the check boxes are marked leaving source code(if you want to you can enable this also but you are not going to need this unless you are software developer) the dialog box should look like this .
    Dialog Box showing the repositories that should be enabled

    After completing above step you will find a dialog box like this


    Besides these you may also like to add medibuntu repositories if you want to install applications like ------- , to add mediubuntu repositories follow the following steps

    echo "deb http://packages.medibuntu.org/ gutsy free non-free" | sudo tee -a /etc/apt/sources.list

    and

    wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update



    2. Enabling Cool Graphics Effects

    Unlike previous releases of Ubuntu where one had to manually download and install compiz,beryl etc (Compiz Fusion is composite window manager that provides best features of Compiz and Beryl) from Repositories if one wanted to have glitzy visual effects . Ubuntu 7.10 comes with Compiz Fusion pre-installed and on supported hardware offers a wide array of Visual Effect . Now depending on graphic hardware of computer one could chose from three level of Visual Effect (From System -> Preferences -> Appearance )

    None : - This mode causes Ubuntu to use Metacity instead of Compiz Fusion , with no visual effect

    Basic : - Has only simple visual effects like shadows , fading windows-menus etc

    Advanced : - Recommended for PC with descent graphic hardware , enables effects like wobbly windows, transparency , animated workspace switching etc
    Visual Effect Dialog Box
    Now , the biggest advantage of Compiz Fusion is even on really slow hardware one can have descent set of visual effects even on my slow laptop i could use Extra graphics effects though it was painful while using application like OpenOffice because of my slow hardware.

    However , compiz-fusion is capable of much more and you can enable more desktop effects /customize compiz by typing the following command in the terminal window : -

    sudo apt-get install compizconfig-settings-manager
    After completing above step , you can customize compiz by going to System > Preferences > Advanced Desktop Effects Settings .

    3. Installing Audio/Video Codecs

    The first thing anyone who wants to use Ubuntu as a replacement to their windows operating system would like to do is install support for all kind of audio/video multimedia codecs . Ubuntu does not come installed with support for major audio/video formats because of licensing issue and other issues . To install support for audio/video codecs type in the following command in the terminal window : -

    sudo apt-get install gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg gstreamer0.10-plugins-ugly
    And if you want to install mp3 support in nautilus you may like to install mpg123 which is a nice command line based utility for playing mp3 files and it works well even on modest hardware .

    sudo apt-get install mpg123

    This would enable most of the popularly used codecs in the Totem Movie player which uses the GStreamer framework to play audio/video files.

    If you want to use a different media player and framework you might try installing MPlayer or VLC (depending on which you prefer ) instructions on installing them are listed below .

    Installing VLC Player : -

    LC Player is another of popular video player available under Linux . It is released under GNU General Public license and is available for different platform including Windows,Linux,BeOS,Mac OS X etc. VLC player is based upon free open source libraries like libdvdcss,FFMpeg for decoding various video formats.One Important feature of VLC Player is its ability to play files over NetWork Protocols. The Frontend of VLC player is created using wxWidgets toolkit and its appearance can be changed by using different skins. One Popular feature of VLC Player is its ability to play files that are incomplete/broken or partially downloaded , making it useful for previewing file while downloading on file-sharing networks.

    To install VLC Player type the following command in the terminal window : -

    sudo apt-get install vlc

    After completing above step launch vlc player from (Applications -> Sound and Video -> VLC media player )


    3. Installing Linux DC++ Client

    DC++ is a popuar tool used for p2p file sharing and is especially popular in college campuses , to install dc++ for linux follow the following instructions .

    Type the following command in the terminal window: -

    sudo apt-get install linuxdcpp
    And after completing above step launch dcpp from (Applications -> Internet -> DC++)
    Linux Client of popular DC++ Application


    aMule

    aMule is alternative to popular eMule program on windows platform , amule supports/works with eDonkey2000 Network or Kadnetwork and allows P2P sharing of files . aMule is available on number of platforms , Current supported systems include Linux, Mac OS X, FreeBSD, NetBSD, OpenBSD, Windows and Solaris.

    To install aMule type the following command in the terminal window : -

    sudo aptitude install amule
    After completing above step launch aMule from (Application -> Internet -> aMule )


    4. Installing Adobe Acrobat Reader


    * Requires Mediubuntu repositories

    Type in the following command in the terminal window :

    sudo aptitude install acroread acroread-plugins acroread-escript


    and , plugin for firefox

    sudo aptitude install mozilla-acroread


    5. Installing Macromedia Flash support and Sun Java JRE

    Both Macromedia Flash and JRE are an important part of internet experience almost all the websites use either of the two technology to add extra functionality to the web page . By default Ubuntu does not come preinstalled with support for these two , however they can be installed quite easily by typing in the following command in the terminal window .

    To install flash type in the following command in the terminal window this command is going to download a script that would further download the files needed for installing flash-support and install it .
    sudo apt-get install flashplugin-nonfree
    Script downloading further files needed for installing flash support



    and to install Sun Java JRE type in the following command in the terminal window .

    sudo aptitude install sun-java6-jre sun-java6-plugin sun-java6-fonts

    6. Scribus

    Scribus is one of the most impressive Desktop Publishing application that is free and cross platform . Scribus is available on Windows , Mac OS X , Linux , OS/2 etc . It is highly suited for preparing file for professional quality image setting equipment .It has high end page layout features of the kind found in Adobe PageMaker, QuarkXPress and Adobe InDesign.

    It can also create animated and interactive PDF presentations and forms. Example uses include writing small newspapers, brochures, newsletters, posters and books.

    Anyways , to install scribus type the following command in the terminal (Application ->Accessories -> Terminal )

    sudo aptitude install scribus
    and after completing above step launch scribus by typing "scribus" in terminal window.
    Scribus on Ubuntu

    7. Downloader For X

    Downloader for X is a nice download manager that allows downloading files from Internet , pausing them and downloading them later . It also supports splitting file into number of segments so that files could be downloaded quickly . However one thing that i didnt like about is its interface is somewhat difficult as compared to some of the download manager available on Windows.

    Anyways to install " Downloader for X " type the following command in the terminal window.

    �sudo aptitude install d4x "


    After installation is over launch �Downloader for X� by typing �d4x� in the terminal window , or by going to (Applications-> Internet -> Downloader for X )


    This is how Downloader for X looks




    8.
    Google Desktop

    Google Desktop allows one to full text search of a users e-mail, computer files, music, photos, chat, and Web pages viewed,OpenOffice documents , PDF files and more .

    Now similar tools already existed on Linux like beagle (supported by novell ) , meta tracker etc . However Google Desktop search is not based on any of these tools and uses its proprietary algorithms to search for files on the computer ,also being 1.0 release and more stable then these products it could be preferred over tools like beagle .


    To install type the following command in the terminal window : -


    wget http://dl.google.com/linux/google-repo-setup.sh


    and

    sudo bash google-repo-setup.sh


    Now after completing above steps to install Google Desktop Search type the following command in the terminal window : -

    sudo apt-get update

    and

    sudo apt-get install google-desktop-linux

    After completing above step logout of gnome session and relogin you would find the following dialog window

    select the appropriate option : -


    Now after choosing appropriate option you would find Google Desktop icon in the bar at the top of the screen , now it would automatically scan and index files on computer and store it in local database which could be searched using web browser .


    9. Google Picasa

    Google Picasa is an extremely professional good looking photo management application available on Windows ,Linux and Mac OS (??) . Now Google Picasa has a number of features that many photo management software on Linux dont have further Google Picasa looks very user friendly as compared to similar open source application available on linux . Now Google Picasa for Linux is not a native linux application but runs on Linux thru application layer called wine which allows many windows application to run flawlessly on Linux.

    Now to install Google - Picasa type the following command in the terminal window

    wget http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_2.2.2820-5_i386.deb
    and
    sudo dpkg -i picasa_2.2.2820-5_i386.deb
    After completing above step launch Google Picasa from


    Some Tips to consider before running picasa (taken from google picasa website )

    Tips

    • If you use NFS, when Picasa first starts, tell it to scan just your desktop! Otherwise Picasa gets real slow while it scans all your NFS directories!
    • To get Picasa to see pictures on your hard drive, click "File / Add Folder" (NOT "Import").
    • When adding a folder to Picasa, the default action is to remove the folder from Picasa. You have to actively choose Scan once or Scan always.
    • Picasa is not supported over remote X connections.

    10. Google Earth

    To install Google Earth type the following command in the Terminal Window (Application->Accessories -> Terminal ),keep in mind that googleearth is downloaded from Medibuntu repositories and not Ubuntu hence be sure you have activated the repositories correctly as described in first step of this article.

    sudo aptitude install googleearth"

    After downloading is over you will get a screen like this press �Yes� to accept the license agreement and complete software installation.


    Now you can launch Google Earth from (Application -> Internet -> Google Earth)

    A Picture of Google Earth Running on linux



    11.
    Installing gdesklets

    gdesklets gives user a collection of impressive widgets that can be placed on desktop this is similar to feature available on Windows Vista and Mac OS X , it does provide quite a good look to the desktop.

    To install gdesklets issue the following command at the command line

    sudo apt-get install -y gdesklets
    after installation go to (System -> Preferences -> Sessions) There go to Start up program and add gdesklets shell , now every time gnome loads up you should see your gdesklets on the desktop.

    This is how my desktop looked like with all the desklets (Widgets )

    12. Installing MPlayer with all codecs and dvd playing support

    *This step requires Medibuntu repositories

    MPlayer is one of the most popular media player available on linux , it supports playing all the major audio/video file formats . With w32codecs and libdvdcss2 it plays all the major audio/video format,however w32codecs has dll files from windows operating system hence its not available on the ubuntu official repositories and needs to be downloaded from the mediubuntu repositories.

    To install MPlayer with all codecs type in the following command in the terminal window : -

    sudo apt-get install mplayer


    and

    sudo apt-get install w32codecs libdvdcss2



    After completing above steps you could launch MPlayer by typing in gmplayer in the terminal window or from (Application -> Sound & Video -> MPlayer Movie Player )


    Quod Libet : -

    Quod Libet is an extremely versatile music player based on GTK+ that is extendible via plugins , has a rich feature set and has really unique feature of building playlist by searching for particular kind of music files based on search terms or regular expression . It has been programmed in Python programming language and hence its plugin are also created in Python. A number of plugins are available including ones that help in copying songs to digital audio players , last.fm plugin , advanced editing features and many more .

    Quod Libet uses GStreamer framework of GNOME to play audio files and hence integrates quite well the the GNOME desktop environment , also audio format supported would be same as the one supported by GStreamer so you may want to install mp3 support since by default many linux distributions these days dont come with mp3 support installed.

    To install Quod Libet type the following command in the Terminal Window : -

    sudo apt-get install quodlibet
    and after completing above step launch quod-libet from (Application -> Sound & Video -> Quod Libet )

    Quod Libet Website : - http://www.sacredchao.net/quodlibet


    13. RealPlayer

    Realplayer is one of the most popular cross platform media player available on Windows,Linux , Mac OS and a number of other platform . RealPlayer plays popular .rm ,rmvb,.mp3 and other media formats.

    To install RealPlayer first download RealPlayer10GOLD.bin file from the following website assuming you have downloaded it to your home directory .

    After downloading the file go to the directory where you have downloaded the file in terminal window and type

    After installation is over type

    �chmod +x RealPlayer10GOLD.bin�

    and

    �sudo ./RealPlayer10GOLD.bin�

    for installation to begin . Follow the instructions as presented to complete installation .

    After installation is over you can launch Real Player from (Application -> Sound & Video -> Real Player 10 ).

    Real Player for Linux




    Article Written by : Ambuj Varshney (blogambuj@gmail.com)
    For Linux on Desktop , http://linuxondesktop.blogspot.com
    (C) 2007 , Ambuj Varshney

    { Read More }


    Monday, 24 April 2017

    Converting and Transferring audio video to iPod iPhone on Ubuntu

    Converting and Transferring audio video to iPod iPhone on Ubuntu


    Converting videos to a form playable on iPod/iPhone and managing music of iPod has always been a problem on the Linux platform.This problem is compounded by the lack of documentation available. Now after spending some time searching for solution to this problem of transferring and managing music on iPod i finally came up with a solution to this problem which i have tried documenting in this article.

    Note : This documentation was written and tried on Ubuntu 8.04 so if you are using any other distro of Linux or version of Ubuntu there might be need of modifying the instructions.


    Converting videos to iPod format

    avidemux is a neat application that allows one to easily convert videos to a form capable of being played on iPod and a number of other gadgets. avidemux has a neat looking GUI and is very easy to use and install.

    Installing avidemux

    To install avidemux issue the following command in the terminal window :

    sudo apt-get install avidemux


    After installing you can launch avidemux from (Applicatons -> Sound & Videos -> Avidemux )

    This is how avidemux looks

    After loading avidemux open the file you want to encode in iPod format in avidemux by clicking on the Open button and selecting the file you want to convert.

    Now after the video is loaded into avidemux , in avidemux go to Auto->IPOD(mpeg4) you will find dialog box like this.


    Now depending on whether you are using iPod video (320x240 or 640x480) , iPod nano or iPhone(PSP 480x272 ) chose appropriate resolution and click Ok .

    Now click on the Save button to actually start converting the file.

    encoding in progress


    Transferring videos/music to ipod

    A number of tools are available on the Linux platform that allows you to manage music collection of your ipod however there are few that actually allows you to copy and manage music as well as video content of your ipod and gtkpod is one of them.It might not have as user friendly interface as iTunes available on the windows platform(and through Codeweavers Crossover office on linux too) nevertheless it does the job of transferring videos and songs to ipod and managing them.


    Installing gtk-pod

    To install gtkpod issue the following command in the terminal window

    sudo apt-get install gtkpod

    After installation is over go to (Applications -> Sound & Video -> gtkpod) to launch gtkpod application.

    This is how gtkpod looks

    Now after connecting launch gtkpod and you will find you ipod listed in the leftmost pane of the application. One thing i dislike about gtkpod is all the songs and videos are clubbed together into single list this makes managing music and videos a lot difficult.


    Now to add audio/video to your ipod just drag the respective file/folder into ipods playlist and press the save changes button and the files should be loaded properly in the ipod.

    There are a number of other user friendly applications available too that allows you to manage music collection of your iPod and iPhone some of them are Rhythmbox(comes preloaded with Ubuntu and as soon as you connect ipod is loaded automatically), Juk , AmaroK , Songbird etc .

    Article Written by : Ambuj Varshney (blogambuj@gmail.com)
    For Desktop on Linux Blog , http://linuxondesktop.blogspot.com
    (C) 2008 , Ambuj Varshney

    { Read More }