nternet suggests prefixing the above command with
, but I don't have an env variable named DISPLAY.
You should, of course, try it before assuming it won't work.
It doesn't matter whether or not the variable already exists.
Comment: This often trips people up. They'll see advice on the Internet to edit such-and-such file (or set such-and-such option) and then they look and find that they don't already have that file. And assume, quite possibly correctly, that they have the wrong path or something like that. It'd be nice if there was some clear-cut way to indicate that "a thing" that is being discussed might not already exist, but that if it doesn't, that's not a problem. Note that this later assertion may not be in true in some cases (say, if instructions tell you to edit /etc/passwd - clearly, that file should already exist), but there should be some way to make this clear one way or the other.
Yeah, someday, I'm going to make it my job to re-write every tutorial on the InterWeb. Yeah, and before breakfast...