Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error During Install #2

Open
seascape opened this issue Oct 21, 2021 · 5 comments
Open

Error During Install #2

seascape opened this issue Oct 21, 2021 · 5 comments

Comments

@seascape
Copy link

Downloaded release file "mistress", renamed it "mistress.sh" so it would appear in MiSTer's scripts list. Ran it, said yes to "RSS service is not installed, install service?"

Error that resulted:

Traceback (most recent call last):
  File "mistress.py", line 104, in <module>
OSError: [Errno 30] Read-only file system: 'etc/inittab'
[1145] Failed to execute script mistress

On each attempt the final number in brackets can vary. 1238 is another one that just came up.

Might something be wrong with my Linux filesystem? Just did an Update All yesterday.

@sigboe
Copy link
Owner

sigboe commented Oct 22, 2021

Sorry I haven't updated this project since the major linux update.
You do not need to rename it to .sh, and you should not. Just put it in the Scripts directory, and then make a file called user-startup.sh in the linux folder and add the following. (if you already have a file there and it contains something just add the last line below to the file)

#!/bin/sh
/media/fat/Scripts/mistress -u

I will be updating mistress to use this file, but you won't really need to update if you do this. The update will just add the ability to add or remove the line from said file above instead of a file which was reset each linux update. I'll close this issue when I make the update

@seascape
Copy link
Author

seascape commented Nov 6, 2021

Thanks for replying.

I followed your instructions here to the letter but could not see Mistress do anything. I simplified my setup (switched from wireless to LAN, removed both alt .ini files and all wallpaper folders, and put a wallpaper.png in the root folder) but in that situation got only transparent checkerboard bg instead of wallpaper. Seemed like Mistress was not functioning.

I will try again for any future updates, which perhaps will handle the multiple random wallpaper folder scenario more comprehensively.

@sigboe
Copy link
Owner

sigboe commented Nov 22, 2021

hello I have updated the script to support the new use-startup script.

I see that I in February added rudamentary support for random wallpapers, but it removes the ability to switch between them using the F1 key. I will document this better in the README soon. Sorry for the delay here, I've been sick.

@sigboe
Copy link
Owner

sigboe commented Dec 2, 2021

@seascape
I haven't updated the readme how to use multiple wallpapers yet, but here are the relevant lines in the code

MiSTress/mistress.py

Lines 30 to 35 in 733052e

# Pick image random png from /media/fat/wallpapers if present, if not pick /media/fat/wallpaper.png
if os.path.isdir('/media/fat/wallpapers'):
wallpapers = [os.path.join('/media/fat/wallpapers', _) for _ in os.listdir('/media/fat/wallpapers') if _.endswith(r".png")]
image = Image.open(random.choice(wallpapers)).convert('RGB')
else:
image = Image.open('/media/fat/wallpaper.png').convert('RGB')

I haven't really tested this out properly except on my computer when I wrote it, but if you make a directory called wallpapers and put your png wallapers in there, it should pick one at random when it updates the rss feed and set it as your single wallpaper. It should be random again at next boot.

To juggle around files to preserve the functionality of being able to switch between the wallpapers by pressing F1 on the keyboard would required more coding. I haven't really made any solid plans to do that, but if someone really wants that functionality then I might be able to set off a few hours to work on it in the next few months or something.

I do intend to update the readme howerver, I started by posting here to write it down in a more informal manner first.

@seascape
Copy link
Author

seascape commented Dec 9, 2021

Hey there. I'll give it a test soon. Appreciate your efforts. Please don't feel the need to apologize for anything.

While you're digging into that stuff, you may want to be sure it supports the MiSTer's wallpapers_alt_1, wallpapers_alt_2, and wallpapers_alt_3 folders as well, used by the three alt profiles.

I doubt the F1 functionality will be in much demand; it merely switches between 7 baked-in background options (one is the animated static) and the single random custom wallpaper the MiSTer has chosen for this boot. F1 doesn't cycle between multiple of your custom wallpapers (be nice if it did, but it doesn't).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants