Chrome app file system in kiosk mode - google-chrome-os

i have an app (signage player) that loads video and placed it in folder which user pointed on the beginning (named 'media').
Then i define source attr of video element as "media/name_of_file.mp4"
In plain mode is works well - local video plays. But i and don't know why. In Kiosk mode app can't find a files at all.
Do you have any ideas about it?
What features has or hasn't file system in kiosk mode - it's really hard to debug it there.
Many thanks for any information about file system in kiosk mode.

https://productforums.google.com/forum/#!topic/chromebook-central/zv1nxWBAce4;context-place=forum/chromebook-central
According to this answer, app in kiosk mode hasn't any access to file system.(but from my experience it isn't quite true, i can wright files and folders, read them via file api)
Main problem that i can't reach them from dom src property.
But anyway google demand additional license for this option, so any
kludges can be blocked in further versions of chrome os...

Create a shortcut to your Chrome executable, right click it, select "Properties" and then make sure the target field looks like this (for example):
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk "file:///C:/Users/JohnDoe/Desktop/MyHTMLFile.HTML"
The executable must be in double quotes, as well as the file path.
You may need to embed your MP4 inside an HTML5 element on a local HTML file for this to work.

Related

How to determine if invisible files are currently shown in the Finder?

In a macOS application written in Swift or Objective-C and targeted for the Mac App Store, how to determine programmatically if invisible files are currently shown in the Finder? I have tried to call defaults read com.apple.finder AppleShowAllFiles using NSTask, but it does not work in the sandbox. Any help is greatly appreciated, thanks.
Finder
It's irrelevant if com.apple.finder AppleShowAllFiles contains false or true. You probably misunderstood how it activates file viewer with URLs.
Example:
/Users/zrzka/.rustup
Finder is activated with content of the /Users/zrzka folder
.rustup folder is selected
/Users/zrzka/.rustup/toolchains
Finder is activated with content of the /Users/zrzka/.rustup folder
toolchains folder is selected
Sandbox
You can ask Apple for temporary exceptions. Here's more detailed answer. But it really depends on what files/folders do you want to reveal.

Photoshop - simple Open File action on MAC

Could anyone send the ATN file with only one action -> opening PSD file on Mac?
I've made an action with a lot of steps, it's working good but only on Windows. There is no relative paths in PS actions, and i have no friend that has Mac. Could anyone prepare ATN file (so i will be able to copy "open psd file" step)?
Regards,
Luke
Short answer: this won't work. Even though Photoshop has "shortcuts" paths that are similar for both OSX and Windown (like ~/Desktop is a shortcut for desktop folder no matter of OS and username), Actions don't seem to recognize them. Furthermore, if you record an Open Action on Windows or Mac and open it in a different OS, you'll get a File or folder not found message for this step:
Here're two examples. In bot cases the top Action was made in Windows and the bottom one on Mac. This is a Mac screenshot:
and Windows:
Notice how Action1 on the Mac screenshot has File or folder not found message and on Windows there's the same message for Action2 from fromMac set.
Here's what you can do though.
insert Open as a Menu Item. This way user will be asked for a file you need every time a user calls the Action.
give the file you need to open as a pattern file (.pat) and ask a user to install it. This way you can fill a document with it using the Fill command.
most powerful: use a script. You can convert your action to a script file using the xtools: there's a script within it called ActionToJavascript: this will give you a .jsx file that you can use in Photoshop and that will work exactly as your action. And in this script you can specify a path for your action. Like here I'm specifying a file on my Desktop:
And this script will work on Mac.

Opera Extension - persona.ini

I am uploading my first Opera Extension. It is very simple. It is a toolbar button that launches a popup window. It works perfectly fine in Opera developer mode. Opera is not letting me upload it successfully. It keeps saying the persona.ini file is missing. Meanwhile I downloaded quite a few extensions already live in the Opera Extensions Directory to see their persona.ini files and none of them even have a persona.ini file. I can only find one example of a persona.ini file online and it must not be correct because it doesn't allow the upload either.
Has anyone experienced this? Why is this happening?
You're probably uploading the extension in .zip format, which is not supported — only .crx and .nex are supported. .zip is only used for Opera themes (hence the reference to persona.ini).
So, to fix this, you can do the following: when in developer mode, use the "Pack extension" button to pack and sign your extension. Then try uploading it again — everything should work fine.
I successfully uploaded zip package in Opera store.
I faced with same issue ("persona.ini is missed") when tried to upload zip package with root folder - I mean zip content: "Sources/content (like manifest.json).
Chrome store accepted this package but for Opera you could try to create zip package with all content without parent folder (Sources folder in my case).
Opera doesn't support till now the .zip file you need to upload either .nex or .crx file.
To create a .nex file..
In your opera URL,just type opera://extensions
Click on Pack Extensions.
Browse to the root directory of your extension and click on okay.
The file will also create an .pem file along with .nex file. Keep your pem file safe and with you for uploading/upgrading your extension.

How to read a shortcut file (and get its target) in a Windows RT metro app?

I have accessed normal files and folders, but unable to read the target value from a shortcut file. Any idea how to read a shortcut file in WinRT?
My actual requirement is to find the most recently used/opened files in the system This info was previously available through Environment.GetFolderPath(Environment.SpecialFolder.Recent)
Thank you in advance :)
There is a file AppData\Local\recently-used.xbel which contains this information on Win8. Parsing it should be easy, but the problem will probably be to get access to this file as it isn't in the folders that can be accessed via any manifest declaration. Also the AppData folder is hidden, making it inaccessible via the FileOpenPicker.
My guess would be that this is an intentional change by Microsoft since it is no business of a sandboxed app, which documents were used by other apps. If you want to open files that were recently opened by your app, you can roll your own "recently changed" implementation. Which should be easy because you have to save their token to the FutureAccessList anyhow.

Windows 8 metro application access arbitrary file path

In metro, the codes like following will throw exception:
String fileName = #"C:\Test\dd\ccc.jpg";
StorageFile file = await StorageFile.GetFileFromPathAsync(fileName);
However even if I check everything in capabilities, also File Picker was added and all file types allowed. I still can't access this file, the same exception will be thrown.
Does someone know how to read file in arbitrary file path? Is that possible in metro style application.
Not possible. You can get to the Libraries - pictures, documents, videos - and if the user puts that folder into one of those libraries (using Windows Explorer on the desktop side) you're all set. You can even write a desktop exe that will put the folder into the library, but you can't launch that exe yourself or be sure that the user hasn't changed the libraries by hand.
Look up SHCreateItemInKnownFolder for a starting point to the shell APIs for library work. I haven't tried calling those APIs from the Metro side; you can see if they help but my bet is they will not be available. If you don't like the COM interop to the shell APIs you could look at the source code to the Windows API Code Pack - I wouldn't want to bundle all of it with a Metro app, but you could copy parts of it to your application.