Category: Tips n tricks


GRUB2 is the next generation of the GRand Unified Bootloader (GRUB). GRUB2 is derived fromPUPA which was a research project to investigate the next generation of GRUB. GRUB2 has been rewritten from scratch to clean up everything and provide modularity and portability

GRUB2 uses a newer method, so I’ll outline the brief how to protect you GRUB with password

First you’ll need to type the command:

grub-mkpasswd-pbkdf2

Now type your chosen password…

open up the terminal and type su to login as root then type

vi  /etc/grub.d/00_header

Now take your new password which will look something like this

grub.pbkdf2.sha512.10000.5F60AA485BA2B7EA640974BCDF5722F7600FDAF99AFE6AD8ECA33A1A05E53AB85B8B426E22AC246CC50558807BBA24752CBD61FD04155E26C41307F4AD64C9F7.0BDA015BBD97F09776CB66C90E0D82C2855C297039A1638D28A77FE2DDA3C8B8105C82FB2766FAEF4400647917A82CF3FB4B8E9B43ACBA6439F1E3C9B1A90194
And use the following example of how to paste it in at the end of the 00_header file under the last line of code so it will look like this:

cat << EOF
set superusers=”putyourusernamehere”
password yourusername yourpassword
EOF

Now update your GRUB with the following command

update-grub

NOW YOUR NEW PASSWORD POLICY WILL BE ENFORCED

NOTE:
please use your own user name and passwords,do not putyourusernamehere and the yourpassword provided above as this is only an example.


							

1. Download Javaplugin

go to suns site and get the latest java rpm

http://www.java.com/en/download/manual.jsp?locale=en

2. Copy and make it executable

2a. create a directory

mkdir /usr/java

2b. copy the downloaded rpm to /usr/java

cp /home/user/Downloads/jre-6u31-linux-i586-rpm.bin  /usr/java

2c make it executable 

chmod +x jre-6u31-linux-i586-rpm.bin

3. Install Plugin

[root@localhost anyweb]# ./jre-6u31-linux-i586-rpm.bin
Do you agree to the above license terms? [yes or no]
y
Unpacking…
Checksumming…
0
0
Extracting…
UnZipSFX 5.42 of 18 April 2012, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jre-6u31-linux-i586.rpm
Preparing… ########################################### [100%]
1:jre ########################################### [100%]

Done.

4. Make it work for Firefox and Chrome

4a. For Firefox

sudo ln -s /usr/java/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin.so

4b For Chrome

4b1 create a Chrome plugin folder:

su -c ‘mkdir /opt/google/chrome/plugins’

4b2 Create symbolic link

su -c ‘ln -s /usr/lib/mozilla/plugins/libjavaplugin.so /opt/google/chrome/plugins/libjavaplugin.so’

If you are Package Maintainer or wanna create some packages easily for personal use,Well

here’s the best package Build tool

What is fpm?

It helps you build packages quickly (Packages like RPM and DEB formats).

Things that are in the works or should work

Sources:

  • gem (even autodownloaded for you)
  • python modules (autodownload for you)
  • pear (also downloads for you)
  • directories
  • rpm
  • deb
  • node packages (npm)

Targets:

  • deb
  • rpm
  • solaris
  • tar
  • directories

1. Get the app

You can Download it from git-hub here’s the link https://github.com/jordansissel/fpm

2. Install fpm

2a. Install Dependencies

you need the following packages to be installed before using fpm

Ruby

Ruby-devel

Rubygems

To install them on Fedora/Cent os/RHEL

yum install ruby ruby-devel rubygems

To install Them on Ubuntu/Debian/Linux mint

sudo apt-get install ruby ruby-devel rubygems 

2b. Install fpm

1. unzip /PATH.zip

2. cd /PATH

3. gem install fpm

3. Run fpm

to run fpm just type following on terminal

fpm -s <source type> -t <target type> [options]

 

Here are some useful shortcuts to give you a complete Gnome experience

Window Shortcuts

  • Alt+Tab – Switches between currently open windows
  • Alt+F4 – Closes window
  • Alt+F10 - Maximises current window
  • Alt+F9 – Minimises current window
  • Alt+F8 – Resizes current window (again,can be moved with mouse or keyboard)
  • Alt+F7 – Moves the current window
  • Alt+Space – Brings up window menu with various options as minimize, maximize etc.
  • Alt+F5 – Returns window to ‘normal’ or previous size

Common Application Shortcuts

NOTE: These shortcuts do not apply in all applications

  • Ctrl + C – Copy the selected text/object
  • Ctrl + X - Cut the selected text/object
  • Ctrl + V – Paste/insert the selected text/object
  • Ctrl + Q – Quit the current application
  • Ctrl + Shift + Z - Redo a change that you just undid
  • Ctrl + Z - Undo the last change you made
  • Ctrl + A –  Select all text
  • Ctrl + B – Make the selected text bold
  • Ctrl + I – Make the selected text italic
  • Ctrl + P - Print the current document
  • Ctrl + O - Open another document
  • Ctrl + S - Save the current document
  • Ctrl + U - Underline the selected text
  • Ctrl + N - Open a new document or window

Gnome Shell Shortcuts

  • System Key (Windows Key) - Allows you to switch between the overview and the desktop
  • Ctrl+Alt+Shift+Up/Down arrow - Move the current window to a different workspace
  • Alt+F1 - (same as the above) Switches between overview and desktop
  • Ctrl+Alt+Up/Down arrow - Allows you to switch between the workspace
  • Alt+F2 – Opens the Command Dialog
  • Alt+Tab - Switches between the applications
  • Alt+Shift+Tab - Switches between the applications in reverse direction
  • Esc - Closes the command dialog, menus/calendar, overview, search in the overview, Looking Glass
  • Alt+[key above Tab] - Switches between the windows of the same application
  • Ctrl+Alt+Tab - Allows access to accessibility switcher
  • Ctrl+Shift+Alt+R - Allow to start screencast recording, hitting the same stops recording

Command Dialog Shortcuts

You have to enter the these codes in the Command Dialog (Alt+F2)

  • r or restart - To restart GNOME Shell
  • rt - To reload the GNOME Shell theme
  • debugexit – To quit GNOME Shell

Mouse Tips

  • Ctrl+Clicking on the application icon for a running application will open a new window of that application in the current workspace.
  • Right clicking on the application icon – for a running application will display a menu with window titles for selecting one of the windows.
  • Middle clicking on the application icon – will launch it on a new workspace.
  • Window maximizing - You can maximize a window by dragging it to the top edge of the screen. You can also double-click the window title to maximize. To unmaximize, pull it down again.
  • Moving your mouse pointer to the top left corner of the screen – will activate the overview

Source : https://live.gnome.org

The C-Support Vim Plugin offers easiest way to do all of the above, saving lot of time and keystrokes for C and C++ programmers.

The plugin was written by Fritz Mehner, who explains the purpose of the plugin as: “Write and run programs. Insert statements, idioms, comments”.

1. open Directory /usr/src

cd /usr/src

2. Download the bash support plugin

Download bash support plugin from vim.org

wget -O bash-support.zip http://www.vim.org/scripts/download_script.php?src_id=9679

alternatively you can download from the  following link

http://www.vim.org/scripts/download_script.php?src_id=9679

3. Install C++ support vim plugin

mkdir ~/.vim   #(if the directory does not exist already)

cd ~/.vim

unzip /usr/src/cvim.zip

4. Enable plugin

Add the following line to the ~/.vimrc

vim ~/.vimrc

filetype plugin on (add this line on ~/.vimrc )

Screenshot of Enabled C++ vim plugin

The bash-Support Vim plugin offers easiest way to do all of the above, saving lot of time and keystrokes.

The plugin was written by Fritz Mehner, who explains the purpose of the plugin as: “Write and run BASH-scripts using menus and hotkeys.”

This article explains how to install the plugin for vim

1. open Directory /usr/src

cd /usr/src

2. Download the bash support plugin

Download bash support plugin from vim.org

wget -O bash-support.zip http://www.vim.org/scripts/download_script.php?src_id=9890

alternatively you can download from the  following link

http://www.vim.org/scripts/download_script.php?src_id=9890

3. Install bash support vim plugin

mkdir ~/.vim   #(if the directory does not exist already)

cd ~/.vim

unzip /usr/src/bash-support.zip

4. Enable plugin

Add the following line to the ~/.vimrc

vim ~/.vimrc

filetype plugin on (add this line on ~/.vimrc )

Screenshot of Enabled bash vim plugin

Virtualbox a JVM based virtual machine is the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 2.

Presently, VirtualBox runs on Windows, Linux, Macintosh, and Solaris hosts and supports a large number of operating systems, VirtualBox is a general-purpose full virtualizer for x86 hardware, targeted at server, desktop and embedded use.

1. Download Virtualbox

you can download Virtualbox from Orcale Virtualbox download page

2. Switch to root user

sudo -i

##OR##

su

3. Install Dependencies

Before installing virtualbox please install the following Dependencies

GCC – GNU C compiler

GCC -C++ – GNU C++ Compiler

To install them just type the following in terminal as root user

yum install gcc gcc-c++

4. Install Virtualbox

To install virtualbox go to your downloads folder or the location where you saved your

virtualbox installer by typing following into your terminal

cd  /home/user/Downloads (or the location where you saved it cd /your location)

now install the package by the following command

rpm -ivh VirtualBox-4.1-4.1.10_76795_fedora16-1.i686.rpm

Here are some Screenshots which will show you the installation process

5. Virtual Box Welcome screen

Screenshot of Virtualbox running on Fedora 16(‘Verne’)

recordMyDesktop is a desktop session recorder for GNU / linux that attemps to be easy to use, yet also effective at it’s primary task.

As such, the program is separated in two parts; a simple command line tool that performs the basic tasks of capturing and encoding and an interface that exposes the program functionality in a usable way.

The commandline tool (which essentially is recordMyDesktop) is written in C,while there are two frontends, written in python with  pyGtk (gtk-recordMyDesktop) and pyQt4 (qt-recordMyDesktop).

recordMyDesktop offers also the ability to record audio through ALSA,OSS or the JACK audio server

recordMyDesktop produces files using only open formats,These are theora for video and vorbis for audio,using the ogg container.

Install gtk-recordmydesktop

gtk-recordmydesktop is added in fedora repository,To install gtk-recordmydesktop

sudo yum install gtk-recordmydesktop

Start recording with gtk-recordmydesktop in Fedora 16

You can easily tweak your Fedora 16 using extensions . With this guide you have two option, install all extensions once or install just fe of them  what you want to use. There’s a lot of  extensions, but those which are presented in this guide can be installed via the YUM package management, as well as they are of good quality.

1. Switch to root user

su

##OR##

sudo -i

2 Install gnome-tweak-tool

gnome-tweak-tool works as a dependency for installing extensions

to install gnome-tweak tool copy the following

[root@localhost ~]#yum install gnome-tweak-tool

3.Install Gnome-Shell extensions

3.1 Classic Alt+Tab behavior (Window based instead of app based URL)

Lets you use classic Alt+Tab (window-based instead of app-based)

in GNOME Shell. GNOME Shell groups multiple instances of the same

application together

yum install gnome-shell-extension-alternate-tab

NOTE: This extension disables grouping.

 3.2 Replace Suspend with “Power off” on user menu  

For those who want a power off item visible at all the time,

replaces GNOME Shell user menu with one featuring separate

Suspend and Power Off. Adds the ability to hibernate as well.

yum install gnome-shell-extension-alternative-status-menu

3.3 GNOME 2.style application menu for GNOME Shell

yum install gnome-shell-extension-apps-menu

3.4 Assign workspaces to applications

Lets you manage your workspaces more easily, assigning a specific workspace to each application as soon as it creates a window, in a manner configurable with a GSettings key.

yum install gnome-shell-extension-auto-move-windows

3.5 Collection of extensions providing additional and optional functionality to GNOME Shell

GNOME Shell Extensions is a collection of extensions providing additional and optional functionality to GNOME Shell. Common files and directories needed by extensions are provided here.

yum install gnome-shell-extension-common

3.6 Show CPU temperature on GNOME Shell

Gnome Shell Extensions that adds an applet on the panel which reveals current CPU  temperature in Degree Celsius and Fahrenheit.

yum install gnome-shell-extension-cpu-temperature

3.7 Shows a dock-style task switcher permanently

Shows a dock-style task switcher on the right side of the screen permanently.

yum install gnome-shell-extension-dock

3.8 Disk device manager in the status area

Adds a menu in the system status area that tracks removable disk devices

attached and offers to browse them and eject/unmount them.

yum install gnome-shell-extension-drive-menu  

3.9 GNOME Shell extension for GPaste

yum install gnome-shell-extension-gpaste

3.10 Manage icons in top bar

A gnome-shell extension to manage icons in top bar. Add/remove icons

from top bar panel by simple editing gsettings.

yum install gnome-shell-extension-icon-manager

3.11 Control Mediaplayers

A gnome-shell extension to control mediaplayers. Gnome shell extension

Mediaplayers is a simple extension for displaying player control, music &

music cover in Gnome Shell.

yum install gnome-shell-extension-mediaplayers

3.12 Arrange Windows in Overview

Arrange windows in overview in a more native way.This extension employs an

algorithm(taken from KDE) for layouting the thumbnails in the overview that

more closely reflects the positions and relativesizes of the actual windows,

instead of using a fixed grid.

yum install gnome-shell-extension-native-window-placement

3.13 Remove Name and IM Status

A gnome-shell extension for removing the name and the IM status

yum install gnome-shell-extension-noim

3.14 Disable Hot Corner Ripple Effects

This Gnome Shell extension disables Activities hot corner ripple effects

yum install gnome-shell-extension-noripple

3.15 Pidgin Integration

This package contains the necessary components to integrate pidgin with GNOME Shell

yum install gnome-shell-extension-pidgin

3.16 Gnome 2 Style Menu

Places menu indicator in the system system status area that resembles

the Places menu from GNOME 2

yum install gnome-shell-extension-places-menu

3.17 Remove Accessibility Icon

 A gnome-shell extensions for removing the accessibility icon.

This simple extension does nothing more than to remove the

accessibility icon in the top right corner of the GNOME panel.

yum install gnome-shell-extension-remove-accessibility-icon

3.18 Remove Bluetooth Icon

Removes the Bluetooth icon from upper right corner of Desktop

yum install gnome-shell-extension-remove-bluetooth-icon

3.19 Remove Volume Icon

Removes volume icon

yum install gnome-shell-extension-remove-volume-icon

3.20 Top Right Hot Corner

A gnome-shell extension for an additional hot corner to upper right of monitor.

yum install gnome-shell-extension-righthotcorner

3.21 Monitor Your System Status

yum install gnome-shell-extension-systemMonitor

 3.22 Gnome Shell User Theme Selector

yum install gnome-shell-extension-theme-selector

3.23 Lets the User Select a Custom Theme for the Shell

Lets the user select a custom theme for the Gnome shell.

yum install gnome-shell-extension-user-theme

3.24 Keyboard Selection of Windows and Workspaces in Overlay Mode

Allow keyboard selection of windows and work-spaces in overlay

mode in GNOME Shell.

yum install gnome-shell-extension-windowsNavigator

 3.25 Workspace Indicator

yum install gnome-shell-extension-workspace-indicator

3.26 Fast Switching Workspaces

yum install gnome-shell-extension-workspacesmenu

3.27 Monitor Status Indicator

yum install gnome-shell-extension-xrandr-indicator

4. Enable / Disable and Configure Gnome Shell Extensions and Themes on Fedora 16

4.1 Open gnome-tweak-tool

On menu it’s called Advanced Settings or on Terminal write:

gnome-tweak-tool

4.2 Advanced Settings (gnome-tweak-tool) Basic Config Screen

A simple and easy way to make you vi editor look like vim

1.Change root user

sudo -i

##OR##

su

2.Install Vim enhanced package

 [root@localhost user]#yum install vim-enhanced

3.Check for version

 vim –version

 it will look like this

4.Set the alias pointing vi to vim

alias vi=vim

to make it permanent open ~./bashrc or /etc/profile  or /etc/profile.d/vi-vim.sh(depends on os)

5.Test changes

Follow

Get every new post delivered to your Inbox.