Tuesday, October 8, 2013

[SOLVED] Add custom characters to keyboard layout in Ubuntu

After a lot of attempts, which were not definitive, I finally managed to add some custom characters to my keyboard layout which were not included, avoiding to switch form one layout to another for just some characters.

Here I use as example how I added some German characters (ä,ö,ü,...) on my Italian layout.

  • temporally change your layout with a similar one:
    Menu -> Keyboard Layout ->  Layout -> + -> chose a different one from your current (I chose English UK)
  • open a terminal (CTRL+ALT+T)
  • type cd /usr/share/X11/xkb/symbols/
  • type ls to see all the layouts, and identify which one your was (in my case it, in the following steps substitute it with your layout)
  • make a backup copy: sudo cp it it.backup
  • open the file: sudo gedit it &
  • identify the key you want to edit: if for example you want to add the "ä" as third option on the "A" key, search for the lines which contain "a" and "A" at the beginning; in this case it is:
        key <AC01> { [a, A, aring, Aring] };
  • substitute the third element ("aring" or whatever you have) with "adiaeresis" and eventually the fourth with "Adiaeresis" in order to get an "Ä"; this in ALL lines (there can be more of them for different layout settings) where that specific key appears. 'A' key lines should then look like
        key <AC01> { [a, A, adiaeresis, Adiaeresis] };
  • add other desired characters as well; if you don't know their code (e.g. "adiaeresis"), just look for them in that language's layout
  • save & close
  • in the Terminal type sudo dpkg-reconfigure keyboard-configuration and follow the on-screen instructions
  • then type sudo dpkg-reconfigure console-setup and follow the on-screen instructions
  • close all programs and reboot: sudo reboot
  • after logging in go again to Menu -> Keyboard Layout ->  Layout, remove the previously set layout and add your default one; now, following the above example, you should be able to get an "ä" by AltGr+A and an "Ä" by SHIFT+AltGr+A

Monday, September 30, 2013

[SOLVED] Share folders between Linux Mint computers

If you want to share a folder on a Mint machine, and to access it both from Windows and from Linux computer, you have to follow these simple steps:

INSTALLATION (on every Linux machine):
  • open a Terminal (CTRL+ALT+T)
  • install Samba:  sudo apt-get install samba
  • create a login to access shared folders:  sudo smbpasswd -a <whateverYouWant>  and insert a password for it when asked
FOLDER SHARING (on every Linux machine you want to share some folder of)
  • make a backup of the Samba configuration file on your home folder:  sudo cp /etc/samba/smb.conf ~
  • edit the configuration file:  sudo gedit /etc/samba/smb.conf
  • for every folder you want to share, append something like this at the very end of the file:
    [nameOfSharedFolder]
    path = /path/to/shared/folder
    available = yes
    valid users = theUserYouCreatedInTheStepAbove
    read only = no
    browsable=yes
    public = yes

    eventually changing the values on the right-hand side of the = sign, and the name in the square brackets.
  • if you want to share the folder with another linux machine, add this line just after the line starting with "workgroup = ...": name resolve order = bcast host lmhosts wins
  • save and close the text editor
  • restart Samba:  sudo service smbd restart
  • check that there are no errors:  sudo testparm
Wait some minutes and then everything should work. If you have other questions just post a comment, I'll answer as soon as possible.

Thursday, April 4, 2013

[SOLVED] Mint13 - Nvidia GeForce GT540M optimus (64 bit)

Nvidia graphic cards with Optimus technology (such as GeForce GT540M) may take to errors in case of installation through the official Nvidia .run file or apt-get install nvidia-current, and result in a horrible VGA screen resolution (in the best cases).

At write time there wasn't a single working solution, but many different forum discussions each solving a subpart of the problem. Now that I managed to solve it, I report here all and only the necessary steps to finally use your Nvidia graphic card on your Ubuntu/Mint OS.

Note: tested on Mint13 64bit.

Important: follow all the steps in order, inserting password when prompted, always confirming

REMOVE PREVIOUS NVIDIA INSTALLATION ATTEMPTS:


  • open a Terminal (CTRL+ALT+T)
  • type sudo apt-get purge nvidia- and press 2times TAB fast; with the arrow up key reselect the command and complete it with each of the found options
  • type sudo rm /etc/X11/xorg.* then enter
  • type sudo reboot then enter. The system will REBOOT! (close open programs/files before)

INSTALL BUMBLEBEE

  • open a Terminal (CTRL+ALT+T)
  • type sudo add-apt-repository ppa:bumblebee/stable then enter
  • type sudo apt-get update then enter
  • type sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic then enter
  • type sudo apt-get install virtualgl-libs:i386 then enter
  • type sudo usermod -a -G bumblebee $USER then enter
  • type sudo update-initramfs -u then enter
  • type sudo gedit /etc/init/bumblebeed.override then enter
    write:
        start on    (runlevel [2345])
        stop on     (runlevel [016])

    save and close;
  • type sudo reboot then enter. The system will REBOOT! (close open programs/files before)

TEST IT

  • open a Terminal (CTRL+ALT+T)
  • type optirun glxspheres then enter

Please let me know if it was successful for you. If some step gives you problem and you go on skipping it please let me know too! You don't need to register in order to comment!

Note: this guide solves also the following problems:
  • You do not appear to be using the NVIDIA X driver. Please edit your X configuration file (just run `nvidia-xconfig` as root), and restart the X server.
  • Could not apply the stored configuration for monitors
  • The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect