MRC/Tutorials/Customizing Ubuntu: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 3: Line 3:
By default Ubuntu uses non-proprietary drivers for your hardware. This means for example that the current installed driver for your graphics card is an open-source version, and not the driver created by the vendor (e.g., NVidia or AMD). Although the default drivers are often quite good, you may find out that some visualization tools won't work well, or slow. To install proprietary drivers:
By default Ubuntu uses non-proprietary drivers for your hardware. This means for example that the current installed driver for your graphics card is an open-source version, and not the driver created by the vendor (e.g., NVidia or AMD). Although the default drivers are often quite good, you may find out that some visualization tools won't work well, or slow. To install proprietary drivers:


# Open the ''Additional Drivers'' system option:
# Open the ''Additional Drivers'' system option: ''Press the gear-like icon in the upper right corner'' -> ''System Settings'' -> ''Software and Updates'' -> ''Additional Drivers'' tab
#* When using Unity: ''Press the gear-like icon in the upper right corner'' -> ''System Settings'' -> ''Software and Updates'' -> ''Additional Drivers'' tab
# The system will start searching for available drivers, which may take some time. Then, a list of available drivers will be displayed. Do not worry if the list is empty. Your hardware is most probably still supported, but the drivers can simply not be updated at this time. Otherwise:
# The system will start searching for available drivers, which may take some time. Then, a list of available drivers will be displayed. Do not worry if the list is empty. Your hardware is most probably still supported, but the drivers can simply not be updated at this time. Otherwise:
# Select one of the drivers that is available (if there are multiple, often one of them is ''Recommended'').
# Select one of the drivers that is available (if there are multiple, often one of them is ''Recommended'').
# Click the ''Activate'' button, and close.
# Click the ''Activate'' (or "Apply Changes") button, and close.


The change will start having effect once you reboot the system.
The change will start having effect once you reboot the system.


'''Activating the NVIDIA drivers on the Lenovo W520 laptops (generation 2011) can sometimes break your Ubuntu.''' In the case of these laptops, it's best to go for 'if it ain't broke, don't fix it'.
'''Caution:'''
#'''Activating the NVIDIA drivers on the Lenovo W520 laptops (generation 2011) can sometimes break your Ubuntu.'''
In these cases, it's best to go for 'if it ain't broke, don't fix it'.


= Terminal Colors =
= Terminal Colors =
Line 45: Line 46:


Then, to have a launcher which starts Terminator with this layout:
Then, to have a launcher which starts Terminator with this layout:
* In Unity:
# Open a terminal (''ctrl-alt-t'') and run:<pre>cp /usr/share/applications/terminator.desktop ~/.local/share/applications</pre>
*# Open a terminal (''ctrl-alt-t'') and run:<pre>cp /usr/share/applications/terminator.desktop ~/.local/share/applications</pre>
# Open the launcher file:<pre>gedit ~/.local/share/applications/terminator.desktop</pre>
*# Open the launcher file:<pre>gedit ~/.local/share/applications/terminator.desktop</pre>
# Find the first occurrance of ''Exec=terminator'' and add '' -ml <your chosen name>'' (So, it should now be ''Exec=terminator -ml <your chosen name>'').
*# Find the first occurrance of ''Exec=terminator'' and add '' -ml <your chosen name>'' (So, it should now be ''Exec=terminator -ml <your chosen name>'').
# Save and close the file
*# Save and close the file
# Log-out and log back in
*# Log-out and log back in
# Press the windows key on your keyboard, and search for terminator
*# Press the windows key on your keyboard, and search for terminator
# Drag the terminator icon to the launcher (the menu with the icons on the left). You can now always start the terminator with your layout by clicking the icon.
*# Drag the terminator icon to the launcher (the menu with the icons on the left). You can now always start the terminator with your layout by clicking the icon.
* In Gnome Classic:
*# Find the Terminator icon (''Applications'' -> ''System Tools'' -> ''Terminator'') and drag the icon to your top panel (right from ''Places'')
*# Right click the newly created Terminal icon
*# Choose “properties”
*# Enter in “command” : “terminator -ml <your chosen name>”
*# Click close
*# To test: open “Terminator”


Alright! Ubuntu is properly set-up, and you are ready to do some programming. Head back to the [[Embedded Motion Control/Tutorials | Tutorials Overview page]] and start the C++ tutorials.
Alright! Ubuntu is properly set-up, and you are ready to do some programming. Head back to the [[MRC/Tutorials | Tutorials Overview page]] and start the C++ tutorials.

Latest revision as of 11:53, 27 March 2020

Additional Drivers

By default Ubuntu uses non-proprietary drivers for your hardware. This means for example that the current installed driver for your graphics card is an open-source version, and not the driver created by the vendor (e.g., NVidia or AMD). Although the default drivers are often quite good, you may find out that some visualization tools won't work well, or slow. To install proprietary drivers:

  1. Open the Additional Drivers system option: Press the gear-like icon in the upper right corner -> System Settings -> Software and Updates -> Additional Drivers tab
  2. The system will start searching for available drivers, which may take some time. Then, a list of available drivers will be displayed. Do not worry if the list is empty. Your hardware is most probably still supported, but the drivers can simply not be updated at this time. Otherwise:
  3. Select one of the drivers that is available (if there are multiple, often one of them is Recommended).
  4. Click the Activate (or "Apply Changes") button, and close.

The change will start having effect once you reboot the system.

Caution:

  1. Activating the NVIDIA drivers on the Lenovo W520 laptops (generation 2011) can sometimes break your Ubuntu.

In these cases, it's best to go for 'if it ain't broke, don't fix it'.

Terminal Colors

By default, the terminal in Ubuntu only uses white letters on a dark background. However, it can be quite convenient to allow the use of multiple text colors. For example, folders, files and executables are then displayed in different colors when using the command ls.

To enable text color in a terminal:

  1. Open the file .bashrc in your homefolder, for example using:
    gedit ~/.bashrc
  2. Uncomment the following line:
    #force_color_prompt=yes
    by removing the #
  3. save and exit. Now if you start a new terminal, you will have a colored prompt.

Terminator

You will soon find out that you will have to work in multiple terminals in parallel. A convenient tool to avoid having a large amount of terminals is Terminator, a program that allows you to have multiple terminals in one window. You can install it via the Ubuntu software center, or from the terminal:

sudo apt-get install terminator

To make Terminator start up with some screen setup:

  1. Open “Terminator”
  2. Make the set-up to be saved: some split ups
    1. Right click
    2. Choose “split horizontally” or “split vertically”
  3. Continue the previous step, until you are happy
  4. Right click
  5. Choose “preferences”
  6. Pick tab “layout”
  7. Click "add"
  8. Enter a name (= <your chosen name>)
  9. Press "enter"
  10. Click "close"

Then, to have a launcher which starts Terminator with this layout:

  1. Open a terminal (ctrl-alt-t) and run:
    cp /usr/share/applications/terminator.desktop ~/.local/share/applications
  2. Open the launcher file:
    gedit ~/.local/share/applications/terminator.desktop
  3. Find the first occurrance of Exec=terminator and add -ml <your chosen name> (So, it should now be Exec=terminator -ml <your chosen name>).
  4. Save and close the file
  5. Log-out and log back in
  6. Press the windows key on your keyboard, and search for terminator
  7. Drag the terminator icon to the launcher (the menu with the icons on the left). You can now always start the terminator with your layout by clicking the icon.

Alright! Ubuntu is properly set-up, and you are ready to do some programming. Head back to the Tutorials Overview page and start the C++ tutorials.