Wednesday, February 19, 2014

Enable wireless on boot

If wireless connection is not enabled by default on boot, you have to do two simple steps:
  • in a Terminal (CTRL+ALT+T) type  sudo gedit /etc/profile.d/enable_wifi.sh  and give your root password
  • copy the following line, save and close:  nmcli nm wifi on
Now it should be enabled every time you boot the system.

Add keyboard shortcut for shutdown dialog

If you want to add a custom keyboard shortcut to open the shutdown menu, you have to:

  • go on Menu --> Keyboard, and then on the "Shortcuts" tab
  • click on the "+" button
  • give a name you desire and the following command:  gnome-session-quit --power-off
  • Select the new shortcut and press the key combination you want to assign to it
  • Close, and you're done!
You may find also this post useful: How to add hibernate option to Mint 13

Canon MG4250 installation on Mint13

The instructions presented here are a more compact version of the ones provided in this blog, and improved for Linux Mint (but should suit well also to Ubuntu). For more detailed infos please refer to the link above.


  1. Download the latest printer and scanner drivers (see links)
  2. Exctract the two files:  in a Terminal type
    ls *mg4200series*.tar.gz | xargs -i tar xzf {}
  3. Open the printer driver folder:  cd cnijfilter-mg4200series-3.80-1-deb/
  4. Run the installation:  ./install.sh  and follow the instructions on the terminal.
  5. Open the scanner driver folder:  cd ../scangearmp-mg4200series-2.00-1-deb/
  6. Run the installation:  ./install.sh
  7. Since no launcher is created in the Menu, right click on the menu button and select "Edit menu" got to the category you desire to see the scanner in (e.g. "Graphics") and then click the "New item" button. Put whatever you desire under name and comment, and the following in the "Command" field:  scangearmp
  8. If the first time you launch the scanner an error appears, just proceed and click the button saying "Update scanner list"; wait a while, then your scanner should appear.
This should be all. As mentioned above, for more detailed instructions please refer to the guide linked in the first phrase.

Rotate webcam on Skype for Linux on ASUS laptops

If you have an ASUS laptop and use Skype on Linux, you'll probably face the problem of having the webcam image rotated by 180° and only on Skype, not on other applications.
To solve this problem you need to install and load a 32-bit library (since Skype is compiled for such architectures) before launching Skype.
In addition to this, I'll show how to solve this problem also if you want to install a skype wrapper, in the case Skype is not always visible on the system tray.

These are the commands to type in a Terminal
  • add the skype-wrapper repository (optional): sudo add-apt-repository -y ppa:skype-wrapper/ppa && sudo apt-get -qq update
  • install skype-wrapper (optional): sudo apt-get install skype-wrapper
  • sudo apt-add-repository ppa:libv4l/stable
  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get install libv4l-0:i386
Then, in a folder where it doesn't annoy you, create a file named skype.sh and copy these two lines inside it:
#!/bin/bash
LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype

ATTENTION: put skype-wrapper instead of just skype in the line above if you chose the option of installing the wrapper!

In you want Skype to automatically load at startup, on the Menu find "Startup Applications", remove other Skype launchers if available, and press the "Add" button. Give the name and comment you like, and in the "Command" field put the absolute path of the file created above, for example "/home/me/skype.sh".

The End.

Changing GRUB options

If you want to change some options of the GRUB boot loader, like for example the timeout for the default option, or the order of the various options, this is what you have to do:

  • type  sudo gedit /etc/default/grub  in a Terminal (CTRL+ALT+T) and insert your password
  • edit the timeout expressed in seconds at "GRUB_TIMEOUT" or the default option at "GRUB_DEFAULT" (the number is the position of the desired option in the boot loader, starting from 0)
  • in the Terminal type  sudo update-grub  to update the GRUB configuration file

Automatically mount NFTS partition

In order to automatically mount an NTFS partition on Ubuntu/Mint you just need to know where it is located on the file system: to do that, open "Disk utility" from the Menu, select the hard disk containing the desired partition, select the partition and look what is written near the label "Device", usually it's something like /dev/sdaN with a number instead of N.

Assume it is for example /dev/sda4, and that you want to mount it in a folder named "Files", then:

  • type  sudo gedit /etc/fstab  in a Terminal (CTRL+ALT+T) and insert your password
  • at the end of the file add two lines as follows:
    # My automatically mounted partition
    /dev/sda4 /media/Files ntfs defaults,uid=1000,gid=1000 0 1
  • save and close
The next time you'll reboot, it will be automatically mounted! =)

Friday, January 10, 2014

[SOLVED] Could not download all repository indexes

If updating your software gives you one of the following problems

Could not download all repository indexes
The repository may no longer be available or could not be contacted because of network problems. If available an older version of the failed index will be used. Otherwise the repository will be ignored. Check your network connection and ensure the repository address in the preferences is correct.


Could not refresh the list of packages
ERROR###ERROR###ERROR###ERROR###ERROR###ERROR###ERROR
W:Failed to fetch http://packages.medibuntu.org/dists/precise/Release.gpg  Could not connect to packages.medibuntu.org:80 (67.215.66.132). - connect (110: Connection timed out),
W:Failed to fetch http://packages.medibuntu.org/dists/precise/free/binary-amd64/Packages
Unable to connect to packages.medibuntu.org:http:

Ign http://packages.medibuntu.org precise Release          
Ign http://packages.medibuntu.org precise/free amd64 Packages/DiffIndex
Err http://packages.medibuntu.org precise/free amd64 Packages
  Unable to connect to packages.medibuntu.org:http:
W: Failed to fetch http://packages.medibuntu.org/dists/precise/Release.gpg  Could not connect to packages.medibuntu.org:80 (67.215.66.132). - connect (110: Connection timed out)
W: Failed to fetch http://packages.medibuntu.org/dists/precise/free/binary-amd64/Packages  Unable to connect to packages.medibuntu.org:http:
E: Some index files failed to download. They have been ignored, or old ones used instead.

it's because medibuntu packages are no more available, and thus can't be updated, but are not automatically removed from the packages which have to be updated. With this single command that I found here you can definitively eliminate this annoying problem: in a terminal type

sudo sed -i '/^deb http:\/\/packages.medibuntu.org*/d' /etc/apt/sources.list /etc/apt/sources.list.d/*.list

insert your login password, and it's done! =)