Preparing your Linux computer for MX: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
m (add category)
(4 intermediate revisions by 2 users not shown)
Line 62: Line 62:
== Checking if mono-complete is in Source List ==
== Checking if mono-complete is in Source List ==


The "source list" [[#The various components to commands for installation|mentioned earlier]] may not contain all the repositories we need for our installations.
The "source list" [[#The various components to commands for installation|mentioned later]] may not contain all the repositories we need for our installations.


Consequently, [[#The_various_components_to_commands_for_installation|type]] <code>apt search mono-complete</code>, to find out whether the mono package is available from one of the repositories already in our source list, and if the version available is compatible with MX (Release announcements for MX should specify which versions of Mono will work).
Consequently, [[#The_various_components_to_commands_for_installation|type]] <code>apt search mono-complete</code>, to find out whether the mono package is available from one of the repositories already in our source list, and if the version available is compatible with MX (Release announcements for MX should specify which versions of Mono will work).
Line 109: Line 109:
Please note that a particular MX build might specify it needs a particular version of Mono.  Hence, although normally you can upgrade any (CumulusMX.exe, ExportToMySQL.exe, CreateMissing.exe, proposed CreateRecords.exe) cumulus package without upgrading Mono, sometimes you will need to upgrade Mono, and that means following above install instructions again.
Please note that a particular MX build might specify it needs a particular version of Mono.  Hence, although normally you can upgrade any (CumulusMX.exe, ExportToMySQL.exe, CreateMissing.exe, proposed CreateRecords.exe) cumulus package without upgrading Mono, sometimes you will need to upgrade Mono, and that means following above install instructions again.


The latest release of Mono, for a variety of Linux distributions, can always be downloaded from [https://www.mono-project.com/download/stable/#download-lin]:
The latest release of Mono, for a variety of Linux distributions, can always be downloaded from the mono project web site [https://www.mono-project.com/download/stable/#download-lin mono-project.com] (the macOS versions are here [https://www.mono-project.com/download/stable/#download-mac mono-project.com]):
# follow step 1 there,  
# follow step 1 there,  
# but in step 2 replace ‘’’mono-devel‘’’ by ‘’’mono-complete’’’
# but in step 2 replace ‘’’mono-devel‘’’ by ‘’’mono-complete’’’
Line 115: Line 115:
The complete mono package includes a component (mono-xsp4) that creates a simple web server to run ASP.NET 4.0 applications.  MX does not need this, so type <code>sudo update-rc.d mono-xsp4 disable</code>, to stop it being used (without needing to do a <code>sudo apt remove</code> followed by the name of component you no longer want).
The complete mono package includes a component (mono-xsp4) that creates a simple web server to run ASP.NET 4.0 applications.  MX does not need this, so type <code>sudo update-rc.d mono-xsp4 disable</code>, to stop it being used (without needing to do a <code>sudo apt remove</code> followed by the name of component you no longer want).


=Moving from Microsoft Windows to Linux=
Microsoft has previously had a deliberate policy to make everything on its computers different to the standards set by earlier computers, to try to keep people using its products, transfers between these systems is not easy.


=Moving from Microsoft Windows to Linux=


Microsoft has previously had a deliberate policy to make everything on its computers different to the standards set by ealier computers, to try to keep people using its products, transfers betwen these systems is not easy.
==Terminology==


First of all, be aware that storage devices (flash memory, SSDs, etc.) formatted for Linux cannot be read by Microsoft Windows, although some will be formatted with a root partition that can be read on both.
First of all, be aware that storage devices (flash memory, SSDs, etc.) formatted for Linux cannot be read by Microsoft Windows, although some will be formatted with a root partition that can be read on both.


Microsoft defines drives (indicated by letter followed by a colon). Linux has all files in a hierarchy of directories that always start with root denoted by "/" at the start.
A particular storage device can be divided into partitions, on Microsoft Windows these are assigned to different drives, in Linux the partitions are assigned to particular directories within the hardware category, but often mounted as a directory with a different path.  Care must be taken to refer to the path where the device is mounted for all file operations, but to the hardware path for device operations.
Microsoft talks about folders, while Linux talks about directories. Both of these define paths to particular files.
Linux sub-directories and files can look the same in some ways of listing the content of a particular place in the path. Linux starts file names with a period (.) for "hidden" files (those you choose whether to show or not in any directory listing), Windows uses a flag to mark files as hidden.
==Encoding==
Cumulus MX expects all files to be encoded using UTF-8.  This means a single byte is used to represent characters, that byte has 8 bits and can represent numbers, letters, and certain symbols, this covers everything used in standard characters in most languages. Microsoft Windows software (like "Notepad"), and Google Cloud software tend to add by default a "Byte Order Mark", a special code at start of files that indicates the order of bytes used when more than one byte represents a character. If you edit a Cumulus file in any software that adds a BOM, or you have set encoding to include BOM by default, MX will be unable to understand any externally edited files, and it is likely that your Linux computer (or the MONO that MX uses) is set up to expect standard utf-8 (without BOM).  For all [[:Category:Files with Comma Separated Values|files with Comma Separated Values]] the first field should be a date, but a BOM prefix on the first line of such a file pushes the date out of expected position!


===Line terminators in .txt files===
===Line terminators in .txt files===


If you are a novice to computers, skip this sub-section and the next, go directly to [[#File Names & Paths]].  
If you are a novice to computers, you can optionally skip this sub-section and the next, going directly to [[#File Names & Paths]].  


You need to have some technical understanding to do an action that might encounter the issues discussed here. For normal MX usage, line terminators do not matter.
For normal MX usage, line terminators do not matter, MX is now capable of detecting what line terminators are being used, and will ensure it sticks to the existing system.
 
If you are using a script language such as PHP, or you are using a third-party package with your MX, then these are written expecting particular line terminators and may stop working if run on a different computer to the one used for their development.  By default, PHP routines for reading files will normally assume terminator is Line Feed, so if a file contains a Carriage Return, an appropriate "trim()" function has to be used to remove unwanted characters.


If you are moving from Microsoft Windows to Mac OS, be aware that Microsoft ends each line with two characters (Carriage Return and Line Feed) while Unix/Linux ends each line with a single character (Carriage Return).  Cumulus can cope with both approaches for existing files, but will create new files correctly for Mac OS.
If you are moving from Microsoft Windows to Mac OS, be aware that Microsoft ends each line with two characters (Carriage Return and Line Feed) while Unix/Linux ends each line with a single character (Carriage Return).  Cumulus can cope with both approaches for existing files, but will create new files correctly for Mac OS.
Line 243: Line 258:
==Package tool==
==Package tool==


For the purposes of keeping this Wiki page simple, the package manager described in “apt” meaning “Advance Package Tool” e.g. <code>sudo ''apt'' install package_name</code>.  
You can add extra programs to your Linux computer.  Programs written to run in multiple operating systems are usually downloaded  as ''*.tar.gz'' files, although other file compressions may be used (.zip is effectively Windows specific, but as we shall see in [[MX on Linux]] can be used on Linux).  Programs written for Linux distributions like "Red Hat", "Fedora", and "centOS" are supplied as ''*.rpm'' files.
 
For the purposes of keeping this Wiki page simple, the package manager described here is the modern debian one “apt” meaning “Advance Package Tool” e.g. <code>sudo ''apt'' install package_name</code>.  


In simple terms, the inclusion of "apt" runs the “package manager” used in Linux. That is certainly true if you use the Raspberry Pi operating system, and it appears it is true for almost all modern Linux operating systems.  
In simple terms, the inclusion of "apt" runs the “package manager” used in any modern Linux based on a Debian, or Ubuntu, distribution where programs are written in files ''*.deb''. That is certainly true if you use the Raspberry Pi operating system, and it appears it is true for almost all modern Linux operating systems.  


Some online tutorials refer to “apt-get” or "apt-cache" in examples they quote. My online research suggests using those directly is no longer advisable, and therefore you should leave off the part starting with a hyphen, i.e. it should be safe to replace these older package managers with "apt". I have included [[#Package Manager – a brief technical aside|a little technical explanation]] after this subsection, if this really worries you, it appears that in some variants "apt" is just a more user friendly way to call the older package.
Some online tutorials refer to “apt-get” or "apt-cache" in examples they quote. My online research suggests using those directly is no longer advisable, and therefore you should leave off the part starting with a hyphen, i.e. it should be safe to replace these older package managers with "apt". I have included [[#Package Manager – a brief technical aside|a little technical explanation]] after this subsection, if this really worries you, it appears that in some Linux variants "apt" is just a more user friendly way to call the older package.


If you are using an older operating system, it appears the tool available depends on the variant of Unix you have installed. The contributor of this section has done some online research, but is not familiar with all the Unix variants, so other contributors with fuller technical expertise may need to edit this section to make its applicability wider.
If you are using an older operating system, it appears the tool available depends on the variant of Unix you have installed. The contributor of this section has done some online research, but is not familiar with all the Unix variants, so other contributors with fuller technical expertise may need to edit this section to make its applicability wider.


According to online documentation seen, some UNIX variants use a tool called '''RPM packet manager''', and this involves a command line specifying "zypper" in the second part of the command e.g. <code>sudo zypper install package_name</code>.
According to online documentation seen, some UNIX variants use '''RPM packets'''. The modern package manager for these is "dnf" and in general you can substitute "dnf" for "apt" in my descriptions. However, there is an older package manager for RPM packets called  "zypper", again in general you can replace "apt" in my notes with "zypper" and it should work e.g. <code>sudo zypper install package_name</code>.  Other package managers used with "*.rpm" files include 'yum' (standard with "Fedora" distributions) which does not use the same syntax as "apt", and 'rpm' (which can only install packages that are already on your computer but currently dormant) again using a different syntax.


== Package Manager – a brief technical aside==
== Package Manager – a brief technical aside==

Navigation menu