Sunday 5 October 2014

Stop bluetooth from autostarting in ubuntu 12.04 or 14.04.

Run sudo gedit /etc/rc.local and add the below line before the line with "exit 0":(last line)

rfkill block bluetooth

 And whenever you want to enable Bluetooth, you can do it through the top bar applet.

Fix Brightness control Issues in ubuntu 12.04 or 14.04.

The brightness control was not working and after trying several solutions, the one that worked for me was

Find if your computer is using onboard graphics card (On motherboard) or the discrete graphics card (Nvidia or ati radeon etc).

sudo cat /sys/kernel/debug/vgaswitcheroo/switch

On my computer I get the following.


Here IGD means Integrated graphics card which is Intel in my case.[See your computer specfication for this info].

And DIS means Discrete graphics card which is ATI in my case.s

Look for the '+' sign.
Since IGD has the plus sign that means that my computer is using the onboard graphics Intel card.

Now if your computer is INTEL too, then follow the below steps.

Create the file if it is not there.

sudo touch /usr/share/X11/xorg.conf.d/20-intel.conf
sudo gedit /usr/share/X11/xorg.conf.d/20-intel.conf
Add the below text into the file and save it.
Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:2:0"EndSection
Save it and log out and log back in. Now your brightness will start working.

Thursday 2 October 2014

Creating a desktop icon for an extracted application in Ubuntu

To create a new desktop icon for an application in ubuntu use the below simple method.
I am taking eclipse ide as an example,

First I download the archive from eclipse repository.

Then I move it to /opt/ by [This is where optional softwares or 3rd party softwares should ideally be stored in linux]

sudo mv /home/joe/Downloads/ /opt/
[Replace joe with your username]

cd /usr/share/applications/

sudo touch eclipse.desktop
("touch" is used to creates new text based files from the command line.)

sudo gedit eclipse.desktop
(To edit the file or use your preferred text editor)

Fill in the following details: (Replace Eclipse with your application name)


[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
X-Desktop-File-Install-Version=0.22


Here exec should contain the executable file inside your extracted application folder in /opt/<application>

Categories determines where it goes in the start menu or Applications menu on the taskbar.

And finally to install it , do a 
sudo desktop-files-install eclipse.desktop


See you all soon.