Infinite recursion with SymLink on Ubuntu on Windows
-
Okay, bear with me. I have this one Node program which best runs under Linux due to symlinks. But a VM is sometimes sub-optimal (especially when doing some coding on the go). But I still want to use the editors I have installed under Windows. Yes, yes, I know: I'm the
So, there's this Linux subsystem now, which allows me to install the Node program I want. But now I need to edit the files which determine how the program runs.
I cannot edit the files under the UoW-subsystem directly because, while I can indeed see them, editing them will result in I/O-access errors.
But the reverse is not true - the Windows partition lives under
/mnt/C/
. So, my idea was to symlink from my working directory to a Windows directory like this:~/working_dir$ ln -s /mnt/C/User/name/Documents/files/ client
The
client
directory then contains some other subdirectories, say, likeclient/foo/
The command does indeed create the symlink and everything looks well. Until I enter the
client
directory and then try to enter thefoo
directory. Because instead of finding myself in the actualfoo
directory, I'm actually in theclient
directory again which, upon repeating the steps, results in something like this:~/working_dir/client/foo/foo/foo/foo$ the fuck?
Anyone have any idea what's going on? Didn't have too much luck with Google searches.
-
@Rhywden this is probably a stupid suggestion, but did you try getting rid of that final
/
afterfiles
? I.e.~/working_dir$ ln -s /mnt/C/User/name/Documents/files client
-
@anotherusername said in Infinite recursion with SymLink on Ubuntu on Windows:
@Rhywden this is probably a stupid suggestion, but did you try getting rid of that final
/
afterfiles
? I.e.~/working_dir$ ln -s /mnt/C/User/name/Documents/files client
That, Sir, was not stupid at all.
Good grief. That was the solution.
-
@Rhywden Welcome to the world of *nix, where the frist hint of talk of user-friendliness gets you branded a luser and rode out of town on a rail.
-
@masonwheeler said in Infinite recursion with SymLink on Ubuntu on Windows:
@Rhywden Welcome to the world of *nix, where the frist hint of talk of user-friendliness gets you branded a luser and rode out of town on a rail.
Actually, it's a bug with Windows.
-
@ben_lubar How do you figure? For all their screwups, the one thing Microsoft consistently got right--and the main reason it's ended up taking over the world as other OSes fell by the wayside--has always been a strong basic user experience.
-
@masonwheeler said in Infinite recursion with SymLink on Ubuntu on Windows:
@ben_lubar the one thing Microsoft consistently got right--and the main reason it's ended up taking over the world as other OSes fell by the wayside--has always been a strong basic user experience.
ROFL
-
@TimeBandit ROFL all you want, but until you can produce a better working theory for why John Q. Citizen buys a Windows PC and not a Linux box, the point stands.
-
@masonwheeler said in Infinite recursion with SymLink on Ubuntu on Windows:
@ben_lubar How do you figure? For all their screwups, the one thing Microsoft consistently got right--and the main reason it's ended up taking over the world as other OSes fell by the wayside--has always been a strong basic user experience.
This specific bug happens on "Windows Linux Subsystem", but not on an actual Ubuntu machine running the Linux kernel.
-
@Rhywden said in Infinite recursion with SymLink on Ubuntu on Windows:
Okay, bear with me. I have this one Node program which best runs under Linux due to symlinks.
I'm not following. Windows has had symlinks for some time now. In fact, here's the Vista direction for creating symlinks.
mklink /d client C:\Users\name\Documents\files
Edit: Forgot that mklink has the two args reversed from
ln
-
@masonwheeler said in Infinite recursion with SymLink on Ubuntu on Windows:
@TimeBandit ROFL all you want, but until you can produce a better working theory for why John Q. Citizen buys a Windows PC and not a Linux box, the point stands.
One thing is that @ben_lubar is simply factually correct: it works just fine on a real Unix and it's buggy on Windows. The other is, you don't assume most people had a good look at the available alternatives and then made an educated decision on which system to use, do you? If they did and still decided on Windows, you'd have a point. In fact most people simply use whatever comes with their box when they buy it. The rest are either traditionalists (like the designer types from the other camp who still think they needed a Mac because it was they only thing that runs Photoshop properly) or corporate users who need some special Windows-only software and/or Office because the guy who wrote their bespoke in VBA has left long ago.
-
@LaoC said in Infinite recursion with SymLink on Ubuntu on Windows:
on a real* UNIX running inside/alongside/kinda sorta with Windows
*for generous definitions of real. YMMV. Don't look too hard. Do not taunt Happy Torvalds Ball.
-
@sloosecannon said in Infinite recursion with SymLink on Ubuntu on Windows:
@LaoC said in Infinite recursion with SymLink on Ubuntu on Windows:
on a real* UNIX running inside/alongside/kinda sorta with Windows
*for generous definitions of real. YMMV. Don't look too hard. Do not taunt Happy Torvalds Ball.
Sure, the way Cygwin has worked for ages. It would probably work fine on an ext* FS running in the Unix sidecar on some loop device, but where the two systems share higher-level stuff like file systems, the mismatch becomes visible.
Of course it's the same story the other way roundโWINE and Samba are both full of
-
@powerlord said in Infinite recursion with SymLink on Ubuntu on Windows:
Edit: Forgot that mklink has the two args reversed from
ln
Yeah, going to Linux-world I always try it the wrong way first every time. Unfortunately, that's usually only noticeable if I fail it specifically enough that it says the file already exists.
-
@Tsaukpaetra said in Infinite recursion with SymLink on Ubuntu on Windows:
@powerlord said in Infinite recursion with SymLink on Ubuntu on Windows:
Edit: Forgot that mklink has the two args reversed from
ln
Yeah, going to Linux-world I always try it the wrong way first every time. Unfortunately, that's usually only noticeable if I fail it specifically enough that it says the file already exists.
ln
has the same argument order asmv
andcp
-
@LaoC said in Infinite recursion with SymLink on Ubuntu on Windows:
@masonwheeler said in Infinite recursion with SymLink on Ubuntu on Windows:
@TimeBandit ROFL all you want, but until you can produce a better working theory for why John Q. Citizen buys a Windows PC and not a Linux box, the point stands.
One thing is that @ben_lubar is simply factually correct: it works just fine on a real Unix and it's buggy on Windows. The other is, you don't assume most people had a good look at the available alternatives and then made an educated decision on which system to use, do you? If they did and still decided on Windows, you'd have a point. In fact most people simply use whatever comes with their box when they buy it. The rest are either traditionalists (like the designer types from the other camp who still think they needed a Mac because it was they only thing that runs Photoshop properly) or corporate users who need some special Windows-only software and/or Office because the guy who wrote their bespoke in VBA has left long ago.
I use Windows because it runs my games natively. I use Ubuntu because that's the distribution everyone tests their software on first. I use Docker because the OS I'm running in staging is 1:1 identical to the one I'm running in production. I use lojban because I really want to figure out if there's a use for the word jbojevysofkemsuzgugje'ake'eborkemfaipaltrusi'oke'ekemgubyseltru.
-
@ben_lubar said in Infinite recursion with SymLink on Ubuntu on Windows:
real dictionary
For a given value of real
-
@masonwheeler said in Infinite recursion with SymLink on Ubuntu on Windows:
a better working theory for why John Q. Citizen buys a Windows PC and not a Linux box,
Because (a) most people believe that Windows is just part of the PC, don't realize that replacing it is even a thing, and are in any case disinclined to do so because (b) Windows is what everybody else uses because (c) Microsoft spent the late Eighties and early Nineties making subsequently-ruled-illegal licensing deals with OEMs in order to bootstrap the de facto monopoly that persists to this day.
Neither Linux nor Windows is objectively superior. Each has an army of loud fanbois dedicated to spreading the misconception that this is untrue.
Both systems will waste approximately equal amounts of your time. If you run Linux, you will waste endless time on trying to work out how to make it do what you want it to. If you run Windows, you will waste endless time on trying to stop it from doing stupid broken crap you never asked for.
Personally I find the former option more interesting and less irritating, which is why I have not allowed Windows to manage any of my personal boxes since 2000. Your mileage will very likely vary.
-
@ben_lubar said in Infinite recursion with SymLink on Ubuntu on Windows:
I use lojban because I really want to figure out if there's a use for the word jbojevysofkemsuzgugje'ake'eborkemfaipaltrusi'oke'ekemgubyseltru.
There is not.
-
@flabdablet said in Infinite recursion with SymLink on Ubuntu on Windows:
Neither Linux nor Windows is objectively superior. Both have an army of loud fanbois.
Both systems will waste approximately equal amounts of your time. If you run Linux, you will waste endless time on trying to work out how to make it do what you want it to. If you run Windows, you will waste endless time on trying to stop it from doing stupid broken crap you never asked for.This is one of those few times that you and I are in agreement. I do differ from you on:
@flabdablet said in Infinite recursion with SymLink on Ubuntu on Windows:
Personally I find the former option more interesting and less irritating, which is why I have not allowed Windows to manage any of my personal boxes since 2000. Your mileage will very likely vary.
...in that I run both of them concurrently and work on both of them constantly. So much so that I have become very used to seeing
"'ls' is not recognized as an internal or external command,
operable program or batch file.Running all three of the major OS's on a daily basis is probably why I am pissed off all the time.
-
@Polygeekery said in Infinite recursion with SymLink on Ubuntu on Windows:
...in that I run both of them concurrently and work on both of them constantly. So much so that I have become very used to seeing
"'ls' is not recognized as an internal or external command,
operable program or batch file.Solution: PowerShell.
No, really though, if you run both of them concurrently and work on both of them constantly (as I also do), PowerShell really creates an excellent middle ground (not to mention it's also on Linux so you can use the same platform on both).
-
@heterodox said in Infinite recursion with SymLink on Ubuntu on Windows:
Solution: PowerShell.
Or Git shell, which seems to be a pretty good approximation of bash. There's also GOW.
Aggregate them all under ConEmu/cmder, spend a few minutes setting it up and Windows becomes a pretty decent command line environment.
-
@Maciejasjmj said in Infinite recursion with SymLink on Ubuntu on Windows:
@heterodox said in Infinite recursion with SymLink on Ubuntu on Windows:
Solution: PowerShell.
Or Git shell, which seems to be a pretty good approximation of bash. There's also GOW.
Aggregate them all under ConEmu/cmder, spend a few minutes setting it up and Windows becomes a pretty decent command line environment.
Well, I work on servers about 90% of the time so I have an irrational aversion to installing anything. Hence my worship of things like PowerShell, RoboCopy which actually make a baseline Windows environment usable.
-
@Maciejasjmj said in Infinite recursion with SymLink on Ubuntu on Windows:
decent command line environment
E_NON_SEQUITUR
-
@Maciejasjmj said in Infinite recursion with SymLink on Ubuntu on Windows:
Or Git shell
Which IIRC is powershell with a git extension included.
-
@Polygeekery said in Infinite recursion with SymLink on Ubuntu on Windows:
"'ls' is not recognized as an internal or external command,
operable program or batch file.Exactly. Stupid broken crap you never asked for.
POSIX has been a thing for long enough that Windows really should have been supporting
cp
,ls
andmv
as aliases forcopy
,dir
andmove
since approximately forever.
-
@flabdablet they do, in Powershell
-
@Jaloopa But then I'd have Powershell on me.
If you could tell me how I can turn off eight-line error messages IN RED that describe in excruciating detail which part of the Powershell engine barfed on what I asked for while remaining completely unhelpful about what I actually did wrong, I might be a little less unwilling to subject myself to the stupid thing.
It's also really fucking irritating to have to work around the default security settings on every machine that might have a use for a PS script. Not even WSH is that insane.
-
@flabdablet said in Infinite recursion with SymLink on Ubuntu on Windows:
@Jaloopa But then I'd have Powershell on me.
If you could tell me how I can turn off eight-line error messages IN RED that describe in excruciating detail which part of the Powershell engine barfed on what I asked for while remaining completely unhelpful about what I actually did wrong, I might be a little less unwilling to subject myself to the stupid thing.
It's also really fucking irritating to have to work around the default security settings on every machine that might have a use for a PS script. Not even WSH is that insane.
100% QFT.
PowerShell is awesome, except for those really, really, really annoying little issues.
-
For the most part I'm lazy and don't want to go to the effort of learning not-Windows. But part of why I don't consider lunixes because it's hard to overcome negative impressions. Like inane or outright insane defaults. Bad or not existent GUIs, so often you have to resort to the command line. If you want to attract non-power users, CLI should be an option, not mandatory. A community that is not newb friendly, if they're even friendly to anyone. I could go on.
Those problems are not exclusive to lunix, and they have been long solved for all I know, but they're still impressions that are hard to overcome.
-
@coderpatsy said in Infinite recursion with SymLink on Ubuntu on Windows:
they're still impressions that are hard to overcome
largely as a result of endless regurgitation by Windows fanbois who have not touched a Linux desktop installation in the last decade.
-
@flabdablet it's pretty much what I've encountered every time I've installed a Linux distro and attempted to get to grips with it.
Some forums are more friendly than others, but general guides tend to be aimed at either people who know absolutely nothing and need the concept of a click explaining to them; or Linux gurus who just need a reminder of which CLI command to enter, with minimal documentation.
-
@coderpatsy said in Infinite recursion with SymLink on Ubuntu on Windows:
But part of why I don't consider lunixes because it's hard to overcome negative impressions.
Windows 1 & 2: Could barely run a CMD and use DIR in it. Don't try to run anything DOS in there, would crash it hard. Better to just click Quit and go back to DOS.
Windows 3 & 3.11: Windows everywhere, EVERYWHERE !!! You click something it open a window. You want to open Word ? You have to open at least 2 windows. You spent half your time closing windows. And you could really only run one program at a time. Unless you wanted to crash the machine.
Windows 95/98/98SE : BSOD multiple times a day. Programming on that, you developed a habit of pressing CTRL-S every couple minutes without even thinking about it. My keyboard's left CRTL and the S key became blank from wear.
Windows 2000: First windows I consider stable. Could work on it and only reboot once in a while (every couple days maybe)
Windows ME: The Mistake Edition. Couldn't keep it up long enough to really use it. Format and install Win2K was the solution.
Windows XP: Switch theme to Classic to avoid the Fisher Price look and it's a decent OS. Except the security model is like swiss cheese (by default, every user is an administrator )
Windows Vista: Alpha version of Windows 7. Probably a stable OS, but the hardware to run it at a decent speed only came to market a year later. Was sold on machines barely capable of running XP so it took 10 minutes to shutdown.
Windows 7: Best Windows Ever. Still use it at home for my gaming rig. Insist too much on rebooting for pretty much every update, but I can delay it if I'm not in a game fullscreen or away from it.
Windows 10: I managed to dodge the bullet until now. No comment from me.
I'm glad I could overcome Windows multiple negative impressions, else I would still be stuck on DOS
-
@masonwheeler said in Infinite recursion with SymLink on Ubuntu on Windows:
@TimeBandit ROFL all you want, but until you can produce a better working theory for why John Q. Citizen buys a Windows PC and not a Linux box, the point stands.
Microsoft Office?
Gaming?
Familiarity?
Shops selling Windows PCs but not Linux ones?
-
@ben_lubar said in Infinite recursion with SymLink on Ubuntu on Windows:
ln
has the same argument order asmv
andcp
I remember (way, way back) when I was looking at some SystemV source code - those were all the exact same code, it just changed behavior based on what argv[0] was...
-
@dcon said in Infinite recursion with SymLink on Ubuntu on Windows:
@ben_lubar said in Infinite recursion with SymLink on Ubuntu on Windows:
ln
has the same argument order asmv
andcp
I remember (way, way back) when I was looking at some SystemV source code - those were all the exact same code, it just changed behavior based on what argv[0] was...
Isn't that how busybox works? Every single executable is a symlink to the same file and it shares as much code as possible and is statically linked.
-
@ben_lubar said in Infinite recursion with SymLink on Ubuntu on Windows:
statically linked.
:not_this_shit_again:
-
@error said in Infinite recursion with SymLink on Ubuntu on Windows:
@ben_lubar said in Infinite recursion with SymLink on Ubuntu on Windows:
statically linked.
:not_this_shit_again:
Static linking is exactly what you need if you're trying to make a one-executable operating system.
-
@TimeBandit Hey, you forgot 8!
-
@Magus said in Infinite recursion with SymLink on Ubuntu on Windows:
@TimeBandit Hey, you forgot 8!
Looks like my brain works really hard at trying to forget that
monstrositytablet/phone interface on a desktop
-
@flabdablet said in Infinite recursion with SymLink on Ubuntu on Windows:
If you run Linux, you will waste endless time on trying to work out how to make it do what you want it to. If you run Windows, you will waste endless time on trying to stop it from doing stupid broken crap you never asked for.
QFT. Though typically once you've gotten Linux to do what you want it to do, it will remain statically so forever...
-
@Tsaukpaetra said in Infinite recursion with SymLink on Ubuntu on Windows:
typically once you've gotten Linux to do what you want it to do, it will remain statically so forever...
Also, the set of things I want a computer to do seems to grow a lot slower than the set of new bullshit Windows behaviors that need to be turned off.
-
@flabdablet said in Infinite recursion with SymLink on Ubuntu on Windows:
@Tsaukpaetra said in Infinite recursion with SymLink on Ubuntu on Windows:
typically once you've gotten Linux to do what you want it to do, it will remain statically so forever...
Also, the set of things I want a computer to do seems to grow a lot slower than the set of new bullshit Windows behaviors that need to be turned off.
Like turning off Amazon, phoning home, and stupid backup in Ubuntu? and of course then setting up sane bash config (binding history-search-backward to arrows, adding shopt -s histappend, ...) getting rid of fucking GEdit (fuck that crap with its stupid search functionality, and constant crashes), ... yeah every OS has an initial set up time
I run Fedora+Cinnamon at home (it is the single best OS I have had for over 20 years), but when writing cross-platform applications it is for Ubuntu
-
@dse said in Infinite recursion with SymLink on Ubuntu on Windows:
Like turning off Amazon, phoning home, and stupid backup in Ubuntu?
Huh. Which version are you using that does that? Must have slipped in behind the scenes because I'm somewhat sure my install doesn't do that...
-
@Tsaukpaetra said in Infinite recursion with SymLink on Ubuntu on Windows:
@dse said in Infinite recursion with SymLink on Ubuntu on Windows:
Like turning off Amazon, phoning home, and stupid backup in Ubuntu?
Huh. Which version are you using that does that? Must have slipped in behind the scenes because I'm somewhat sure my install doesn't do that...
The desktop (16.04 but also 14 on some machines) pins an Amazon to the launcher, and searches in Amazon results!
-
@dse said in Infinite recursion with SymLink on Ubuntu on Windows:
@Tsaukpaetra said in Infinite recursion with SymLink on Ubuntu on Windows:
@dse said in Infinite recursion with SymLink on Ubuntu on Windows:
Like turning off Amazon, phoning home, and stupid backup in Ubuntu?
Huh. Which version are you using that does that? Must have slipped in behind the scenes because I'm somewhat sure my install doesn't do that...
The desktop (16.04 but also 14 on some machines) pins an Amazon to the launcher, and searches in Amazon results!
Neat. I gotta try it now.
-
@dse said in Infinite recursion with SymLink on Ubuntu on Windows:
pins an Amazon to the launcher
???
-
@flabdablet said in Infinite recursion with SymLink on Ubuntu on Windows:
@Tsaukpaetra said in Infinite recursion with SymLink on Ubuntu on Windows:
typically once you've gotten Linux to do what you want it to do, it will remain statically so forever...
Also, the set of things I want a computer to do seems to grow a lot slower than the set of new bullshit Windows behaviors that need to be turned off.
Although this is true, the set of things Linux can do still has not reached the set of things I want to do, and refuse to live without,
According to a recent video, the only thing Linux Torvalds runs on his computer is a web browser and a couple of terminal windows. In that case, I'm sure Linux works just fine.
For me however, there are too many cases where I need to do something and Linux applications (if they exist at all) only sort of, kind of, almost do what I need, but are missing key features or are just complete shit.
I dumped Windows 10 and went back to Windows 7 for much the same reason -- too much work for too little value.
-
@dse said in Infinite recursion with SymLink on Ubuntu on Windows:
Like turning off Amazon, phoning home, and stupid backup in Ubuntu?
I jumped ship from Ubuntu after reading Shuttleworth's batten-down-the-hatches don't-you-dare-be-mean-to-my-designers responses to the howls of complaint about not-quite-Macifying the window controls in Lucid Lynx; it seemed to me at the time that that was the point at which Ubuntu had crossed the line from being a more polished Debian to being just another tedious corporate upsell vehicle. Subsequent inclusions have only confirmed that impression.
I've been running Debian Testing ever since, and the only time it's caused me anything approaching real grief is when a careless and insufficiently researched
aptitude full-upgrade
ripped away the functional and beautiful GNOME 2 and foisted the broken and hideous GNOME 3 on me in its place. Xfce has been serving me well since about two weeks after that (which is how long it took me to work out that no, I was never going to stop being irritated by GNOME 3's insane design choices).yeah every OS has an initial set up time
All I do when setting up a new Debian box is clone the root volume from one I already have, clean out its /etc/passwd, change its hostname and regenerate its ssh keys. I have a script for that. Set up time is very very small.
I'm effectively using an internal Debian distro customized just the way I like it, and I very much appreciate the ability to do that. I also enjoy Debian Testing being a rolling-release distro, allowing me to update it on a schedule convenient for me rather than one convenient for the devs.
I run Fedora+Cinnamon at home (it is the single best OS I have had for over 20 years)
I hear Cinnamon is mostly OK these days. I've never seen anything it does better enough than Xfce to make me willing to rely more than I already do on anything GNOME-based. I'm fully expecting that GTK will eventually get bad enough to kill off Xfce as well, and I'm just hoping that LXQt will be mature enough to be viable by then.
Debian's package curation is still done rather better than Fedora's.
when writing cross-platform applications it is for Ubuntu
Ubuntu is still mostly Debian-derived, so I would be surprised to learn that anything packaged for Ubuntu would have major difficulty being adapted for a comparably recent Debian.
-
@El_Heffe said in Infinite recursion with SymLink on Ubuntu on Windows:
For me however, there are too many cases where I need to do something and Linux applications (if they exist at all) only sort of, kind of, almost do what I need, but are missing key features or are just complete shit.
I dumped Windows 10 and went back to Windows 7 for much the same reason -- too much work for too little value.
The school campus I netadmin (about 120 workstations) is still running 7 for exactly that reason.
I sincerely hope that Windows 10 is good enough to serve your purposes before they EOL Windows 7. I'm retiring next year, so the school will be SEP by the time that happens.