Skip to content

Latest commit

 

History

History
279 lines (154 loc) · 10.1 KB

vanilla_gnome.md

File metadata and controls

279 lines (154 loc) · 10.1 KB

GNOME Desktop Environment

Fedora has a Vanilla GNOME Desktop Environment which behaves slightly different to Microsoft Windows and is optimised for screen space. The GNOME Dock is hidden by default.

Press to view the GNOME Dock. This will take the application out of focus. All applications will be re-tiled so the open application of interest can be selected. The dock has the all applications button which is similar to the Windows start screen.

img_001

An application such as Nautilus file explorer can be opened from the dock:

img_002

Nautilus opens in Home by default:

img_003

The Documents folder can be selected:

img_004

There is now a single application open. When is pressed, this single application displays:

img_005

The 𓃑 button on the dock can be used to select all applications:

img_006

In this case, the Terminal will be launched:

img_007

Notice the prompt has the form:

username@pcname:location$

In this case the location is ~ meaning Home:

img_008

If the Documents folder is selected and right clicked (2 finger press on a touchpad), Open in Terminal can be selected:

img_009

Notice the location is now ~/Documents where / is the default directory separator on Linux:

img_010

The binary cd can be used to change the directory. The directory to be changed to is then supplied as a command line argument. This has the general form:

binary command_arg

In this case:

cd ~

Notice the location is now ~ as expected:

img_011

Changing back to Documents, recall the binary is cd and the command line argument is ~/Documents

cd ~/Documents

The binary nano is a terminal based text editor and will open in the location specified in the Terminal, in this case ~/Documents. If supplied with a file name, expressed as a command line argument it will open the file if it exists, or create a new file with that file name when saved:

nano script.py

img_012

Python code can be added to this script.py file. For example:

print('Hello World!')

Ctrl + x can be pressed to exit nano:

img_013

To save select y:

img_014

Press to save using the file name previously specified script.py:

img_015

Notice this file is now created and displays in files:

img_016

It can be viewed in text editor:

img_017

The binary python can be launched, supplying script.py as a command line argument:

python script.py

img_018

The binary python will open, execute all the code in the file and then exit:

img_019

Now multiple applications are open. Press to view the GNOME Dock. This will take all applications out of focus. An application can be selected to be put on top:

img_020

img_021

If is selected a search for the Gparted application can be made:

img_022

It is not installed, so a suggestion is made from software:

img_023

It can be installed:

img_024

It can be launched:

img_025

Gparted is a partition editor which requires root access and needs to be run as a super user. To run the application as a super user, an authentication prompt shows. To authenticate, the user password needs to be input:

img_026

Gparted now launches:

img_027

This is equivalent to run as administrator on Windows and is equivalent to a User Account Control Prompt which was seen for example when Rufus was launched:

img_028

Vanilla GNOME has no minimise and maximise button. Application window snapping can be carried out using:

  • + - left half
  • + - right half
  • + - full screen maximised

The title bar can also be right clicked (2 finger press for a touchpad) for other options:

img_029

If this Application is Hidden:

img_030

It can be viewed by pressing where all open apps will be tiled:

img_031

If a binary is prefixed with sudo it is an instruction to run the binary as a super user instead of a user. This gives it access to root and other privileges:

sudo binary command_arg

For example, nano can be run as a super user using:

sudo nano script.py

img_032

This script file now exists, so is opened:

img_033

The Python code can now be updated to print out the command line arguments:

import sys
arguments = sys.argv
print(arguments)

It can be saved as before:

img_034

The file can be reloaded in the text editor:

img_035

Now the binary python can be used and supplied a script file as a command line argument, alongside some other optional command line arguments:

python script.py arg1 arg2 arg3 anystring

Notice the first command line argument is script.py, the second is arg1, the third is arg2, the fourth is arg3 and so on. Notice each of these are returned in quotations denoting that the command line arguments are always recognised as a string.

The default programming language for the Linux Terminal is bash and this prefers double quotations for strings, Python on the other hand is a different programming language which prefers single quotations for strings. The above command could therefore also be written as:

python "script.py" "arg1" "arg2" "arg3" "anystring"

Generally the double quotations are only used around a command line argument string when it contains a space, because otherwise the space is an instruct to move onto the next command line argument:

img_036

If other locations are selected in Nautilus File Explorer, the root drive can be accessed:

img_037

Any folder on the root drive, except the users home folder cannot be modified as a standard user and requires super user access. If the bin folder is examined:

img_038

Notice that it contains the binaries previously input into the Terminal, for example nano:

img_039

And python. Note that this is the operating system Python and contains only Python and the standard libraries. The system Python should be regarded as part of the Operating System and is updated as part of the Operating System.

For Python development, a user Python should be installed in the users home folder for example by using Miniconda or Anaconda. This allows the user to create a user conda Python environment were they can specify their Python version and third-party libraries without breaking the Operating System:

img_040

The binary bash is the default programming language used by the Linux Terminal:

img_041

The binary dnf is Fedora's package manager:

img_042

The home folder can be accessed from the root drive:

img_043

A standard user can only access the subfolder corresponding to their own username by default i.e. this subfolder is home for the standard user:

img_044

And is the location when Home is selected on Nautilus or Nautilus is opened by that user:

img_045

The binary man can be used to view the manual for a binary name supplied as a command line argument. For example the manual for the package manager can be viewed by inputting:

man dnf

img_046

This can be scrolled through using the Terminal. To quit scrolling press q:

img_047

This returns back to the Terminal:

img_048

Return to Fedora Installation Guide.