Skip to main content

Posts

Find size of package in Ubuntu before downloading it via command line

It is better to know the size of a package before downloading it. At times, apt-get install prompts before downloading the package and we can read the size there. However sometimes dependencies are downloaded and then there is a prompt for the BIG package. But by now some packages are already installed and if the BIG package is rejected because of slow bandwidth etc. an extra effort is to be made to clean the unnecessary packages too.( apt-get autoremove does it too. But, it is extra effort after all)   What we can do is this, apt-cache --no-all-versions show $package | grep '^Size: '   E.g: apt-cache --no-all-versions show qtoctave | grep '^Size: ' Size: 3891520 The size is in bytes. Ubunut Version: 12.04 LTS

Solving Ubuntu - Android unable to send file over bluetooth from phone to Dell Vostro Laptop

I have Ubuntu 12.04 LTS on my Dell Vostro laptop. I am able to send files over bluetooth from my PC to my Android mobile but not vice versa even though the two devices are paired.The file transfer just fails with " File Not Sent " message. The problem is the option to receive files is disabled in the gnome-file-share-properties of Ubuntu. To access this dialog open the terminal and type  gnome-file-share-properties Please note that you might be able to change the property if you are using the dialog as a root user.You need to be a non-root user for this. You just need to check the option for " Receive files in Downloads folder over Bluetooth " and it is done.

How a Linux System boots. What happens when you push the power On button...

Booting is a process when a computer system initializes itself and loads the operating system(OS). So what happens during a boot process on a Linux machine ( this post is relevant to Ubuntu, however most systems would do similar steps ) ? When you push the power on button, the BIOS (Basic Input/Output System) loads from the ROM present on the motherboard BIOS It launches the Power On Self test (POST) which involves starting the hardware specifically the screen and the keyboard and testing of the RAM i.e. main memory   Boot Loader Once the POST completes, the boot loader takes over. The boot loader is present on the hard disk and for Linux systems the common ones are GRUB and ISOLINUX . Depending on the type of system i.e BIOS/MBR or EFI /UEFI the location of the boot loader varies. For the former it is present at the boot sector and for the latter it is in EFI partition Common boot loaders for Linux are GRUB and ISOLINUX.The boot loader is  responsible for l...

Set default profile for Konsole on Ubuntu

The option for changing the default profile is not present in konsole (atleast not in Ubuntu 12.04 LTS). It is really irritating to switch profiles whenever I open a new tab. However, we can change it via the config file. The config file is usually present in the home folder /home/username/.kde/share/config/konsolerc It will look something like this, [$Version] update_info=konsole.upd:2.9.0-global-options [Colors] CurrentPalette=Forty Colors [Desktop Entry] DefaultProfile=NewDawn.profile [Favorite Profiles] Favorites=/home/username/.kde/share/apps/konsole/Shell.profile,/home/username/.kde/share/apps/konsole/NewDawn.profile [MainWindow] Height 900=901 State=AAAA/wAAAAD9AAAAAAAABf8AAANQAAAABAAAAAQAAAAIAAAACPwAAAAA ToolBarsMovable=Disabled Width 1600=1601 You can see in Favorite Profiles, I have added a profile named NewDawn apart from the default one named as Shell. My default profile was Shell.profile which I changed to NewDawn.profile by changing Defaul...

How to restore sources.list file on Ubuntu

I recently messed up with my Ubuntu 12.04 /etc/apt/sources.list file. In order to restore it you need to run software-properties-gtk This will cause a window to appear, I have chosen only Canonical-supported free and open-source software(main), you can choose other options you want. This adds the following line to my blank/previously in-existent /etc/apt/sources.list deb http://archive.ubuntu.com/ubuntu precise main Now, run apt-get update and other apt-get commands as usual.

Debugging PHP Extension Developed in C/C++ using GDB

Launch PHP with GDB  gdb /etc/bin/php GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /etc/bin/php...done. (gdb) Use gdb as if you are using php interactive console (gdb) run -r 'print phpinfo();'