Page 1 of 1

All Was Going Well but Then I Updated All

Posted: Sun Jan 01, 2023 5:19 pm
by mist-rich

Hi all,

A happy new year to you all.

Everything was going great with my Mister and recently had both crt, hd monitors setup nicely and bluetooth keyboard + mouse running great :)

I did an update.all from the Mister and all seemed to go ok, but now I cannot access my .ini from the menu (it just goes straight back to the menu), nor can I access Wifi from the menu - it freezes as soon as I press any key on this screen. Games running fine though.

Any help greatly appreciated ,

Thank you


Re: All Was Going Well but Then I Updated All

Posted: Tue Jan 03, 2023 4:55 pm
by mist-rich

Sorted. I edited the .ini from desktop and changed some settings and updated the wifi script and all is ok again :)

One question for future - is notepad good enough for .ini editing?


Re: All Was Going Well but Then I Updated All

Posted: Tue Jan 03, 2023 5:36 pm
by Xbytez
mist-rich wrote: Tue Jan 03, 2023 4:55 pm

One question for future - is notepad good enough for .ini editing?

Yes, it is fine.


Re: All Was Going Well but Then I Updated All

Posted: Tue Jan 03, 2023 6:07 pm
by jca
Xbytez wrote: Tue Jan 03, 2023 5:36 pm
mist-rich wrote: Tue Jan 03, 2023 4:55 pm

One question for future - is notepad good enough for .ini editing?

Yes, it is fine.

Are you sure?
I would recommend using Notepad++ for MISTer.


Re: All Was Going Well but Then I Updated All

Posted: Tue Jan 03, 2023 8:21 pm
by Xbytez
jca wrote: Tue Jan 03, 2023 6:07 pm

Are you sure?
I would recommend using Notepad++ for MISTer.

Yes I am, as they are text based files NotePad although basic is sufficient for quick editing .ini files on a Windows PC.

Notepad++ is also an excellent recommendation as a third party alternative if you wish to download and install additional software, it's certainly better than Window's built in NotePad.


Re: All Was Going Well but Then I Updated All

Posted: Tue Jan 03, 2023 10:09 pm
by jca

Did you forget EOL (End Of Line character(s)):
Windows CR LF
Unix LF
Mac CR
Linux does not like CR LF
Notepad++ preserves EOL when you open a file and can also convert from one format to the other.


Re: All Was Going Well but Then I Updated All

Posted: Tue Jan 03, 2023 10:15 pm
by Malor
mist-rich wrote: Tue Jan 03, 2023 4:55 pm

Sorted. I edited the .ini from desktop and changed some settings and updated the wifi script and all is ok again :)

One question for future - is notepad good enough for .ini editing?

I believe it's fine as long as long as the file was created under Unix to begin with. If you create a new file from Notepad, it will have incorrect end-of-line encoding. Unix uses only linefeed at the end of a text line, and Windows uses carriage return/linefeed. This can really confuse any Unix program that's not specifically written to understand this. (most of them.) Notepad recognizes and will preserve the encoding if you load an existing Unix text file, but has no way to specify Unix encoding when saving a new one.

There's a "dos2unix" utility at the Mister command line that can convert files. Otherwise, the Notepad++ program is a pretty good choice for both creating new files and editing existing ones. I think there's a dropdown menu option for Unix format.

I use Windows vim, but that's a spectacularly difficult editor if you've never learned it, and a terrible recommendation for noobs.

edit to add: The Mister command line has the "nano" program available, which is probably the easiest terminal-mode editor you can find. If you don't mind a little bit of CLI usage, it's right there, you don't have to download anything. Example: you'd hit F9, log in, type "cd /media/fat", and then "nano MiSTer.ini". The command characters are all listed at the bottom, for things like searching or saving the file.

You can also use that program over SSH, which gives you visual cut and paste ability with most SSH clients. (Nano has no idea you're doing it, that's all the client.)

IMO, nano is a lot easier than yanking the card, loading it on Windows, editing, yanking it again, and remounting it. But your MiSTer has to be running well enough to either let you see the main menu so you can hit F9, or be alive enough to start SSH, even if the display is borked.


Re: All Was Going Well but Then I Updated All

Posted: Tue Jan 03, 2023 10:28 pm
by jca
Malor wrote: Tue Jan 03, 2023 10:15 pm

...
I use Windows vim, but that's a spectacularly difficult editor if you've never learned it, and a terrible recommendation for noobs.
...

vi is better :D


Re: All Was Going Well but Then I Updated All

Posted: Tue Jan 03, 2023 10:35 pm
by Malor

Ed is the Standard Text Editor

(ancient Unix joke).


Re: All Was Going Well but Then I Updated All

Posted: Wed Jan 04, 2023 2:26 am
by jca
Xbytez wrote: Tue Jan 03, 2023 8:21 pm

...
Yes I am, as they are text based files NotePad although basic is sufficient for quick editing .ini files on a Windows PC.
...

I was intrigued so I checked:
ini files have Windows type EOL so they are indeed safe to edit with notepad.
mra files also.
I still would recommend using Notepad++ for MISTer as using Notepad is likely to come and bite you when you do not expect it.


Re: All Was Going Well but Then I Updated All

Posted: Wed Jan 04, 2023 6:36 am
by Count Duckula

Notepad got support for unix/mac EOL a few years back (https://devblogs.microsoft.com/commandl ... n-notepad/), ++ is still nicer for its syntax highlighting etc though.


Re: All Was Going Well but Then I Updated All

Posted: Wed Jan 04, 2023 10:20 am
by Malor

I think that's only for existing files. If you have the status bar enabled, in the lower right corner, just left of "UTF-8" (the default encoding), it will say either "Windows(CRLF)" or "Unix(LF)".

For a new file, it will be "Windows(CRLF)", and I haven't found any way to change it. As far as I can tell, you can only get "Unix(LF)" mode by opening an existing file.

That seems pretty dumb, so maybe it's me that's being the idiot, but I think that's how it works.


Re: All Was Going Well but Then I Updated All

Posted: Wed Jan 04, 2023 11:21 am
by GreyAreaUK

Notepad is fine.
Notepad++ is finer.
Do not use Wordpad.


Re: All Was Going Well but Then I Updated All

Posted: Wed Jan 04, 2023 11:25 am
by GreyAreaUK
Malor wrote: Wed Jan 04, 2023 10:20 am

I think that's only for existing files. If you have the status bar enabled, in the lower right corner, just left of "UTF-8" (the default encoding), it will say either "Windows(CRLF)" or "Unix(LF)".

For a new file, it will be "Windows(CRLF)", and I haven't found any way to change it. As far as I can tell, you can only get "Unix(LF)" mode by opening an existing file.

That seems pretty dumb, so maybe it's me that's being the idiot, but I think that's how it works.

No, I think that's correct. It supports opening and displaying unix/linux and Mac line-endings (and will maintain them through a save) but it will only create files with CRLF. Which seems a bit bonkers but that's Microsoft for you :)


Re: All Was Going Well but Then I Updated All

Posted: Wed Jan 04, 2023 6:59 pm
by Malor

I recommend using a native Unix editor, like nano. If you use SSH, you'll get any cut and paste facilities your client offers, as well, which is nice.

Windows 10 and 11 both have a built-in command-line SSH client. If you use the (downloaded) Windows Terminal, from either Github or the Store, you can get very nice cut and paste facilities as well. I used to use ConEmu, but Windows Terminal has totally replaced that for me, although I don't usually run SSH that way. (The Windows terminal emulator has some bugs with scrollback, which shouldn't matter on the Mister, but which are annoying when doing updates on Debian machines.)

It's payware, but what I mostly use for SSH on Windows is MobaXTerm. It has a nice built-in X server you can run, so running remote X programs is pretty easy. This isn't useful on the Mister, but it's handy when dealing with normal Linux machines. It handles almost every remote protocol Unix does, like RDP, FTP, SFTP, Telnet, VNC, RSH, and so forth. It even supports running Windows Subsystem for Linux apps in its own windows.

PuTTY is another good SSH GUI client that's been around for ages, and it's free. I think it may also handle SFTP, but I haven't used it in many years, so that could be a false memory.


Re: All Was Going Well but Then I Updated All

Posted: Wed Jan 04, 2023 7:41 pm
by thorr

I use Notepad all the time and never have any problems. I also use vi. No issues.


Re: All Was Going Well but Then I Updated All

Posted: Thu Jan 05, 2023 11:21 pm
by Malor

Notepad is fine as long as you only edit existing files. If you need to create a new file, you'll probably want something else.

Notepad is also rather painful to use to edit Mister files, because you have to transfer the microSD over. Terminal-mode nano is just about as easy to use, and runs without needing to move the card.


Re: All Was Going Well but Then I Updated All

Posted: Fri Jan 06, 2023 12:32 am
by jca

I never remove the SD card from MISTer: destroying a SD card is no big deal, destroying the SD card socket on MISTer is something else.
Putty and WinSCP are always connected to my MISTer.
I can use vi via Putty to edit files but do so rarely. I prefer to use Notepad++: in WinSCP you can right click on a file and edit it. WinSCP has a built in editor which I used only a few times but you can add an external editor to WinSCP and I added Notepad++ which allows me to edit files with Notepad++ from within WinSCP. No need to remove the SD card, if someone does not know Linux CLI or doesn't want to bother to use it no problem.


Re: All Was Going Well but Then I Updated All

Posted: Fri Jan 06, 2023 2:27 am
by Malor

Huh, that's a pretty clever way to solve the problem. MobaXTerm can likely do the same thing, although I haven't actually tried. If you want a GUI editor, that seems like a good way to do it.

I'd encourage even the CLI-averse, however, to check out the nano editor. It's very, very easy, even though it's in text mode.

If you really want a GUI, jca's method should work nicely.


Re: All Was Going Well but Then I Updated All

Posted: Sun Jan 29, 2023 9:32 pm
by Shuffle7

my wifi wont connect now - as ive changed the password of the router. i get the unable to connect message once i enter the new password in, any ideas?


Re: All Was Going Well but Then I Updated All

Posted: Sun Jan 29, 2023 11:24 pm
by Malor

If you're sure you got the password right, try adding a "country=US" argument into the network clause of /etc/wpa_supplicant.conf. I think the password will also be in that file, so triple-check that it's correct. If you're not in the US, substitute your country code.

I don't think you can access that file under Windows, I think you have to edit it from either the console command line (F9 at the main menu) or from an SSH command line. It's in the Linux loopback filesystem, so accessing it from Windows would be pretty difficult.

(It's possible that the wifi script might allow you to specify the country code, but I don't think it does, and it's bitten some other users.)

If you have no idea how to do that, post back, and someone should be able to give you more specific instructions.


Re: All Was Going Well but Then I Updated All

Posted: Thu Mar 02, 2023 9:39 pm
by scotter140
mist-rich wrote: Tue Jan 03, 2023 4:55 pm

Sorted. I edited the .ini from desktop and changed some settings and updated the wifi script and all is ok again :)

One question for future - is notepad good enough for .ini editing?

Hello,

This just happened to me. Do you remember what settings you changed?


Re: All Was Going Well but Then I Updated All

Posted: Fri Mar 03, 2023 10:59 am
by Milspex

get textmate or notepad++ for that real plain text ini action