tried to fix weird quote stuff with export to X by using a here document.

This commit is contained in:
Storm Dragon 2019-04-28 21:10:47 -04:00
parent 13d06d8470
commit 014d23c61a

View File

@ -29,7 +29,7 @@ class command():
return return
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory') clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
for display in range(10): for display in range(10):
p = Popen('su ' + self.env['general']['currUser'] + ' -c "echo -n \\\"' + shlex.quote(clipboard) +'\\\" | xclip -d :' + str(display) + ' -selection c"' , stdout=PIPE, stderr=PIPE, shell=True) p = Popen('su ' + self.env['general']['currUser'] + ' -c "cat << \\\"EOF\\\"\n' + clipboard + '\nEOF | xclip -d :' + str(display) + ' -selection c"', stdout=PIPE, stderr=PIPE, shell=True)
stdout, stderr = p.communicate() stdout, stderr = p.communicate()
self.env['runtime']['outputManager'].interruptOutput() self.env['runtime']['outputManager'].interruptOutput()
#screenEncoding = self.env['runtime']['settingsManager'].getSetting('screen', 'encoding') #screenEncoding = self.env['runtime']['settingsManager'].getSetting('screen', 'encoding')