used shel for export to X
This commit is contained in:
parent
49e2e4f3a3
commit
742d3073dd
@ -7,6 +7,7 @@
|
|||||||
from fenrirscreenreader.core import debug
|
from fenrirscreenreader.core import debug
|
||||||
import subprocess, os
|
import subprocess, os
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
import shlex
|
||||||
import _thread
|
import _thread
|
||||||
|
|
||||||
class command():
|
class command():
|
||||||
@ -28,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 \\\"' + clipboard.replace('"','\\\\\\"') +'\\\" | xclip -d :' + str(display) + ' -selection c"' , stdout=PIPE, stderr=PIPE, shell=True)
|
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)
|
||||||
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')
|
||||||
|
Loading…
Reference in New Issue
Block a user