Templater icon indicating copy to clipboard operation
Templater copied to clipboard

tp.system.clipboard() not working on child windows on KDE Plasma

Open sohanglal opened this issue 1 year ago • 12 comments

  • OS: Kubuntu 22.10
  • Templater version: 1.16.0
  • Obsidian version: Obsidian v1.1.15
  • Templater settings:

Describe the bug tp.system.clipboard() is not working on the child windows but it is working on the main window.

It throws the error: plugin:templater-obsidian:61 Templater Error: Template parsing error, aborting. Read permission denied.

I ran ./Obsidian-1.1.15.appimage in my terminal. It throws the error Blocked permission request about:blank clipboard-read.

Workaround that I am using:

const execSync = require('child_process').execSync;
const url = String(execSync("xclip -o -sel clip"))

Using the command line to fetch clipboard cotents

sohanglal avatar Feb 23 '23 09:02 sohanglal

Thanks for raising the issue, am having the same problem in the child windows. I am working with same versions of Templator and Obsidian on the OS - NixOS 22.11.2651.e19f25b587f (Raccoon).

TuringTrails avatar Feb 23 '23 10:02 TuringTrails

For me it works with both windows and ubuntu 22.04. No issues. I have the same obsidian and templater version as mentioned

I do not have any special templater settings beside setting a default folder

ItsWuotan avatar Feb 23 '23 11:02 ItsWuotan

For me it works with both windows and ubuntu 22.04. No issues. I have the same obsidian and templater version as mentioned

I do not have any special templater settings beside setting a default folder

Hey can you confirm if you are running it in the child or main window.

TuringTrails avatar Feb 23 '23 11:02 TuringTrails

Child

ItsWuotan avatar Feb 23 '23 11:02 ItsWuotan

Child

On Ubuntu, how did you install obsidian, via snap, flatpak, appimage or .deb?

sohanglal avatar Feb 23 '23 11:02 sohanglal

I'm sorry. I should have added that I use appimage on Ubuntu

ItsWuotan avatar Feb 23 '23 11:02 ItsWuotan

I'm sorry. I should have added that I use appimage on Ubuntu

2023-02-23 11:57:27 Loading main app package /tmp/.mount_ObsidiugaAJe/resources/obsidian.asar
xdg-mime: application argument missing
Try 'xdg-mime --help' for more information.
2023-02-23 11:57:31 Checking for update using Github
2023-02-23 11:57:31 Success.
2023-02-23 11:57:31 Latest version is 1.1.15
2023-02-23 11:57:31 App is up to date.
(electron) The new-window event is deprecated and will be removed. Please use contents.setWindowOpenHandler() instead.
(electron) The new-window event is deprecated and will be removed. Please use contents.setWindowOpenHandler() instead.
Blocked permission request about:blank clipboard-read

The last line says that Blocked permission request about:blank clipboard-read.

I ran ./Obsidian-1.1.15.appimage in my terminal

sohanglal avatar Feb 23 '23 12:02 sohanglal

I tested the same on Windows 10 and the problem doesn't seem to be there. Thanks for helping out @ItsWuotan @PulakshG, can you confirm if your DE is KDE plasma, because that is the DE that I have, and I hypothize that is what is maybe causing the issue

sohanglal avatar Feb 23 '23 14:02 sohanglal

yes I am using KDE, sorry shouldve mentioned earlier. Can you update here if you find any solution. Thank you

TuringTrails avatar Feb 23 '23 15:02 TuringTrails

I have reverted to using Obsidian v1.1.9, installed via AppImage. It is working fine on the older version

sohanglal avatar Feb 23 '23 15:02 sohanglal

Workaround that I am using:

const execSync = require('child_process').execSync;
const url = String(execSync("xclip -o -sel clip"))

Using the command line to fetch clipboard cotents

Also, I had to re-install templater to get it working again

sohanglal avatar Mar 03 '23 08:03 sohanglal

image

https://forum.obsidian.md/t/obsidian-release-v1-2-8/59086

Fixed in v1.2.8. Haven't tested it yet

sohanglal avatar May 16 '23 05:05 sohanglal