Here, I speak out of personal experience not expertise about the underlying architecture of Linux distributions. So I may be quite wrong.
One of the best things about Linux is the wide range of options available. One category is ‘light weight’ distributions, ones that do not need the latest hardware to function well. My main experience with these comes through my netbook, which is pretty old and eqipped with 1 GB RAM, 250 GB HD and a 1.5 GHz atom n550 chip. While 1.5 GHz is reasonably fast compared to many ‘old’ processors, the low-energy design of the atom means it is limited in performance compared to a desktop chip of similar clock speed.
Actually, MATE is a great example of the strength of open source software. When GNOME moved to version 3, some fundamental UI design changes occurred. Many did not like it, and some of those many had the skills and will to do a lot more than complain. They took GNOME 2 and continued to develop it, and such is their success that MATE is now an option in very many distributions. MATE sticks with the older idea that things be arranged in menus and the user can drill down through menus to find what they want, rather than using tiles, panels of icons and so on. MATE is especially suitable for anyone who has experience with Windows versions 95 to 7 (the versions before Windows 8 and its tiles). Just because an idea is older does not make it wrong. And it’s great that options are available, such that you have a better chance of finding an interface that matches your own mental map of the computer.
Debian is not a ‘light’ distribution. But what I have noticed is that the speed of the machine really depends on the applications I use. And so I have developed a very simple way of setting up my Linux on a slower machine; I have two of everything.
The old machine runs LibreOffice quite well. LibreOffice 5 runs faster than 3 or 4 — I think there must have been some substantial improvements under the bonnet — and while I used to have a lighter word processor (like Ted or Abiword), now I find that LibreOffice is quick enough to save me the duplication. If it’s plain text I use vim or tde, if formatted I use LaTeX or LibreOffice, which also gives me a spreadsheet.
I played around with using a simpler desktop environment — or just a window manager like FLWM, which I use on my desktop machine — but I found that on a laptop where I need to manage various wireless connections, install printers for use at offices I visit, and so on, the GUI tools provided by the DE are invaluable. I am not a guru, I am interested in usability. On the desktop, I can invest the time to get things working and then leave them alone.
By using Debian I have the luxury of knowing that:
- forward support will be excellent (I played around with the excellent CrunchBang for a while, but then that vapourised, an experience which pushed me towards using one of the big distros)
- the pool of available applications is vast
- the amount of documentation and community expertise is vast
- the ease of use is excellent (apt-get)
- I don’t have to deal with Ubuntu and it’s weird desktop UI choices.
Maybe there is a speed penalty compared to, I don’t know, compiling from source. But overall usability is my goal, not bootup time or time for an application to open. I spend most of my time in applications, so as long as they run smoothly once open, I don’t mind if opening takes a moment. I’ll happily trade that off for stability, LTS, choice and familiarity.
Install of EndNote X7 on Windows 10. A few notes
(1) Downloaded the installer from https://support.clarivate.com/Endnote/s/article/EndNote-Installer-download?language=en_US
(2) Double clicked on it, entered appropriate product keys.
(3) Locked up on the screen ‘Installing Direct Export Helper’
(4) Had to use Task Manager to kill installer, but then second attempt complained an installer was running, so rebooted computer.
(5) googled; found http://www.adeptscience.co.uk/kb/article/138C2
(6) Did what it says, namely:
a. Selected custom install when installer asked and unchecked Install Direct Export Helper (see red arrow on picture).
b. Proceeded through install; no worries. Let it finish.
c. But then went to C:\Program Files (x86)\EndNote X7 and Risxtd.exe was not there. So could not install the Helper separately, as the instructions said I should.
(8) Downloaded Risxtd.exe, copied it into C:\Program Files (x86)\EndNote X7 and ran it.
(9) All fine.
Whether it relates to compatibility with version of Windows newer than the program, I don’t know. I can confirm that setting the compatibility level to Windows XP SP 3 (recommended by Windows compatibility wizard) did no good.
This is a reminder to me. Please ignore.
The other weeks I wrote this post. I noted that the recommended solution threw the baby out with the bathwater.
Here I just note that the error that comes up when converting to unformatted citations was overcome by running the conversion on the whole document (Ctrl-A then run the command) and then after it threw the error finding where it had got up to, highlighting unconverted entries one by one and converting individually (or a paragraph at a time), and then trying the whole document conversation again. One of the entries must have been the troublesome one, because after doing this a couple of times the process made no errors and converted the whole document. So the problem appeared to be a field or a bit of formatting created by EndNote itself, though it is possible there was a custom style that EndNote did not like and by selecting just the citation it was able to cope.
Now, something I like about EndNote: An easy way to put special characters into entries is to copy them from Word and paste into EndNote. For example, most bibliography styles recommend using an en rule (–) (often called en dash) to give a range, as in a page range like 234–312. If you stick an en dash into the page range in EndNote, it does make its way into the formatted bibliography. A simple thing, but a good thing.
Children of Hurin
J R R Tolkien
I read The Hobbit and The Lord of the Rings in my early teens and enjoyed them well enough. I read The Silmarillion a few years later, and actually quite liked it, in a funny way. I mean, if approached as a novel it is not really adequate; but then by modern standards many long narratives are not really novels in the sense of being a story of evolution of character, or at least a character with a problem to solve. As pseudomythology, The Silmarillion is an interesting exercise. Creation myth, evil coming into the world, fate and doom, etc. I quite liked Melkor/Morgoth as a mythological figure. Driven to take part in creation but limited to a subservient role by the deity, he decided he needed his own world to rule. And though in the end defeated, his influence could never be eradicated. As he poured his spite and lies into the world, he became less, more limited, more worthy of scorn himself. Turning the world dark cost him his own substance yet meant that the world could never be free of his shadow. It’s a neat idea, well implemented.
So in that great battle of mere Men and Elves against the he who had been the right hand of the creator, there were, the prefatory material tels us, three key tales that Tolkien wanted to flesh out. This is the one that he came closest to finishing and thus the one tht allowed itself to be shaped into a coherent volume without the need for new text. And because Tolkien is a name to conjure with, and to sell many book, here we have Children of Hurin.
It is really the tragedy of Turin, son of Hurin. Powerful, impetuous, he fights and flees and fights and flees and where’er he goes Morgoth’s hordes follow and wreak destruction, such that Turin is like a plague, bringing disaster upon whoever helps him.
It’s all very high and mighty and mythic. But it is also more like a ‘normal’ story than The Silmarillion — it’s more like a novel. And weirdly that (for me) makes it less successful than The Silmarillion (caveat — I was young when I read the latter, and perhaps less critical). It makes no sense to judge The Silmarillion as a novel, but Hurin is a novel, yet the plot is like a Greek myth, the hero more like Beowulf, and the result is a weird clashing. Turin is so stupid! He is this great fighter who eggs on his supporters to fight Morgoth and so brings them destruction, and then he utterly fails to learn anything from this. In a myth, that might work, when everything is seen from a distance, like chess pieces viewed from above. But in a novel we expect at least some kind of sense from our actors, so his behaviour just fails to ring true and so undermines the whole story; we have grandeur, but no sense. “Who is carrying the idiot ball this week?”
When reading The Iliad, an adjustment modern readers have to make is that the players do emphatically not rise and fall based on their own strengths as people. They rise and fall based on who is favoured by the gods, which can make the plot seem arbitrary and lacking in internal motivation. It is a fundamental split from what we have come to expect in our fiction since probably the 18th century at least. Hurin needs to be read in a similar way, at least that’s what I found; I had to make a conscious effort to not expect what I usually expect from a novel. (What do I implicitly expect? A person has a problem, external or internal, and makes attempts to solve it/overcome it/avoid it. These attempts at least seem reasonable to the reader or seem like the kinds of things the protagonist would actually do given their character. A skillful writer can make the protagonist very different from the reader and yet still reasonable to the reader. )
Turin never becomes enough of a character for me to see his actions as reasonable in his terms, yet behaves irrationally in my terms. I think that’s why the book ultimately was unsatisfactory. The book is interesting if Tolkien’s world is interesting. It is not at all bereft of grandeur and striking images, notably the battle with Glaurung. Worth a read for the fan of fantasy, but it must be recognised that it is closer in tone to The Silmarillion than to The Lord of the Rings.
Slitaz is a compact Linux distribution that hits a pretty solid sweet spot between efficiency and functionality. That makes it an excellent candidate for a small-footprint install inside a virtualisation environment for when you need a little bit of Linux to get a few jobs done.
For us English speakers, it lives at http://www.slitaz.org/en/
It comes in two styles — conventional stable releases, and a rolling release that is a little more up to date but might also be a little less stable. I decided to look at the rolling release. Downloaded from here — install image only about 45 MB! http://mirror.slitaz.org/iso/rolling/slitaz-rolling.iso
So began by starting VirtualBox and creating a new machine. (New; Name: Slitaz rolling Type: Linux 32-bit; other.
RAM: 256 MB
Type: VDI, Dynamically allocated
Size: 8 GB
OK, went into:
System → Processor → enable PAE/NX
Inserted the iso using the Storage menu
Double clicked to boot
Booted Slitaz Live (first entry on list of boot options)
Waited and eventually (host is not a fast machine) got desktop
Applications → System Tools → GParted
root password is ‘root’
Device → Create partition table → MSDOS
Right clicked on unallocated space and created 1024 MB swap
Then made the rest ext4 Linux (I called it Slitaz)
Waited till competed and exited GParted
System tools → Slitaz installer
Clicked ‘Install Slitaz’
Already done partitioning, so ‘Continue installation’
Selected ‘Install Slitaz to partition’ /dev/sda2
Set root password
Set up a user
Checked ‘Install bootloader’ then click ‘Proceed to Slitaz installation’
Nothing happened…? Waited quite a while. Clicked ‘Back to installer page’
Clicked ‘Install’ again
This time executed GParted from the menu, in case the installer ‘needed to know’ it had been executed
So opened then exited GParted, then continued with installation
Told it to format /dev/sda2 as ext4 (just to give it something to do)
Clicked ‘Proceed’ again; waited a really long time
Install proceeded — possibly I should just have waited longer the first time…
Chuntered away and then exited abruptly, leaving me with the desktop
Applications → Logout → Shut down
Interesting; VirtualBox manager noted machine as ‘Aborted’…?
Removed iso from virtual drive in the Storage menu of VB manager, then booted the VM
No luck; maybe install was incomplete?
Put iso file back in and repeat steps above (no need to repartition) but waited longer for each step to complete
Did not run GParted again, just clicked through, did not format partition
This time, the installer did not quit early, but finished and gave me an ‘Installation complete, you can now restart’ option
Clicked that option but then powered down after it started to reboot off the livedisc. Removed the iso and booted
logged in a normal user. No worries
Got TazPkg windows about recharging package lists; said OK
Typed root password; let it run then clicked ‘Check for upgrades’ — should not be many, it’s a rolling release. Came up with about 9 packages.
Clicked ‘Toggle all’ and ‘Install’ and watched it run.
Except for installer dropping out the once as noted above (and it might have been me do something odd…) install was very easy; only complexity was the need to run GParted yourself (no ‘auto partition’ option), but GParted is pretty easy to use.
Next, dkms, linux headers, guest additions…
Searched for dkms in TazPanel and it was there. Excellent. Checked the box for install. Searched for ‘headers’ and found ‘linux-module-headers’, so checked that for install. Then installed. Watched it do dependency tracking and then start installing. Very nifty.
Went to ‘Devices’ menu at top of VM and put in the Guest Additions image. In xterm on the guest, typed ‘su’ and logged in as root, then
And ran the VBoxLinuxAdditions.run script; it would not go! Permission issues, even though I was root.
Dunno why… as root, copied the file off to /home/username/ (username is the name of the user I created in the install — replace with your username) then
$chmod +xw VBoxLinusAdditions.run
and then ran it from there. It ran, but gave an error: ‘failed to set up vboxadd…’ but then I relaised I had not rebooted (installing dkms needs it, I think) and tried again.
This time, I logged in as root when I got the GUI login prompt, rather than using su.
Opened xterm, cd to cdrom, tried to run ./VBoxLinuxAdditions.run but again failed. Still would not run from /media/cdrom, but the file I copied over to the hard drive worked fine, and guest additions were installed.
OK, shared folders.
Rebooted guest, logged in as user (not root), opened a term, created a folder called sharetaz inside my /home/username directory. chmod 777 on the directory
chmod 777 sharetaz
(This is not good for security on a shared machine. There are better ways; though this is quick and easy, and reasonable in the context of a VM that one user is running when logged into their own desktop.)
On host, I decided to share my /home/username/Work folder, so just left that alone.
At top of running guest, clicked: Devices → Shared Folders → Shared Folders Settings → Add Folder Icon’ (i.e., clicked the folder plus a plus sign icon on the right).
Selected the folder on the host (easiest to use the pull down menu to select ‘Other’ and then browse). Selected ‘Make permanent’ and ‘Automount’; why not.
Gave it the name ‘Work’ as an identifier for the next step. Then saved and ok and exited from the setting dialogues.
In xterm on the guest:
typed root password
mount -t vboxsf -o uid=$UID,gid=$(id -g) Work /home/username/sharetaz
Failed; I checked outputs of ‘echo $UID’ and ‘echo id -g’, and both seem kind of empty. So got those values manually.
id -u username gives 1000
id -g username gives 1000
(remember, username is your username — darren, smith, whatever) so ran (still as root)
mount -t vboxsf -o uid=1000,gid=1000 Work /home/username/sharetaz
then exited su
then cd into sharetaz, and yep, there were the files in Work on the host.
Made a small file
added some content, saved, could I see it on the host?
Yep, plus could edit file on host or guest. Looks like done!
I put the mount command in a small script which I can run as a superuser or via sudo (when I install sudo) when I need it. There are ways to mount the automatically on boot, but I can’t be bothered.
When I reboot, the share folder is empty. If I open a term window I can type
and there it is.
Had to update a reference list in Word using EndNote. Was much more work than it should have been.
First, turned off Track Changes (you never know what it’s going to mess with).
In Endnote Tab in Word, to update bibliography, first needed to convert all citations to unformatted, by Ctrl-A then select EndNote Tab, Convert Citations and Bibliography and then Convert to Unformatted.
Then tried to Update Citations and Bibliography – errors. ‘Update failed’.
Then accepted all changes that included citations (you never know).
Tried to recreate bibliography.
Then made sure all citations were not already superscript (who knows with EndNote?).
Still fell over when ‘updating in-text citations’.
OK, redid Convert to Unformatted: ‘Command failed’.
But they all seemed to be converted.
OK, pasted in original reference list from source document and tried to rerun Update.
Apparently, there can be funny fields hidden in a Word document that can cause this error. So… went to http://endnote.com/kb/81143 which basically says
(1) Back-up your file (2) Convert to unformatted citations (3) Ctrl-A Ctrl-6 (Ctrl-6 unlinks fields, so this so-called solution can damage your document!!!)
Make sure all citations were converted to unformatted before running this! Otherwise, the field-stripping (Ctrl-6) will turn the formatted EndNote cross references into plain text!
Now, did work in that it fixed the EndNote problem – so problem fixed but … since it unlinks fields, it turned the ToC into a box of plain text and turned a whole lot of URLs distributed throughout the document into plain text. So it is a broken solution that only works at the expense of more manual work to then fix the collateral damage.
But it will have to do.
So, steps to update the references when using EndNote:
- Unformat citations
- Strip out the codes that case errors
- Format the references
- Fix all the damage done by step 2.
- Wish you were still working in a field that used BibTeX.
So I wanted to look at where Firefox stores my passwords and stuff. Following the instructions at https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile. Going direct to the files did work, but… if I followed the instructions:
then Firefox opened Audacious, a program for playing audio. There’s no mention of Audacious in the list of applications under Preferences. So this is looks like a silly bug that should have been fixed ages ago (I am running Firefox Quantum 57.0.4, 64-bit). I fixed it by uninstalling Audacious — Firefox then defaulted to Dolphin — but that’s not a good solution. If I reinstall Audacious… the problem comes back. It’s not Firefox’s fault, it’s a more Linux-y thing.
One suggested fix is to find and edit mimeapps.lst (at least for gnome and gnome-related). It might be, in order of precedence (ie highest up list will be the one that has the effect):
~/.config/mimeapps.list /etc/xdg/mimeapps.list ~/.local/share/applications/mimeapps.list /usr/local/share/applications/mimeapps.list /usr/share/applications/mimeapps.list
So I found
and removed all entries with ‘audacity’ in them. In fact, that file was the only one populated. Then I logged out of my account, logged back in and tried it out…did not help.
Then I typed:
$ cat /usr/share/applications/mimeinfo.cache | grep inode/directory inode/directory=audacious.desktop;kde4-dolphin.desktop;kde4-gwenview.desktop;nautilus.desktop;
OK, so audacious is there and dolphin, which is what Firefox used when when Audacious was uninstalled, is next. So I sudo edit the file and comment out the line and replace it with a new one without audacious. In fact, I actually want nautilus so I reorder the line completely.
But I think the MOST IMPORTANT thing was this:
sudo vim /usr/share/applications/audacious.desktop
And the last line of the file is:
So this is saying what MIME types Audacious is allowed to be thought of as opening — and one is inode/directory. So I remove it.
Now, test Firefox: BINGO!
So there you go, I’m sure no surprise to many, but this seems to work. Key files are the .desktop files, and the trick is that for some types of content Firefox uses them, not some inbuilt database of application associations, despite having such a list in its help. I edited system-wide desktop files, but you might have local versions, so check locally as well.
Dirty Work is not a highly regarded Stones album. In fact, it often comes at the very bottom of rankings of Stones albums. Not entirely unfairly.
On the other hand, it does have its (perhaps quirky) fans – for one, eminent music writer, Robert Christgau. And, I would submit, he’s right. Now, big caveat; a considerable fraction of the interest the album accrues only counts if you are a Stones fan. Considered purely on its musical merits (as of course it should be), it is clearly nowhere near the top of the Stones‘ list of achievements. What is interesting, and what Christgau puts his finger on, is that it is the last album the Stones did before they became a nostalgia act — and I say that as someone who saw them on the Voodoo Lounge tour and really likes Blue & Lonesome. Steel Wheels, the next record, was a conscious regrouping and consolidation, partly no doubt brought on by the poor commercial and critical reception Dirty Work got (at least by Stones standards). The Stones needed a success if they were to remain a going concern. Steel Wheels clearly evolved out of Dirty Work, but it has an air of calculation that is pronounced, even by the standards of the Stones, a band known for calculation and cynicism. (Which is not to say Steel Wheels does not have its own charms.) Dirty Work, by contrast, has an air of anger and desperation, which is about as genuine a reflection of where they were at as the Stones ever committed to vinyl — and where they were at was pretty damned messy. The film clip to ‘One hit (to the body)’ shows Jagger and Richards kicking and glaring at each other. The songs have titles like ‘One hit (to the body)’, ‘Fight’, ‘Had it with you’ and ‘Dirty work’. Even the artwork is nasty.<img class="wp-image-3822 size-large" src="https://darrengoossens.files.wordpress.com/2017/12/dwcover.jpeg?w=519" alt="Cassette inlay card from Dirty Work. Pretty dirty itself.” width=”519″ height=”173″ /> Cassette inlay card from Dirty Work. Pretty dirty itself.
So all this is fascinating if you’re into the band. The lyrics of ‘Hold back’, a churning, booming rock number lacking great riffs or a great tune, read exactly like Jagger justifying his studio excursions outside the band (his She’s the Boss came out a year or two before Dirty Work, and Primitive Cool about as much later). ‘If you don’t take chances you won’t make advances’ he yells. ‘Grab opportunity while you’re alive … it’s do or dare … trust your gut reaction.’ It’s Jagger explaining why he went outside the band. ‘Fight’ begins ‘Gonna pulp you to a mass of bruises‘ then gets even angrier. ‘Had it with you’ sounds like Keith complaining back at Mick, who’s always ‘shouting out instructions‘, while on ‘Dirty work’ (the song), Mick points out that for a large fraction of the 70s Keith was a passenger while Mick kept the show on the road (‘Living high sitting in the sun, sit on your ass till your work is done…’).
So, great material for the Stones’ group therapy sessions, but what about the tracks themselves? Well, the lyrics having an agenda does help propel the songs, but it is true that the tunes and riffs are weak. ‘One hit’ brings in Jimmy Page to provide the solo (what does that tell us about Ronnie?) and works well as a a latter day Stones rocker. Indeed, its rather a blueprint for Stones rockers ever since. We get ‘Harlem shuffle’ and ‘Too rude’ — 2 covers in 10 tracks; no Stones studio effort had two covers since the much longer Exile … well, I must confess I like ‘em (only one of ’em’s rock’n’roll). ‘Shuffle’ drives along nicely and doesn’t outstay its welcome, and ‘Too rude’ offers a nice change from the growling, thudding rock songs around it — it’s a growling, thudding reggae number. ‘Fight’ is competent. ‘Dirty work’ is ok, but makes a song out of fewer musical ideas than the Stones used to throw away in an outro. ‘Had it with you’ is the same, but the honking guitars, tighter song structure and Charlie’s drumming drive it nicely. On a good album it would be a little, pleasant diversion. On this one, it’s one of the better songs (if only for the focussed lyrics and concision).
The album highlight, for me, is ‘Sleep tonight’, Keith’s closing ballad. Piano-based, lyrically ambivalent but generous, it’s one of those songs that seem to get labelled ‘deep album cuts‘. Keith’s ‘All about you’ (off Emotional Rescue) and ‘How can I stop’ (Bridges to Babylon) are high points on those records. They bring a bit of heart and a change of pace. Even on a strong album, one that does not get dismissed out of hand, ‘Sleep tonight’ would be in the top couple of tracks. Here, it is probably the outstanding composition (as distinct from bunch of riffs) on the record. Maybe it’s for Anita Pallenberg, I don’t know; but it’s a lovely track. I like ‘One hit’ and ‘Sleep tonight’ better than anything on Undercover, the preceding album, and I find myself listening to this record more often than Steel Wheels or Voodoo Lounge, both far more commercially and critically successful works.
Amidst the desperation and anger and threats, there’s a glimpse of something real and human that all too often the Stones, especially Jagger with his cliché-ridden lyrics, fail to approach.
Plus, it ends with a little of Ian Stewart’s boogie woogie piano. I like that too. Next I’m gonna get Boogie 4 Stu.
Wrote a crude program to calculate X-ray, neutron and neutron magnetic diffraction scattering factors.
StrucFact or StrucFact.exe is a crude program to calculate expected intensities for neutron diffraction (magnetic and nuclear) and X-ray diffraction (in the version from 2013). It is distributed as source code because any serious user will likely need to modify the source to make sensible use of it. It’s mathematics is essentially taken from Neutron Diffraction by George Bacon and H. M. Rietveld J. Appl. Cryst. (1969) 2 65-71 (see also here), and its mandate is limited; its job is to calculate F2 for neutron scattering for arbitrary cells, magnetic or nuclear, and more recently for X-ray diffraction.
It is `developed’ solely on an `as needed’ basis, which means I add `features’ when I need them to solve some problem I am working on. The inverted commas may seem gratuitous, but they are not!
I am sure there are better tools out there for everything that this program does, and I advise against using it. There should be a README.TXT and the code itself distributed with this file.
1. It does not work for incommensurates (unless you want to define an enormous cell).
2. It treats every cell as P1 (i.e. you have to give it all atoms explicitly).
3. The nuclear and magnetic cells must be the same size, which means that if one is bigger than the other (usually magnetic bigger than nuclear) you have to put the atoms from the smaller cell into the bigger, including inserting all redundant copies of atoms.
4. No corrections for intensities (e.g. not even Lorentz), no B-factors beyond the isotropic.
In other words, it is remarkably limited. Why anyone would want to use it I do not know when FullProf and GSAS and the like are around. Having said that, it is quite simple (in the sense that everything has to be done explicitly, so it is laborious but not as conceptually demanding) compared to such programs, and the (minimally tested) code is here available.
This is Fortran90 code that does not need any extra libraries. gfortran is to be preferred.
gfortran -o StrucFact.exe strucfact.f90
Please report errors in the code to /dev/null, although if desperate you can email me.
Download from http://djg.altervista.org/downloads/StrucFact_Files.tar.gz or http://djg.altervista.org/downloads/StrucFact_Files.zip. There’s a PDF inside the archive that gives more info.
This is simple but I like it. A bit old school, which suits me.
First, I created a ‘bin’ directory. Well, first first I opened a command line prompt;
C:\ cd Users\username C:\Users\username> md bin cd bin C:\Users\username\bin>
In the ‘Find a setting’ search box, searched for ‘env’ — this gives environment variables, including the path. Selected ‘Edit environment variables for your account’ — this does not need admin account.
Selected ‘Path’ and clicked ‘Edit’, then ‘New’ then added ‘c:\users\username\bin” to the list of directories in the path. Then clicked ‘OK’ and exited from all dialogs.
Opened a command window and typed ‘path’ and verified that the new directory was at the end of the path.
Now, found the location of the three executables I wanted to access from the command line — winword.exe, excel.exe and acrord32.exe. Your paths may not be the same as those shown below. Then I put them in little batch files that were stored in the new bin directory. Batch files are word.bat, exel.bat and acrobat.bat. They look like this:
REM Batch file to open excel; note that space between /t and %1 is essential! REM also, will not work if whole path including excel.exe is quoted as a single string. start /b c:\"Program Files (x86)"\"Microsoft Office"\root\Office16\excel.EXE /t %1
REM Batch file to open word; note that space between /t and %1 is optional! start /b c:\"Program Files (x86)"\"Microsoft Office"\root\Office16\WINWORD.EXE /t %1
REM Batch file to open acrobat reader start /b "c:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" %1
Now, these are very simple; they only take one command line argument — the file to be opened. This is 80:20 rule stuff! The Windows ‘start’ command lets me start the application using the /b flag which is like an & on a Unix command — it gives me back the command line prompt once the program starts running. Note how paths are quoted — start messes with the /t switch on Excel and Word if the whole path including the exe file name is quoted, so it has to be quoted in bits.
To use them, I just type a command (batch file name) plus the file I want to open. For example
And I get:
where you can see that I have got the command line back and my file has been opened in an existing session of Acrord32. Note that I have not put ‘echo off’ or anything in these batch files, so they echo the command to the screen. I quite like seeing what’s going on ‘under the bonnet’, but a prefatory ‘@echo off’ at the start of each batch file will make them run silently.