• Windows and Linux Interoperability

    Home » Forums » Newsletter and Homepage topics » Windows and Linux Interoperability


    LINUX By Sandra Henry-Stocker If you, like me, have both Windows and Linux systems on your network, you don’t have to walk from one desk to another to
    [See the full post at: Windows and Linux Interoperability]

    2 users thanked author for this post.
    Viewing 1 reply thread
    • #2350599

      I started out on the PC with MS-DOS, and for years I loathed GUIs for actual work (they were kinda fun to play with, but we all knew that real work was done from DOS), but these days, I much prefer graphical tools even though I am comfortable with the command line.

      This is all from a home networking perspective. I know little to nothing about the specifics of business environments.

      If I need to remotely log in to a Windows PC, I use Remmina and start a RDP session from Linux, since Windows is already set up to handle that. For Linux to Linux, I like the free and fast NoMachine. I’ve never contemplated remoting into a Linux PC from Windows, so I’ve never investigated it. I’d probably grab the Windows version of NoMachine for that, since it’s already set up on the Linux PCs.

      For file transfer, I used to use SMB shares (and I still do for Veeam backup), but it’s gotten to be even more of a hassle than usual since MS decided we should all stop using SMB1. At home, with all the PCs under my direct control (and all within line of sight), I use open shares, so the security flaws in SMB1 are meaningless. It doesn’t get any more insecure than open!

      Now I mainly use KDE Connect, a part of the KDE Plasma desktop environment that also works in other desktop environments in Linux, and that also has versions for many other operating systems, including Windows, Mac, and Android. I’ve tried the Windows and Android versions and found them to work well.

      KDE Connect is a very handy tool for file transfer and all kinds of other stuff (clipboard sharing, sending a URL directly to the browser on another PC, reading and writing SMS texts on your PC keyboard and sending them on the phone rather than having to use that small touch keyboard, even using your phone’s touchscreen as a touchpad for a PC, all kinds of stuff), and sending a file to another PC on the network (that has previously accepted the pair request) is as easy as right click, select “send via KDE connect to” and the name of the PC. The file is immediately sent (encrypted in transit) to the recipient, and placed in the directory the recipient has specified for incoming files. This is only for PCs that have been paired with Connect, and the recipient can turn on and off any of the various functions like file transfer without unpairing. It does not have the granularity of control of Windows SMB ACLs, but for a quick file transfer without all the headache, it’s pretty great.

      As for text files… if you don’t know what she’s referring to here, is that in Windows (as in MS-DOS before that), a line end is demarcated with a carriage return (CR) and a linefeed (LF).  Each of these is a non-printable control character whose name comes from way back in the typewriter era. CR means to return to the leftmost column, and LF means go down one line.

      In the Unix family, a LF alone is used to indicate an end of a line. If this was a typewriter, a LF alone would only mean to go down one line (but don’t return to the leftmost column), but it’s not a typewriter. LF is just a non-printable character used to denote the end of a line. It could just as easily been a CR character alone (which I read that Macs did, but that may be from a time before Macs ran Unix too), or any other nonprintable character that had no other use.

      To me, the single character makes the most sense… since there is no carriage and an end of line doesn’t specifically mean “go down a line” (it just means “this line ends here,” and it is up to the program to figure out what to do with that information), there’s no real point in always using them both together, and it just wastes an extra byte at the end of each line. Still, the HTML standard was written to use the Windows standard CR+LF rather than just picking one or the other, for reasons I don’t know.

      Fortunately, Windows Notepad (as in Windows 10… I didn’t test older versions) and KDE’s Kate, and I would presume the other graphical Linux text editors, are able to handle this seamlessly. Kate (KDE text editor) opens and displays a Windows text file just fine, and if that file is saved, it retains the Windows CR+LF encoding and applies it also to any new lines created with Kate. Notepad behaved the same way in reverse, properly displaying the Linux text file and saving it with only a LF at the end of each line, retaining its existing format just as Kate had done.

      When I created a Linux shell script in Notepad, though, it didn’t work perfectly when I tried to run the script in Linux. It tried to parse the extra CR as if it were a normal character. If I had put the Linux command ‘ls’ in the script, instead of displaying all of the filenames within the current working directory (like ‘dir’ in Windows), it would look for a command (or program) with three characters in its name, an l, an s, and a CR, and there is no command by that name. That’s when the dos2unix program would be useful! If you need it in Ubuntu or any of its derivatives, like Mint or Neon, it’s in the repo.

      The quick Windows batch file I made in Linux worked fine in Windows 10’s command window, though it was a very simple one (three echo statements). It is possible there may be issues on the Windows side too from the different way of handling things. If you use text files to store miscellaneous info as I do, though, all of your old Windows files should work in your Linux editor too, and vice versa.

      I have the text editor’s icon in the quick launch menu in the panel (taskbar in Windows) so I can hit it and jot down a note any time I wish. I did the same in Windows, going all the way back to Windows 95, the first Windows that had a taskbar. The odds of me finding an actual pen and paper in any given instant are about as bad as me being able to find or read the note later on, but I haven’t yet lost an entire PC (they are all plugged in when at home, so I am always reasonably certain they will be at the end of the cord). I have quite a lot of info stored in text files from over the years! Anything I think I may want to remember for later, I write it down in a file while it is fresh in my mind, and try to give it a descriptive, searchable title. My entire library of such things was just moved right in to Linux, and I never even notice that the text files are Windows files.


      Dell XPS 13/9310, i5-1135G7/16GB, KDE Neon
      XPG Xenia 15, i7-9750H/16GB & GTX1660ti, KDE Neon
      Acer Swift Go 14, i5-1335U/16GB, KDE Neon (and Win 11 for maintenance)

    • #2351033

      You left out what I find the best way.  That is – run an XServer on windows and run X clients on the linux system.  cygwin is the way I do it, but there are probably others.

      This takes some X fiddling to get working correctly but serious Linux users should be able to figure it out.

    Viewing 1 reply thread
    Reply To: Windows and Linux Interoperability

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: