Basically I am executing this script remotely via an SSH session. It works fine on Linux Mint, but not on Debian (7.5). It looks like the export display or nohup command isn't working, but I'm not sure what to try to test this. Can anyone see anything wrong with this?
#!/usr/bin/env bash mount -t cifs //10.50.18.114/Presentation -o 'username=Administrator,password=***,sec=ntlm' /mnt/share pkill soffice.bin cp -v /mnt/share/Pres.ppt /home/kyle/Documents chmod 777 /home/kyle/Documents/Pres.ppt export DISPLAY=":0" nohup libreoffice --norestore --nolockcheck --show /home/kyle/Documents/Pres.ppt & sessionid="$(pidof -s sshd)" kill $sessionid exit
EDIT: This is not the same issue as shown in the 'duplicate' link provided, I've used the information in that thread and it didn't work.
To answer the comments: I have 2 separate machines. The presentation PC has the above script saved locally. I am executing this script remotely over SSH, I put echo commands in between each stage and it looks as if it executes all the way to the end (I actually commented out the kill sessionid), but the presentation doesn't display on the presentation PC. The script works if I execute locally as root (it needs root to use the mount command).
The only error I see is:
(soffice:3747): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. GConf Error: No D-BUS daemon running
However, I get this error whether I run locally or over SSH, so I don't think this is the issue. I still believe it is something with the EXPORT and nohup command, but I don't know enough to troubleshoot effectively.
EDIT 2: It actually works when I SSH with my 'kyle' account, it seems connecting via SSH with root isn't able to connect to 'kyle's local display because it is a different username. I will work on finding a solution to this.