Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Wednesday, January 1, 2014

Ubuntu upgrading - mount /tmp as noexec error

Error:

     Error : mount /tmp as noexec error

Reason:

While upgrading Ubuntu it stores the temporary files in temp directory and tries to execute from the same location. By default, /tmp directory doesn't contain execute permission for security reasons. So that it can't be start from the location /tmp.

Solution:

For while, give execute permission to /tmp and run the upgrade once.
Run the below command to do the same.

    mount -o remount exec /tmp

Friday, December 16, 2011

Err: WebGL not worked with Chrome 15 in Ubuntu 11.10

Error:
              WebGL is not enabled for your browser.

Common Reasons & Solutions
:

              This will occur in some sites that contains rich contents like 3D web graphics. In Google Chrome build (15.xx) after updating the Ubuntu 11.10 makes this error due to many reasons. Some of them are,


Chrome extensions that blocks webGL
              Adblock extension for Chrome may cause the error. For that,
  • Remove or disable the extension for while and restart the browser once.
By default not Enabled by the Browser 
              If it is not enabled by default, pass it as argument at run time.
  • In Windows,
    • chrome.exe --enable-webgl
  • In Linux
    • ./chromium-browser --enable-webgl
Graphics card not detected or not configured well 
              In this case, we need to use different parameter as an argument. This is only for Linux.
  • Using terminal,
    • ./chromium-browser --ignore-gpu-blacklist
  • Using main menu,
    • Edit "Main Menu -> Internet -> chrome" link. Then click the properties on right side and add the parameter as argument in the application input box after the program name like "/usr/bin/chromium-browser %U --ignore-gpu-blacklist".

Note: This is tested under Ubuntu 11.10.

Thursday, December 1, 2011

Download cached flash videos of Firefox and Chrome in Linux(Ubuntu)

In recent days, you could feel that the played Flash videos is no longer available in /tmp directory like some time before. This was the easiest way to get the video that was played just before completely on any browser from such Flash playing sites like Youtube. Now we can't use the same olden ways.
Here is an alternate way to get the video by doing some workaround.

By default, while executing any commands or application, Linux maintains a copy of the files that process using currently untill the process get closed or killed manually. These files are kept under a  unique directory with the name of that process id under /proc folder. Now you may got the idea i think. Yes, we need do the following thinks to find the exact path by finding the process id of the browser we are using. You may use any browser, but the concept is same.

To find the process id ( -i means case insensitive on search) ,

$ lsof | grep -i flash
This will yields the result like,

              chromium- 3111   csenthil   25u      REG       8,23     26852199      66502 /tmp/FlashXX7qfvPA (deleted) 

From the result, we can conclude that the process id of the browser (here 3111). Next step, we need to list the all Flash files under the process by using the following command.
$ ls -al /proc/3111/fd | grep deleted 
This will yields the result like (lists more files when you running more than one player instance),

              lrwx------ 1 csenthil csenthil 64 2011-12-01 20:57 25 -> /tmp/FlashXX7qfvPA (deleted)

From that, we can can conclude that the expected file resides there in the name of 25. Then why are you waiting for... Just copy the file where ever you want like,  
$ /proc/3111/fd/25 /home/csenthil/Desktop/saved.mp4


Note: This is tested under Ubuntu 11.04


Monday, November 28, 2011

Disable header and footer lines printed with web pages in Firefox

Task:
           To disable the header and footer lines getting printed with Web Pages while printing from Firefox permanently. In general, users needs to disable these settings in printer settings window each time while give print. The procedure given below will disable the options permanently.

Solution:

            Firefox itself has its own header and footer settings for this purpose and disabling of this will not fulfill the complete task what we want. For that we need to disable that settings in printer side also. To do so,

            Open Firefox and run the url 'about:config' to get the Firefox's settings page.

For Header,

  1. To filter out the settings respect to our need, give '_header'
  2. Unset all the values related to header such as '&T', '&D' and etc., from both Firefox and Printer that you have installed


For Footer,
  1. To filter out the settings respect to our need, give 'footer'
  2. Unset all the values related to header such as '&T', '&D' and etc., from both Firefox and Printer that you have installed

From now, no Header and Footer lines will be there in printouts that print.

Note : This is tested under Ubuntu 11.10.

Enable only manual paper feed for printers in Ubuntu

The following method is used to enable manual paper feeding option of HP printers in Ubuntu Linux.

  1. Install required printer driver software while configuring new printers (Not all printers having drivers for Ubuntu. But HP providing that)
  2. Open the HPLIB Toolbox program from menu
  3. Under General section, select the value Tray1 (Manual) for the option called 'Paper Source' (Ref the image given below)
  4. Save it and close.


From now on, the printer will wait for you to feed the paper even if you gave the print command. This may be useful when you need one side printouts for particular usage.

Note : This is tested under Ubuntu 11.10 with HP Laser set Printers.

Tuesday, November 22, 2011

Err: Unlock Login Keyring in Ubuntu 11.10 problem

Error:
Unlock login keyring password.

Reason:
Most of the Ubuntu users could faced this problem. This is occurred due to the following reasons.

  1. While using of autologin facility
  2. Frequent password change
Keyrnig password is the authentication key to execute what ever thing is done with mouse in Gnome screen. Each thing what we have done in GUI is converted into system commands and then shell only executes that and returns the result to Gnome.

Du to any one of the mentioned above reasons, the keyring password got collapsed and it asks us at every boot for the password that is just previous to the current logged in password we have changed (ie. last changed password.).

Solution:
This can be solved by following two ways. 
  1. Passing last changed password
    By providing last changed password for once. Then it will be automatically changed to current password we are using.
  2. By setting empty password to the keyring.

    This can be done by changing the password to empty using 'Passwords and Encryption Keys' tool that exist in Ubuntu by default. 
    1. To get this window in Ubuntu 11.10, click on 'Activities' and then type 'password'. The result window shows that application on that and click on that. 
    2. Right click the 'Passwords : login' and select 'Change password'.
    3. Give the current or last changed password in the column 'old password' and leave the new and confirm password as empty.
    4. Save it.

Note: This is tested under Ubuntu 11.10

Thursday, November 17, 2011

quicktime demuxer not found in Ubuntu 11.10

Error:
While try to play .mp4 files in Ubuntu 11.10, it will search for the missing plugin and tries to find in repository. After taking a quit time it shows the error like 'quicktime demuxer not found'.

Reason:
qtdemux plugin is moved from bad to good in this update and renamed to isomp4 according to changelogs, but it looks like the relevant mapping were not updated. So that it is trying to open files with that muxer in Ubuntu 11.10 (gst-plugins-good0.10 version 0.10.30-1ubuntu7) and fails with the message "quicktime demuxer" plugin can not be found.
Solution:
To remove the existing plugin mapping from the system,
Remove the configuration file by,
$ rm ~/.gstreamer-0.10/registry*.bin
otherwise rename it like,
$ mv ~/.gstreamer-0.10/registry*.bin ~/.gstreamer-0.10/registry*.bin.org
Now play the same video again and see it will works.


Note : This is tested under Ubuntu 11.10.
Ref   :  https://bugs.launchpad.net/ubuntu/+source/gst-plugins-good0.10/+bug/869564

Tuesday, November 15, 2011

Err: HipHop checkSystemGVOrder: Assertion `false' failed

Error:
While compiling PHP applications using hiphop,
running hphp...
parsing inputs...
parsing inputs took 0'07" (7204 ms) wall time
pre-optimizing...
pre-optimizing took 0'02" (2224 ms) wall time
inferring types...
inferring types took 0'00" (663 ms) wall time
post-optimizing...
post-optimizing took 0'00" (509 ms) wall time
creating CPP files...
hphp: /home/ubuntu/Desktop/dev/hiphop-php/src/compiler/analysis/variable_table.cpp:818: void HPHP::VariableTable::checkSystemGVOrder(HPHP::SymbolSet&, unsigned int): Assertion `false' failed.
Core dumped: Aborted
hphp failed
running hphp took 0'12" (12662 ms) wall time

Reason:
This error occurs when the path for HPHP compiler is not set or incorrect path were set.
Solution:
To get the rid of it, run the following command under "hiphop" base directory not from other directory.

$:~/Desktop/dev/hiphop-php# export CMAKE_PREFIX_PATH=`/bin/pwd`/../

$:~/Desktop/dev/hiphop-php# export HPHP_HOME=`/bin/pwd`
$:~/Desktop/dev/hiphop-php# export HPHP_LIB=`/bin/pwd`/bin

or else set the exact path in /etc/environment file if you know.

Note : This is tested under Ubuntu 11.10.

Ubuntu login screen background change in 11.10

To change the login screen background image of Ubuntu 11.10,


Edit the file from the path called "/etc/lightdm/unity-greeter.conf" and set new image path for the property called "background". You may either set new path or copy the required image to that default path and change the name itself.


Here you can also change the default settings of,

  • Font
  • Theme
  • Icon theme
and other some more display elements.



Tuesday, November 1, 2011

Save entire console session actions into a file in Linux

Task:
          While installing or debugging a task in Linux, previous session history will helps a lot to review the work what we have done when if any error occurs. For this, we need to store the entire session action and its output into a file or some where.

Solution:
           This can be achieved by more commands depends of the user requirement.



  1. Command wise
    1. Using output redirect
          This is the simplest command used to save our console outputs into a file.
          $ ls -al > out.txt
          $ ls -al >> out.txt

      Here, '>' used to redirect the output to a file and '>>' is used to append the new output with existing one. Main drawback of this command is, the console will not display anything. All the outputs will goes to file instead of console.
    2. Using 'tee' command
          This command overrides the drawback of previous method. This will send the copy of the output only to the file. So that the normal output is displayed in console as it is.

      $ ls -al |tee out.txt

      This will erase the previous contents while writing new one. To avoid this use the following syntax to append

      $ ls -al |tee -a out.txt

      Main drawbacks of previous two commands is, we need to give the tailing commands (either > or tee) with each and every commands we are executing in that console.

  2. Session wise

    In this method, the entire session from the start to end will be save given file. This contents will be written into the file once we close the terminal.
    1. Using 'script' command
         Run the following command before starting any execution in console to start recording.

      $ script -a today.txt

      Then do your usual work and once complete the tasks then quits the terminal and see the saved file contents like,

      $ more today.txt


Note: This is tested under Ubuntu 11.10




Tuesday, October 25, 2011

View tamil contents properly in Chrome under Ubuntu

Under Ubuntu or some other Linux flavors, Chrome browser doesn't have enough Tamil core fonts (UTF or Local) by default to render/display the contents correctly. So we need to install the required Tamil fonts to render properly.


In Ubuntu, 
         Install the font package called 'ttf-tamil-fonts' to get set of Tamil fonts. This will install the fonts in system font folder. So that this can be used by any other applications system wise not only Chrome.



Monday, October 3, 2011

Thunderbird: import or using of saved or backup folder in new instance in Linux

To back-up the thunderbird email client files with all email accounts
    Copy the entire .thunderbird folder from the filesystem (normally it is located at /home/<username>/.thunderbird) into some safe place (ie. other than the Operating System partition).

To restore the saved files in new Operating System or newly installed thunderbird client or in some other systems.
  1. Install the thunderbird client (ie. apt-get install thunderbird)
  2. Run the client from menu or from console once. (ie. let the programe to create neccessary folders on the path) and close it by not making any changes like new account configuration)
  3. Move the .thunderbird folder to somewhere or rename it like

    $ mv /home/<username>/.thunderbird /home/<username>/.thunderbird.org

  4. Let /Data/.thunderbird was the saved folder of thunderbird, then

    $ ln -s /Data/.thunderbird /home/<username>/.thunderbird
  5. Run the thunderbird to load the old mails and further use.

Note : This is tested under Ubuntu 10.x and 11.x


 

Thursday, September 22, 2011

Google or gmail account not connected via Pidgin in Ubuntu

Error:
         Some new version of Pidgin messenger under Linux Operating Systems (like Ubuntu 11.04 or older) doesn't connect with the Google server after adding new gmail account on it and shows one of the following,
  1. Nothing will be displayed and it tries to re connect always.
  2. It shows the error like 'Unable to connect'
Reason:

          This caused because of the connection parameters for the Google server is not got updated in new versions of Pidgin.

Solution:

          To get the rid of it, 
  1. Open 'Manage Accounts' from Accounts menu or Press Ctrl+A.
  2. From that list displayed, select the gmail account has to be changed and press 'modify'.
  3. Select 'Advanced tab' on the modify window and fill the settings as given in the screen shot given.
  4. In 'Proxy' tab select 'no proxy' option.
  5. Then disable and enable the account once to get the fresh settings entered.





    That's it. Enjoy the chatting here on.



Friday, June 17, 2011

Change the keyboard layout on the fly using shortcut key


The following steps guides you to create a new keyboard layout in linux environment and how to set short cut key for changing layouts on the fly.

Steps:

  1. Go to System->Preferences->keybord menu. This wil shows you the keyboard preferences window.
  2. Select Layout Tab. It shows the list of default layouts and its options.
  3. Click Add button to add new layout.
  4. From that, select india for layout type. It will gives you some variant choices of layouts like

  • Bengali
  • Hindi Bolnagri
  • Oriya
  • Telgu
  • Tamil Unicode Typewriter and etc.,

    1. From the list select one layout what ever you want and click add.
    2. Now make sure that USA layout is selected as default. If not make it as default.
    3. Then you have to assign a new short cut key for switching the layout. For that click layout options button.
    4. From the list will be shown, select Layout switching option.
    5. Some combination of key strokes will be there by default. If you want to change the deafult one, un check the existing and select new one from the list which is convenient to you and then close the window.
    6. To test the layout switching is working or not, use the testing box given in bottom of that window. Then close the window.
    Now you have successfully added a new layout with shotcut key.
    Then open your document writer and start typing. Press the shortcut key to switch between layouts and continue typing.

    Note: 
              This document has been tested under ubuntu linux.

    Runnig a program with root permission always

            Programs can be invoked with root permission (or) As root user with the help of gksu command in Ubuntu.

            For that,
            Edit a Launcher from Desktop or else from Main menu. From right click that and choose the option called 'Properties' to change settings. In that, add 'gksu' in front of the command there in "command" box.
            For example, a shutter application's  can be changed as

                gksu shutter %F

    Tuesday, June 14, 2011

    Clear your visit traces at remote host

        rm /root/.ssh/known_hosts;
        rm /home/otc/.ssh/known_hosts;
        echo ""  > /var/log/lastlog;
        echo ""  > /var/log/wtmp;
        echo ""  > /var/log/syslog;
        echo ""  > /home/otc/.bash_history;
        echo ""  > /root/.bash_history;


    Font cache clear without logout

        After installing new fonts into the system, it will not come to picture till one log out action. To override this run the following command to refresh the font cache.
    $ fc-cache -fv

    General shortcuts

    # Login as a root:
        sudo su -
        sudo means 'super user do'.
    # To start a root shell (i.e. a command window where you can run root commands), starting root's environment and login scripts, use:
        sudo -i     (equivalent to sudo su - , gives you roots environment configuration)
    # Start a root shell, but keep the current shell's environment, use:
        sudo -s     (equivalent to sudo su)
    # To execute more than one cmd use '&&' like
        $ make && make install
    # To search for a pacakage
        $ sudo aptitude search
      or to list only the latest
        $ sudo aptitude show
    # To install dependencies
        $ apt-get build-dep
    # To empty the Trash
        $ rm -rf ~/.Trash/*
        $ sudo rm -rf ~/.local/share/Trash/files/*
    # To find the process id's of given process and its related things
        $ pgrep
    # Execute The Last Executed Command
        $ !!
    # Execute The Last Command Starting With.. S
        $ !s
    # Run a Command Repeatedly and Display the Output. Watch runs command repeatedly, displaying its output (the first screenfull). This allows you to watch the program output change over time. By default, the program is run every 2 seconds. watch is very similar to tail.
        $ watch -d ls -l
        This will watch the current directory for any file changes and highlight the change when it occurs.
    # Save Quickly in VI/VIM. If you’re in a hurry, you can save and quit the file you’re editing in vi by exiting insert mode, holding shift, and hitting z twice.
    # Quickly Log Out of a Terminal

        $ CTRL+d
    # Navigate to the Last Directory You Were In
        $ cd -
    # Make Parent Directories the Smart Way
        $ mkdir -p /home/adam/make/all/of/these/directories/

        will create all sub directories as needed even if it is not.
    # To Set custom time stamp of a file
        $ touch -c -t 0801010800 filename.c
        will show the time stamp as 2008-01-01 8:00. The format is (YYMMDDhhmm).
    # To print the files content which names are all start with ho*

        $ ls -l |grep -v ho*
    # To print all the hardware details
        $ lshw
       for html output
        $lshw -html > path/sys.html
    # To list all the installed packages
        $ dpkg -l
        to list the installed paths
        $ dpkg -L
    # To search a pattern in files
        $ find -R "pattern" *
    # To disable power button action
        $ chmod 000 /etc/acpi/powerbtn.sh
    # To display all the USB Devices connected
        $ lsusb

    To know the OS version

            lsb_release -a

    Output:
            No LSB modules are available.
            Distributor ID:    Ubuntu
            Description:    Ubuntu 11.04
            Release:    11.04
            Codename:    natty

    Monday, June 13, 2011

    Systray date/time format change

    1. In gconf-editor,
          go to apps > panel > clock_screen0 > prefs.
    2. Edit the format field and type 'custom' on it.
    3. Now, in the custom_format field type
                <span color=”#333333″>%a %d %b</span> <b>%H:%M</b>