All Was Going Well but Then I Updated All

For topics which do not fit in other specific forums.
mist-rich
Posts: 65
Joined: Mon Sep 19, 2022 8:30 am
Has thanked: 102 times
Been thanked: 9 times

All Was Going Well but Then I Updated All

Unread post 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

mist-rich
Posts: 65
Joined: Mon Sep 19, 2022 8:30 am
Has thanked: 102 times
Been thanked: 9 times

Re: All Was Going Well but Then I Updated All

Unread post 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?

Xbytez
Site Admin
Posts: 479
Joined: Wed May 20, 2020 3:36 pm
Has thanked: 227 times
Been thanked: 805 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

Xbytez
Site Admin
Posts: 479
Joined: Wed May 20, 2020 3:36 pm
Has thanked: 227 times
Been thanked: 805 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: All Was Going Well but Then I Updated All

Unread post 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

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: All Was Going Well but Then I Updated All

Unread post by Malor »

Ed is the Standard Text Editor

(ancient Unix joke).

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

User avatar
Count Duckula
Posts: 19
Joined: Tue Sep 14, 2021 1:50 pm
Has thanked: 36 times
Been thanked: 12 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

User avatar
GreyAreaUK
Posts: 133
Joined: Wed Feb 02, 2022 12:58 pm
Has thanked: 62 times
Been thanked: 23 times

Re: All Was Going Well but Then I Updated All

Unread post by GreyAreaUK »

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

Orbiting inside the Roche Limit of sanity.
User avatar
GreyAreaUK
Posts: 133
Joined: Wed Feb 02, 2022 12:58 pm
Has thanked: 62 times
Been thanked: 23 times

Re: All Was Going Well but Then I Updated All

Unread post 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 :)

Orbiting inside the Roche Limit of sanity.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: All Was Going Well but Then I Updated All

Unread post by thorr »

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

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

Shuffle7
Posts: 112
Joined: Sun Jan 17, 2021 5:43 pm
Has thanked: 134 times
Been thanked: 7 times

Re: All Was Going Well but Then I Updated All

Unread post 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?

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: All Was Going Well but Then I Updated All

Unread post 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.

scotter140
Posts: 10
Joined: Sun Jan 02, 2022 6:37 pm
Has thanked: 1 time

Re: All Was Going Well but Then I Updated All

Unread post 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?

Milspex
Posts: 167
Joined: Wed Jun 10, 2020 6:46 pm
Has thanked: 38 times
Been thanked: 35 times

Re: All Was Going Well but Then I Updated All

Unread post by Milspex »

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

Post Reply