liquidx / webviewscreensaver

Mac OS X Screen Saver powered by a Web View
Apache License 2.0
1.17k stars 138 forks source link

Catalina #56

Closed mayaahh closed 4 years ago

mayaahh commented 5 years ago

Hi

Even if you wont work on this project in the future, is it possible to compile it in 64 bits, to make it work in Mac OS Catalina ?

Thanks !

nothingrealhappen commented 5 years ago

Does anyone know how to fix this? is this issue can be fixed by small changes or need to rebuild from scratch?

Thanks!!!

JamesBedwell commented 5 years ago

I'm interested in this too! Just updated to Catalina and it's not working. :(

xvilo commented 5 years ago

Same here, I can take a look if I can recompile it all and see if that does the trick :)

elalemanyo commented 5 years ago

@xvilo I try to set 64 bits on Xcode and compile looks ok, some warnings but nothing really important. The problem is that you need a dev account from apple to build it. If you have one would be great if you can do it for us. Thanks!

xvilo commented 5 years ago

Yes, I have a personal one, not paid anymore. Probably not able to use the one of my work tho ;)

WIP MR: https://github.com/liquidx/webviewscreensaver/pull/57

jonassmets commented 4 years ago

Any news on this? I updated all my iMacs to Catalina without thinking about this, but I run a website as a screensaver in my shops. I really hope someone can fix this or if someone knows an alternative I’m happy to try that one.

xvilo commented 4 years ago

I didn't have any time to take another look at it

agologan commented 4 years ago

Have had these changes locally for more than a year. Let me know if they work for you: https://github.com/agologan/webviewscreensaver/releases/tag/v2.1 Note: my fork includes some other changes proposed in this project.

LEMONed commented 4 years ago

Have had these changes locally for more than a year. Let me know if they work for you: https://github.com/agologan/webviewscreensaver/releases/tag/v2.1 Note: my fork includes some other changes proposed in this project.

It works. It's just I'm still seeing the 'white flash' (it's now more like brown) when the screensaver is being initialized.

elalemanyo commented 4 years ago

@agologan Thanks for fixing the issue. It works but I have the same issue as @LEMONed.

mayaahh commented 4 years ago

Thanks ! Same here : I works with a white flash at start.

agologan commented 4 years ago

Did not notice it with Dark Mode set. Here's a quick fix: https://github.com/agologan/webviewscreensaver/releases/tag/v2.1.1

abduwaly commented 4 years ago

This one works smoothly on Catalina 👇 https://github.com/agologan/webviewscreensaver/releases/tag/v2.1.1

svanstrom commented 4 years ago

Adding my voice to wanting this option back to my MBP. :)

I usually just lock my screen, but in public spaces it's a nice attention grabber to have it loop through my current projects instead.

As much as I appreciate other developers doing their thing to get this working, there's just this long-term stability (and trustworthiness) of keeping things going in the main branch. So hoping that @liquidx will feel encouraged to do their own update, or bring in other developers. Add oil!! 🙏

varenc commented 4 years ago

@agologan any objections to me attempting to update the homebrew cask for WebViewScreenSaver to point to your release instead of the liquidx one? The Catalina support is key and this one seems to be inactive.

(this is it: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/webviewscreensaver.rb )

varenc commented 4 years ago

pull request to update homebrew cask to point to your release here: https://github.com/Homebrew/homebrew-cask/pull/74828

thanks for doing this!

svanstrom commented 4 years ago

@agologan any objections to me attempting to update the homebrew cask for WebViewScreenSaver to point to your release instead of the liquidx one? The Catalina support is key and this one seems to be inactive.

(this is it: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/webviewscreensaver.rb )

Is that ideal when using it as it stands you get this problem: '“WebViewScreenSaver 2.saver” cannot be opened because the developer cannot be verified.'?

(I haven't used homebrew since the early days though, so don't know if this actually is a problem.)

vitorgalvao commented 4 years ago

Is that ideal when using it as it stands you get this problem: '“WebViewScreenSaver 2.saver” cannot be opened because the developer cannot be verified.'?

(I haven't used homebrew since the early days though, so don't know if this actually is a problem.)

Yes, it would be a problem because Homebrew Cask downloads are quarantined. That said, you can solve it the same as if you downloaded it manually (right-click → Open).

Either way, we don’t accept cask changes to any random fork as that’s surprising to users, might pose a security risk, and the fork may not be what they want. We do make the change if the author of the original project officially recommends the fork (ideally by linking to it in the README), which is something only @liquidx can do.

We also have rules for adding forks as separate casks (with the name prefixed by the vendor, agologan-webviewscreensaver in this case) but they still have to pass the notability thresholds (over 50 stars, at the time of this post, so if you want that fork added to Homebrew Cask you can let us know that way).

varenc commented 4 years ago

In the meantime, Vitor accepted my PR which marks this incompatible with Catalina. I was initially tried using homebrew to install this so I wanted to get it fixed. @liquidx sounds like if you accept the recent Catalina PR (or add contributors to do so) it'll be easy to update the cask.

(and sorry to derail this issue into a homebrew casks digression... It's unrelated to the general request of getting Catalina support this issue is really about)

JamesBedwell commented 4 years ago

Related to Catalina, I am having issues running files from my local machine.

This happened immediately after upgrading to Catalina and then installing version 2.1.1 as per above.

Any suggestions?

Edit: For clarity, the specific issue I have is that when I point to a local file (full pathname or otherwise) it simply displays a black screen. If I use google.com, it successfully displays the externally hosted content.

agologan commented 4 years ago

Edit: For clarity, the specific issue I have is that when I point to a local file (full pathname or otherwise) it simply displays a black screen. If I use google.com, it successfully displays the externally hosted content.

My fork has a bit more changes than what you're used to. In version 2.1 I did a change to fix local path to usual browse-style scheme: https://github.com/agologan/webviewscreensaver/releases/tag/v2.1

Use file:// scheme to load local files e.g. file:///Users/admin/index.html

JamesBedwell commented 4 years ago

Is this not included in 2.1.1? Should I downgrade? I already tried file:// and it didn’t work.

I have spaces in the path name to the local file. How should I handle that?

On 13 Jan 2020, at 11:39 pm, Alexandru Gologan notifications@github.com wrote:

 Edit: For clarity, the specific issue I have is that when I point to a local file (full pathname or otherwise) it simply displays a black screen. If I use google.com, it successfully displays the externally hosted content.

My fork has a bit more changes than what you're used to. In version 2.1 I did a change to fix local path to usual browse-style scheme: https://github.com/agologan/webviewscreensaver/releases/tag/v2.1

Use file:// scheme to load local files e.g. file:///Users/admin/index.html

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

svanstrom commented 4 years ago

I already tried file:// and it didn’t work. I have spaces in the path name to the local file. How should I handle that?

Change the spaces to %20; those three characters are the encoded version of a simple space.

One way to quickly url encode something is usually to try to open it in a webbrowser; depending a bit on what type of data it is, and the browser, you end up with an url that you can copy-paste already properly encoded.

JamesBedwell commented 4 years ago

I must be really unlucky, because I already thought to do that and it was still unsuccessful. I’m really not sure what I’m doing wrong.

I’ve literally tried every way I can think of, including typing %20 and also including copying from the URL bar in safari (when the HTML file was successfully displaying).

I’ve tried removing it and reinstalling it, and having it system wide vs only for my user. I tried giving it access to my files in Privacy prefs but apparently that isn’t possible for screensavers.

Do you have any other ideas?

On 14 Jan 2020, at 8:08 pm, Tony Svanström notifications@github.com wrote:

 I already tried file:// and it didn’t work. I have spaces in the path name to the local file. How should I handle that?

Change the spaces to %20; those three characters are the encoded version of a simple space.

One way to quickly url encode something is usually to try to open it in a webbrowser; depending a bit on what type of data it is, and the browser, you end up with an url that you can copy-paste already properly encoded.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

svanstrom commented 4 years ago

I must be really unlucky, because I already thought to do that and it was still unsuccessful. I’m really not sure what I’m doing wrong. I’ve literally tried every way I can think of, including typing %20 and also including copying from the URL bar in safari (when the HTML file was successfully displaying). I’ve tried removing it and reinstalling it, and having it system wide vs only for my user. I tried giving it access to my files in Privacy prefs but apparently that isn’t possible for screensavers. Do you have any other ideas?

No ideas without actually taking the time to read the code; but, I'm thinking @agologan should be able to figure this out quicker than me?

JamesBedwell commented 4 years ago

Please could you try using a local HTML file and seeing if it works for you? Then we know whether it’s the software or just my Mac that’s playing up.

On 15 Jan 2020, at 12:14 pm, Tony Svanström notifications@github.com wrote:

 I must be really unlucky, because I already thought to do that and it was still unsuccessful. I’m really not sure what I’m doing wrong. I’ve literally tried every way I can think of, including typing %20 and also including copying from the URL bar in safari (when the HTML file was successfully displaying). I’ve tried removing it and reinstalling it, and having it system wide vs only for my user. I tried giving it access to my files in Privacy prefs but apparently that isn’t possible for screensavers. Do you have any other ideas?

No ideas without actually taking the time to read the code; but, I'm thinking @agologan should be able to figure this out quicker than me?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

agologan commented 4 years ago

@JamesBedwell tested locally with percent encoding in the URIs and it works. But since it's been nagging me also, I published an improvement so you can use local paths without prefixes, with spaces and to the home directory. e.g. ~/My Screensaver/index.html https://github.com/agologan/webviewscreensaver/releases/tag/v2.1.2

JamesBedwell commented 4 years ago

My god, you’re a legend. I’ll try this tomorrow and i’ll let you know if it solved my problem as well. Thanks.

On 15 Jan 2020, at 8:08 pm, Alexandru Gologan notifications@github.com wrote:

 @JamesBedwell tested locally with percent encoding in the URIs and it works. But since it's been nagging me also, I published an improvement so you can use local paths without prefixes, with spaces and to the home directory. e.g. ~/My Screensaver/index.html https://github.com/agologan/webviewscreensaver/releases/tag/v2.1.2

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

JamesBedwell commented 4 years ago

@agologan this is driving me insane!

I tried your version on two separate macs, both running Catalina, and both of them are still displaying a black screen when I try to show a local file. Showing google.com works absolutely fine. I really don't know what I'm doing wrong. I've even created a "Hello world" html file just to check that it wasn't my original html file that was the problem.

Any help is seriously appreciated!

agologan commented 4 years ago

@JamesBedwell just describe the scenario that doesn't work and I'll look into it but please include:

ahmedabuhamid commented 4 years ago

this is amazing, it will be cool also if we can hardcode/ customise the URL before distributing the package to many users.

agologan commented 4 years ago

@ahmedabuhamid might be a feature worth supporting. Have already gone through existing feature requests and have some other ideas to improve the product. As others have pointed out we're just waiting on the author (@liquidx) to decide how he plans to proceed. My intention is not to maintain my own fork as I'm doing today. Would prefer to either integrate the changes assuming the author wants to continue or rebuild it completely with an improved feature set.

svanstrom commented 4 years ago

As others have pointed out we're just waiting on the author (@liquidx) to decide how he plans to proceed. My intention is not to maintain my own fork as I'm doing today. Would prefer to either integrate the changes assuming the author wants to continue or rebuild it completely with an improved feature set.

Sadly @liquidx is active on github, without even paying any attention to the comments here; so at this point we might as well assume that he plans on just ignoring this project.

JamesBedwell commented 4 years ago

@agologan this is driving me insane!

I tried your version on two separate macs, both running Catalina, and both of them are still displaying a black screen when I try to show a local file. Showing google.com works absolutely fine. I really don't know what I'm doing wrong. I've even created a "Hello world" html file just to check that it wasn't my original html file that was the problem.

Any help is seriously appreciated!

@agologan hi mate, just picking this one up again. I just set up a brand new Mac mini 2018 running Catalina 10.15.3 and I'm still experiencing the same issue as described above when using local html files. Once again, remote pages such as http://google.com and http://github.com load absolutely fine.

@JamesBedwell just describe the scenario that doesn't work and I'll look into it but please include:

  • path on disk
  • URI in screensaver settings
  • target html content Also please notice that ~ (reference to home directory in path) doesn't actually work - I was wrong and you need to provide full path to the file you're trying to load.

Path on disk: /Users/James/Desktop/Screensaver/screensaver.html URI in screensaver settings: file:///Users/James/Desktop/Screensaver/screensaver.html Target HTML content: For simplicity I tested against a basic "hello world" html template saved from here and I still couldn't see anything.

I would really appreciate any extra troubleshooting steps that you could suggest.

agologan commented 4 years ago

Hey @JamesBedwell ran your test and identified a couple of issues with your setup.

To fix just create a folder let's say in your home directory and point to that. /Users/James/screensaver/index.html should work just fine. Note: if your screensaver is loading external files make sure the file you're pointing to is in the root of the file tree you're planning to load.

JamesBedwell commented 4 years ago

Hey @JamesBedwell ran your test and identified a couple of issues with your setup.

  • The hello world examples has no background set so it will just render black on black. Recommend you add something like <style>body{background-color:red;}</style> in the header to see if it works.
  • Assuming you're on Catalina the new file permissions model is restricting access to desktop. Normally you'd get a prompt to grant access but it seems somebody at Apple forgot screensavers can be valid "apps".

To fix just create a folder let's say in your home directory and point to that. /Users/James/screensaver/index.html should work just fine. Note: if your screensaver is loading external files make sure the file you're pointing to is in the root of the file tree you're planning to load.

@agologan Thanks so much for the super quick reply! Moving outside of the documents folder solved the issue. Do you know how I might grant the screensaver permissions to access documents folder? Could I add a specific file to the "Full Disk Access" menu under System Preferences > Security & Privacy? Which file might that be?

Ideally I would like to keep my files in the Documents folder.

agologan commented 4 years ago

The screensaver is installed in ls ~/Library/Screen\ Savers but I couldn't manually add Full Disk Access. I didn't bother looking into the issue because /Users/James is your user's home directory so it's not like it requires special permissions or leaking data to other users on your computer.

Will make a note and maybe look into the issue when I get some time.

JamesBedwell commented 4 years ago

The screensaver is installed in ls ~/Library/Screen\ Savers but I couldn't manually add Full Disk Access. I didn't bother looking into the issue because /Users/James is your user's home directory so it's not like it requires special permissions or leaking data to other users on your computer.

Will make a note and maybe look into the issue when I get some time.

Yep, that makes sense. I noticed another peculiar issue, which is that I cannot embed PDFs any more, using the exact same HTML code as I did in Mojave. I have tried <embed> as well as <object> and neither of them display. Might be worth a look.

I can use PNG as an alternative, but it introduces extra steps in my workflow (I.e. exporting my PDF to PNG and then displaying the PNG instead of the PDF).

agologan commented 4 years ago

Tried 3 different methods to add a PDF and it worked nicely. Dropped a sample.pdf in the same folder as the html file and than one of the following 3 methods:

<embed src="sample.pdf" type="application/pdf" />
<object data="sample.pdf" type="application/pdf">
<iframe id="frame" src="sample.pdf" style="height:1000px; width:100%;"></iframe>
JamesBedwell commented 4 years ago

Tried 3 different methods to add a PDF and it worked nicely. Dropped a sample.pdf in the same folder as the html file and than one of the following 3 methods:

<embed src="sample.pdf" type="application/pdf" />
<object data="sample.pdf" type="application/pdf">
<iframe id="frame" src="sample.pdf" style="height:1000px; width:100%;"></iframe>

Thanks @agologan. I'm really not sure what was going wrong, but I've just tried this again and it's working now. Perhaps I didn't correctly declare the type? I don't recall this being needed before.

I appreciate your patience, and I'm so glad it's working now :) have a great day!

ahmedabuhamid commented 4 years ago

@ahmedabuhamid might be a feature worth supporting. Have already gone through existing feature requests and have some other ideas to improve the product. As others have pointed out we're just waiting on the author (@liquidx) to decide how he plans to proceed. My intention is not to maintain my own fork as I'm doing today. Would prefer to either integrate the changes assuming the author wants to continue or rebuild it completely with an improved feature set.

Hi @agologan , hope you're doing well, appreciate if you can look into that request it will be very helpful. I'm managing 150 MACs and this will be great feature to add. stay safe.

liquidx commented 4 years ago

Hi all, sorry I've not been responding, I didn't actually realize there had been a long conversation on this issue until someone mentioned my handle and I got an email.

Work keeps me very busy at the moment so I really don't have time to update the screensaver. I'm super thankful someone else has forked it and improved on this.

What could I do to help with those who have forked? Would you all be interested if I merged PRs or you would like to be the official maintainers of this?

agologan commented 4 years ago

@liquidx The question is more about how you want to approach this going forward and how much you want to get involved. I might own the only fork that provides a working binary at this point, and I still couldn't answer that question for you.

What's important is that there's still users interested in the idea, who'd like an easily-accessible working binary.

mayaahh commented 4 years ago

That said, you can solve it the same as if you downloaded it manually ([right-click → Open]

Hi,

Is it normal that I have to do this after each reboot?

Thanks

Roza2011 commented 4 years ago

After running Webviewscreensaver on my Mac OS 10.12.6 without a problem for a long time I am now having an issue. The Nightscout page can not be loaded when selected as screensaver. It shows the Nightscout loading page with message "connecting to server" and it freezes there.Previously that was not the case. I have tried uninstalling the app and clearing the cache from Safari and Chrome. I have also searched ~/Library/Caches and delated all found related files however I am still missing something since after reinstalling, the app picks up the Nightscout page address on its own. This mean I did not successfully cleared all of the cache. Any help how to clear the cache?

agologan commented 4 years ago

@ahmedabuhamid Sorry for getting back to you so late. The current implementation uses the defaults system. This can be accessed via defaults -currentHost read WebViewScreensaver or via the file /usr/libexec/PlistBuddy -c 'Print' ~/Library/Preferences/ByHost/WebViewScreenSaver.* If you want to provision multiple workstations you could use defaults to write the config or configure it manually on one workstation and move the plist file directly renaming suffix (this is the workstation UUID system_profiler SPHardwareDataType | awk '/UUID/ { print $3; }')

@mayaahh Sorry for being late, but no you don't need to do this on each reboot, unless you're reinstalling the .saver over and over again. Here are two ways to bypass the security challenge: • Via the Security Panel: open the file and on first prompt choose Cancel, then go to Security & Privacy and select Open Anyway making sure it's actually prompting you about this file, lastly open the screensaver via Preview or inactivity and this prompt includes an Open button which solves the issue (at least until next version install)

xattr -d com.apple.quarantine WebViewScreenSaver.saver after unzipping it. If you already installed it the file is in ~/Library/Screen\ Savers/ (if installed for current user) or /Library/Screen\ Savers/ (if installed for all users)

@Roza2011 For you I have a new update: https://github.com/agologan/webviewscreensaver/releases/tag/v2.1.3 which adds a clear cache button in the options. This option will not clear your config. That is saved via the defaults system described above and is persistent across updates.

New update also includes 2 other changes that you can read about in the release notes.

agologan commented 4 years ago

We have officially released https://github.com/liquidx/webviewscreensaver/releases/tag/v2.1 which includes Catalina fixes and all other improvements that are part of my fork. Marking this issue as resolved.