Red Wine in a GlassHow to Install CSS HTML Validator on Linux using WineCSS HTML Validator Logo
HOME Tutorials & Essays About
Tutorials & Essays About

CSS HTML Validator
CSS & HTML Validation Software for Linux

CSS HTML Validator

CSS HTML ValidatorNew Window Icon is a full-featured CSS and HTML editor with integrated syntax checking. Though it is a Windows app, it installs and runs on Linux supported by the Wine compatibility layer.

This article will show how to install CSS HTML Validator on Linux.

Options

If you want to create a new Wine Prefix to host CSS HTML Validator, follow the directions as given, but there are other options.

Option 1 If you do not already have an initialized Wine Prefix (i.e., if you have never executed winecfg), you can skip the first two commands in the next section (mkdir and export) and start by executing the third command, wine winecfg. That will create and initialize the default Wine Prefix ~/.wine, and CSS HTML Validator will end up being installed there. If you do this, you will not need to worry about exporting Wine Prefixes.

Option 2 However, if you want to install CSS HTML Validator into an existing Wine Prefix, skip the first command (mkdir). Start by exporting the name of your intended Wine Prefix, as in the second command (export), but use the name of your Wine prefix in place of .wine-validator. Then, skip the winecfg command and continue with the cd ~/Downloads command (or whatever cd command will take you to where your CSS HTML Validator installer is located).

This document also assumes the wine prefix is .wine-validator. If your Wine prefix has a different name, substitute the name of your prefix for .wine-validator everywhere.

Enable Show Hidden Files

Before proceeding, you may want to enable the Show Hidden Files option in your file browser (Nautilus or other). If you follow the recommendation of creating a Wine prefix with a name that starts with a period, like ~/.wine-validator, or if you accept the default Wine prefix, which is ~/.wine, that folder will be hidden and therefore invisible unless Show Hidden Files is enabled. This will be important if you enable PHP syntax checking or sound for CSS HTML Validator.

Open a Terminal window

The next two commands do initial setup in advance of creating a Wine prefix. The name given here to the prefix is "wine-validator", but this can be replaced by any other name. For example, instead of ~/.wine-validator, you might prefer ~/.css-html.

$ mkdir -v ~/.wine-validator

$ export WINEPREFIX=~/.wine-validator

It is the next command, wine winecfg, that actually creates the Wine prefix by loading folder ~/.wine-validator with the magic that allows it to host running Windows apps. Be aware that winecfg generates lots of error messages, which you should simply ignore.

While winecfg is running, it may offer to install one or both of mono and geko. In that case, allow winecfg to do the downloads and installations. In fact, geko may ask to be downloaded and installed a second time. When this happens, it is probably because both Gecko 32-bit and Gecko 64-bit are needed, so allowing both to proceed is recommended.

When a dialog window opens and asks you to choose a Windows Version, the choice of Windows 10 is known to work with CSS HTML Validator. Other options in this dialog can be the defaults.

Eventually, winecfg will finish (messages from winecfg cease), but there may be no $ Terminal prompt. In that case, press the Enter key to display a Terminal prompt.

OK – go ahead and tell Wine to execute winecfg.

$ wine winecfg

The following cd command assumes that your CSS HTML Validator installation .exe file is in your ~/Downloads folder. If you have placed it somewhere else, such as on your Desktop, change the cd command to reference the actual location.

$ cd ~/Downloads

The name of the installation file in the following is taken to be installer.exe, but, in the command which installs CSS HTML Validator, you must replace this with the actual name of your installation file, which will be something like

css-html-validator-trial-setup.exe

or

css-html-validator-190122pro-x64-setup.exe.

Next is the command that does the actual installation of CSS HTML Validator. In this command, replace installer.exe as described above, and do not specify a path to the installer .exe file. cd must have been used to make the folder holding the installer .exe file the default. This is important.

When asked if a Desktop icon should be created, accept and choose either the current user option of the all users option. This icon will be needed.

It is possible that, at the end of the installation, Terminal does not display a $ prompt. In that case, press the Enter key.

$ wine installer.exe

Successful installation leaves a Launcher for CSS HTML Validator on your desktop or in your Applications or in both.

For some versions of Linux, no Launcher is left on the desktop, but you will find one – maybe two – launchers in Applications. If there are two launchers in Applications, one will open CSS HTML Validator, and the other will open the Batch Wizard in addition to CSS HTML Validator. If, when CSS HTML Validator opens, you see a Batch Wizard window, it can be closed, after which you are left with just CSS HTML Validator.

In case there is no CSS HTML Validator icon to be found anywhere, shut down and restart your computer. This happened once, with openSUSE Tumbleweed, and a re-boot was the fix.

You may now close the Terminal window.

$ exit

Before using the desktop launcher …

If there is a Launcher for CSS HTML Validator on your desktop, right-click it. If the window that opens includes an Allow Launching option, click it. If not, close the window and double-click the Launcher and, if prompted, click the Trust and Launch option. In the future, you will just double-click the Launcher to open CSS HTML Validator.

Register CSS HTML Validator (not needed for the trial version)

Open the email or file that contains your registration information and copy the contents to the clipboard.

It may be better not to close the source file after you copied the registration information. For some versions of Linux, CSS HTML Validator cannot access the copied information after the source file is closed.

If CSS HTML Validator is not running, open it by double-clicking its icon on the desktop or in Applications.

Then, navigate to Help > Register Program.

If the registration information in the clipboard is valid, CSS HTML Validator pre-fills the license information and you just need to select OK.

Enable PHP Syntax Checking (optional)

If your Wine prefix begins with a dot – as in ~/.wine-validator – it is a hidden file, and you will not be able to use Files to navigate to it unless its "Show Hidden Files" option is enabled.

Browse to

https://windows.php.net/download/New Window Icon

and download a Zip file for a recent MS Windows compatible x64 Non Thread Safe version of PHP.

At the time of this writing (June 2020), validating with PHP 7.4 yields the error message "PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0". Choosing PHP 7.3 or earlier is suggested. I have not tested it, but I understand that PHP 7.4 requires Microsoft Visual C++ Redistributable for Visual Studio 2019.

After verifying the download's SHA256 hash (optional but good to do), unzip the download into folder

~/.wine-validator/drive_c/Program Files

After the unzip, the new folder may have a name something like php-7.3.7-nts-Win32-VC15-x64. Rename it to PHP (all upper case), so that the full path including the new PHP folder is

~/.wine-validator/drive_c/Program Files/PHP

Open CSS HTML Validator and press Ctrl+F4 to open the full Validator Engine options dialog. In case Ctrl+F4 does not work, the path through the menu is

Options > Validator Engine Options > Validator Engine Options [sic]

Scroll down the left column and click PHP Checker.

The Path to php.exe input field should contain C:\Program Files\PHP\php.exe. If it does not, enter it.

Then, put a check mark in the Enable PHP syntax messages box.

Click OK.

Next, set the Default Valuation Mode to Full. This is done by navigating the menu tree thusly.

Options > Validator Engine Options > Default Validation Mode > Full

Now, you can test PHP syntax checking by loading a web page that has some PHP code and deliberately inserting a syntax error. Click the Validate command in the toolbar (not the Validate menu option in the menu bar) to see what happens.

Image showing the location of the Validate command button

Enable Sound for Audible Notifications (optional)

If your Wine prefix begins with a dot – as in ~/.wine-validator – it is a hidden file, and you will not be able to use Files to navigate to it unless its "Show Hidden Files" option is enabled.

Before proceeding, you may need to configure and test your computer's sound, which can be done by opening "Sound" in your computer's "Settings".

MS Windows keeps its sound files in

C:\windows\Media\

so you can enable sound for CSS HTML Validator by creating a Media folder inside ~/.wine-validator/drive_c/windows to hold your own sound files. Here is the full path.

~/.wine-validator/drive_c/windows/Media/

CSS HTML Validator uses two sounds, one when a validation finds errors or warnings, and another when a validation finds no errors or warnings. The default names for these .wav files are

Errors or warnings: Windows Critical Stop.wav
No errors or warnings: tada.wav

If files of those names are installed in ~/.wine-validator/drive_c/windows/Media/, close CSS HTML Validator (if it is open) and restart it. Beyond that, no other action may be required. However, if the sound files you install do not have the default names or are installed in a different folder, or if sound simply is not working, do the following.

Open CSS HTML Validator and press Ctrl+F4 to open the full Validator Engine options dialog. Or navigate the full path as described above.

Scroll down the left column and click Sound.

In the panel on the right, both check boxes should be checked. You can enter the paths to your sound files, or you can navigate to the folder where you stored them by clicking the small folder icon to the right of a Play button. If your sound files are in the default sound folder, the navigation path from within CSS HTML Validator is

My Computer > C: > windows > media

just like in Windows.

You can verify that each sound works by clicking its Play button.

If sound still is not working, re-check your system's Settings > Sound where you can select the output to which sound should be directed and where you can test your system's sound to ensure it is working.


Facebook Logo   Twitter Logo  Reddit Logo   Quora Logo

Consider sharing your experience

Did you find this page helpful? Have constructive feedback? Wisdom to share?

Send email to Email Address
Privacy Policy

A.Z. (initials or other identifier) (date will be here)

… (your comment appears here) …

Graphic image of Athena pouring wine for Heracles, from 470 BC