Preparing your Linux computer for MX: Difference between revisions

m
no edit summary
m (add category)
mNo edit summary
Line 118: Line 118:
=Moving from Microsoft Windows to Linux=
=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.
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.
 
 
==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]].
 
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.


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.
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.
5,838

edits