Coder Social home page Coder Social logo

Can't save options about wsltty HOT 19 CLOSED

mintty avatar mintty commented on July 18, 2024
Can't save options

from wsltty.

Comments (19)

mintty avatar mintty commented on July 18, 2024

Did you create the symlink inside WSL? That would likely not work because wsltty uses a cygwin runtime environment.

from wsltty.

PhilipDaniels avatar PhilipDaniels commented on July 18, 2024

Nope. I have had for a long time an existing Cygwin installation, here is a screenshot from its home directory:

mintty_in_cygwin

I recently installed WSL (creating a user called Phil) and then wsltty. Here is a screenshot of my WSL home directory:

wsltty

Notice there is no symlink. It is a completely different directory. Yet somehow wsltty seems to be looking in my Cygwin home directory.

from wsltty.

mintty avatar mintty commented on July 18, 2024

WSLtty comes with its own standalone cygwin mini-installation which is different from your own one.
They happen to share the same home directory because you set HOME at Windows level (otherwise you would be getting a different error message, I suppose).
But the wsltty cygwin environment has no /c directory! It seems you either reconfigured your cygdrive prefix or set a symbolic link /c, in either case this is not visible in the wsltty environment.
This does not fully explain, though, why the absolute link target is appended to the link location and /c/Users/pdaniels appears twice in the error message...

from wsltty.

PhilipDaniels avatar PhilipDaniels commented on July 18, 2024

from wsltty.

mintty avatar mintty commented on July 18, 2024

Does it work if you turn this into a relative link?
You could also use a "normal" .minttyrc and include the theme with a ThemeFile option, using a Windows path.

from wsltty.

mintty avatar mintty commented on July 18, 2024

Actually, the error message is correct because in your setup,
'C:\Users\pdaniels\AppData\Local\wsltty' is the root directory of the wsltty standalone cygwin environment,
and
'\c\Users\pdaniels\repos\dotfiles\colors\mintty-themes\SolarizedDark'
is the resolved link which cannot be found in that environment.
Perhaps it would be more useful to report the cygwin path in the error message which would then be
/c/Users/pdaniels/repos/dotfiles/colors/mintty-themes/SolarizedDark
or find some other clever way to be more helpful with such a message;
I could consider the --wsl option to include a hint to the root environment.

from wsltty.

mintty avatar mintty commented on July 18, 2024

Quoting the POSIX path in the error message is not a good idea, especially for wsltty, because it would likely be mistaken for a WSL path (while in fact referring to the wsltty cygwin root).
But mintty can identify and strip off the root prefix.

from wsltty.

PhilipDaniels avatar PhilipDaniels commented on July 18, 2024

from wsltty.

mintty avatar mintty commented on July 18, 2024

Your case is ~/.minttyrc as listed in the mintty manual page. You are right the wsltty project page (README) maps that to %LOCALAPPDATA%\wsltty\home\%USERNAME%\.minttyrc and does not consider the case that you set HOME at Windows level which would redirect both \home\ cases.
The cygwin installations are indeed completey separate, but by setting HOME, you would at least merge the home directory.

from wsltty.

mintty avatar mintty commented on July 18, 2024

Released 0.7.7. Please recheck.

from wsltty.

josteink avatar josteink commented on July 18, 2024

You are right the wsltty project page (README) maps that to %LOCALAPPDATA%\wsltty\home\%USERNAME%\.minttyrc

Would it be an option to have mintty create that folder automatically if it does not exist?

As long as that is the same file which is read upon starting mintty, I suspect that will end up giving most users what they expect.

from wsltty.

mintty avatar mintty commented on July 18, 2024

The ...home... location is now obsolete.
0.7.7 changes that to %APPDATA%\wsltty\config and subfolders of %APPDATA%\wsltty should now be created as needed. Please check and report back if anything does not work.

from wsltty.

josteink avatar josteink commented on July 18, 2024

I just tried downloading and installing 0.7.7 from the releases-tab here today, and this is where I experienced this behaviour.

from wsltty.

mintty avatar mintty commented on July 18, 2024

Which behaviour?
Please describe your symptoms in detail.
Since some things have changed, referring vaguely to previous problems does not really tell me what's going on.

from wsltty.

josteink avatar josteink commented on July 18, 2024

Fair enough. Here's my use case:

  1. Have a clean machine which has never installed wsltty via the Github-releases provided installer (only through third parties)
  2. Download the installer for latest (at time of writing 0.7.7).
  3. Run installer.
  4. Start MinTTY with via %LOCALAPPDATA%\wsltty\bin\mintty.exe \bin\mintty.exe
  5. Go to options menu.
  6. Change somthing.
  7. Click Save

When I do that, saving fails, bebecause MinTTY tries to save settings in a file in a wsltty-subfolder which doesn't exist. For me this subfodler is %LOCALAPPDATA%\wsltty\home\josteink.

from wsltty.

mintty avatar mintty commented on July 18, 2024
  1. Start MinTTY with via %LOCALAPPDATA%\wsltty\bin\mintty.exe \bin\mintty.exe

If you do that directly (command-line / Explorer), the now deprecated directory would indeed by addressed for configuration. The intended way to start wsltty is either via a Shorcut (desktop or Start menu shortcut) or with one of the wsl*.bat scripts generated into %LOCALAPPDATA%\wsltty from a Windows command-line. In these cases, the --configdir option is added to point you to the intended configuration directory which should also have been created (%APPDATA%\wsltty, note no LOCAL here).

from wsltty.

josteink avatar josteink commented on July 18, 2024

OK. Gotcha. That makes sense. Thanks.

from wsltty.

PhilipDaniels avatar PhilipDaniels commented on July 18, 2024

I've just retested and it is working for me. The two installations are now indepdenent (config file was created in %AppData%/Roaming/wsltty/config.

Nice work!

from wsltty.

mintty avatar mintty commented on July 18, 2024

Actually, I forgot to set the --configdir in the context menu entries that can optionally be installed ("add to context menu").

from wsltty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.