How can I Import settings from a MobaXterm.ini file to MobaXterm? - mobaxterm

I've installed MobaXterm in my computer, but I can´t find a way to import the settings from the mobaXterm.ini.
I've alreay read the documentation (I've tried, at least, with my bad english) but I couldn´t find the solution.

I had the same problem after trying to import a MobaXterm.ini from a computer running v12.4 to another computer running v22.3.
What worked for me on new computer was:
Close/Quit MobaXterm
Copy MobaXterm.ini to C:\Users<accountname>\AppData\Roaming\MobaXterm\
Restart MobaXterm
After that, it will start up using your MobaXterm.ini and continue updating it each time you quit MobaXterm.
Once you get this working, you should export your sessions to a file called "MobaXterm Sessions.mxtsessions" by right clicking on "User Sessions" and selecting "Export all sessions to file".
There is also a way to export the entire configuration to a ".mobaconf" file by clicking "Settings/Export configuration".
You can use the exported files as backups and re-import them later if needed.

Related

Visual Studio Code terminal displaying "sh-3.2$" every time I "Open in Integrated Terminal" instead of the working directory name (Mac OS)

Earlier today I was having an issue where when I would go to open a new terminal or open a file or folder in Integrated Terminal the terminal would be automatically killed within a couple of seconds without me manually killing it. I was confused as to why this was happening because as far as I could tell I hadn't changed my settings.json file in VS Code or User or Workspace settings and everything was running smoothly just minutes earlier. I was able to resolve that issue but I created a new minor inconvenience. Now whenever I open a file or folder in Integrated terminal it displays "sh-3.2$" instead of the current directory I'm in. If I type pwd and press enter it'll of course display the current directory I'm in but I don't want to have to type that a million times moving forward. If somebody could help me fix this issue I'd greatly appreciate it! I read some of the documentation online but I'm a new bootcamp student and I tried following along but it was going over my head. Thanks again!
I was reading a similar Stack Overflow question and they were saying to try and setup/configure my bash shell to have a prompt with path, specifically the PS1 environment variable, but I was confused on how to actually go about doing that.

Renaming files doesn't take effect in VScode while using WSL2

I have a very annoying problem in my VScode setup.
I'm using WSL as a terminal to work on my projects and occasionally, mistype the name of one of the folder or file that I'm working with.
For example:
I accidentally created the Mainheader.js file in layout folder (without the capitalized L) therefore, I decided to rename the folder with a capital L.
Now on my React app, any changes made to MainHeader.js file will not be reflected. I did update the related import.
So I decided to delete the entire folder and recreate it with MainHeader.js but this is what I end up with.
The file is there in my folder but when I click on it, I get
"Unable to open Mainheader.js - File not found"
So I try to create it then I get this error:
Unable to create file 'wsl\path]to\MainHeader.js' that already exists when overwrite flag is not set
Has anyone run into this type of behavior in WSL before? It's quite annoying because the only workaround I've found so far is to create a completely different folder with a different name...
Any help would be appreciated. I can't really work like this.
I've been having the same problem for the past 2 days. I presume its a permissions issue, but unfortunately I don't know how to permanently fix it.
I did find this work-around though:
Open a new VS Code window. (I'd recommend closing any VS Code window that had
your project directory open.)
Create a duplicate or copy the contents of the problem file so you don't lose
your code.
Delete the problem file.
Now create the file again using VS Code. Go to File > New Text File. Next paste
in your code.
Now save your new file. Go to File > Save As and save your new file with at the same path + filename + extension that was giving you problems previously. VS Code should allow you to save the new file without any issue.
Now you can open this new VS Code window to your project directory and you should be able to continuing accessing the file that was a problem before.
Basically we just deleted the problem file and then created it again from scratch in a new VS Code window.
Hope this work-around works for you!
EDIT 09/20/2022
Following Baza86's answer here solved the issue for me. Seems like it was a permissions issue of sorts, but if you use the Remote-WSL extension VS code can directly access the linux filesystem.
How to run VScode in sudo mode in WSL2?
You may need add the case option to you options in the wsl config. The default is set to off, however you can set this to off, dir or force.
Open your wsl.conf using sudo with any text editor while running window subsystem Linux. The config file resides in /etc/wsl.conf. This file is used to configure settings per-distribution for Linux distros running on WSL 1 or WSL 2.
My default config looked like this yours may be different:
[automount]
options = "metadata"
add
[automount]
options = "metadata,case=dir"
Here is the official Microsoft docs for Advanced settings configuration in WSL - https://learn.microsoft.com/en-us/windows/wsl/wsl-config

Why am I getting the error: An error occurred while trying to create a file in the destination directory

I don't know why I am getting this error suddenly whilst using vs code. Please help me, Thanks in advance.
P.S(I don't think files can be created in an exe right? I'm not sure after seeing this. Maybe do I have to specify where the file should be created and if yes, please tell me how. Else I'm looking for another answer)
(Edit): I tried downloading the system installation instead of the user installation. The system installer installs for all users on the system and needs administrator privileges unlike the user installer which install vs code only the particular user installing it.
Thanks, Codestrip
error
my solution for this was to set it to always start as administrator, I don't feel like reinstalling vscode (newly installed)
It's not a great solution for those who have multiple users, but I got rid of the error.
Ah, I saw that was a problem within User Permission, there were only 2 options checked. https://prnt.sc/uV-bF_q52Y3Y
I hope my solution will help you.
If you run your "vscode" as admin then you won't see this error
anymore.
Go to your "vscode" install location
If not sure then open the start menu.
Write vscode.
Right click on the icon and click "Open File Location".
In a new window there will be again an icon for the "vscode" right click on the icon
Again and click "open file location".
In another window, there will be an actual vscode's "exe" file.
Right-click on this file and go to the "send" > "send on desktop" option.
On the Desktop right-click on the icon and go to the properties
Click on Advance Option and Check the "Run as Admin" Option
Click Apply and Ok.
Now if you want Right Click on this icon again and select "pin to taskbar".
Hopefully, you won't see this error again.
I also encountered this error.
I tried remove the folder Microsoft VS Code inside C:\Users\<your username>\AppData\Local\Programs, and problem seems resloved
I had the same issue. But I fixed it. just go to this link and add take ownership to your context menu.
https://www.tenforums.com/tutorials/3841-add-take-ownership-context-menu-windows-10-a.html
After adding take ownership just go to vs code main directory and right-click on the Microsoft VS Code folder then press take ownership. After that your problem will be solved.

How come I can't open my .html with Live Server in VSCode?

I installed Live Server in VSCode for the first time and am trying to open an .html file with Live Server. I'm following the simple instructions provided here on the official installation page, but to no avail.
I right-click my file in the Explorer as instructed, but "Open With Live Server" doesn't show. I've even tried right-clicking the tab and that doesn't work either. I've quit and re-started VSCode and that didn't work. I set Chrome as my default browser in settings.json and that didn't work. I double checked to make sure Live Server is installed and enabled globally and it is. Please help me figure out what's going on! Thank you!
Oh! I figured it out. I had to open my file by selecting "Open Folder" and then open my folder from there. Then I was able to select my file under the Explorer tab and right-click to open with Live Server. I'm not sure why it worked that way.
It's happened to me few times. My problem was the folder and files names.
Check those names and don't use spaces or weird characters.

What settings do I have to change to make Visual Studio Code automatically run files in the right directory?

Coming from IDLE, I am used to be able to just left-click python files anywhere, it'll launch IDLE, and then pressing F5 just runs the script. In VSCode however, I have to open the terminal, cd into the right directory, and only then can I finally run my python script. Is there a way to change this behavior?
I was recommended to use the Code Runner extention and bound the Run Code (code-runner.run) command to my F5 key.
Then I noticed input() not being ran so I had to make sure code-runner.runInTerminal was on, but that re-started my problem from the beginning because the terminal was at the wrong working directory and then I finally found the code-runner.fileDirectoryAsCwd setting to run it from there.
I think this solution is similar to this one for the python extention, but I'm not sure if that would cause the whole wrong working directory issue again.
choose from menu file then click on auto save