You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys,
Thank you for this nice program, exactly what I was looking for to use in my homelab.
I've created a little script to prompt for VMID, username and password and then to run this program. It works perfectly when run from terminal. But if you run it via double-click, it runs the spice viewer and then immediately exits.
I tried 'exec' at the end and also '& disown', but it still happens.
Am I doing something wrong?
#!/bin/bash
export DISPLAY=:0
spicer="[path-to-cv4pve-pepper]"
server="[my-proxmox-server]"
rviewer="/usr/bin/remote-viewer"
unset username
unset password
unset vmident
echo -n "Enter the VM ID: "
read vmident
echo -n "Enter your User ID: "
read username
prompt="Enter your password: "
while IFS= read -p "$prompt" -r -s -n 1 char
do
if [[ $char == $'\0' ]]
then
break
fi
prompt='*'
password+="$char"
done
echo Launching the Spice viewer...
echo
echo
$spicer --host=$server --username=$username --password=$password --vmid $vmident --viewer $rviewer
#exec $spicer --host=$server --username=$username --password=$password --vmid $vmident --viewer $rviewer
#exec $spicer --host=$server --username=$username --password=$password --vmid $vmident --viewer $rviewer & disown
#$spicer --host=$server --username=$username --password=$password --vmid $vmident --viewer $rviewer & disown
sleep 5
The commented-out sections are what I tried until now. They all work when running it from a terminal window, as mentioned.
The 'sleep 5' entry at the end is just to check that the spice viewer is actually launching and it does. It just exits immediately once the script has finished.
Using Linux Mint 20.3 Cinnamon.
Any help would be appreciated.
Have a wonderful day!
Steps to reproduce:
Run the script from terminal: Everything works fine:
Run from Desktop GUI (nemo):
Runs fine but after the sleep period is over, it just exists
The text was updated successfully, but these errors were encountered:
Now the only drawback remains that if you close the terminal window by accident, it will also close the spice window. If you close the spice window, the terminal window will remain open.
What can I do to avoid these behaviours?
Hi guys,
Thank you for this nice program, exactly what I was looking for to use in my homelab.
I've created a little script to prompt for VMID, username and password and then to run this program. It works perfectly when run from terminal. But if you run it via double-click, it runs the spice viewer and then immediately exits.
I tried 'exec' at the end and also '& disown', but it still happens.
Am I doing something wrong?
The commented-out sections are what I tried until now. They all work when running it from a terminal window, as mentioned.
The 'sleep 5' entry at the end is just to check that the spice viewer is actually launching and it does. It just exits immediately once the script has finished.
Using Linux Mint 20.3 Cinnamon.
Any help would be appreciated.
Have a wonderful day!
Steps to reproduce:
Run the script from terminal: Everything works fine:
Run from Desktop GUI (nemo):
Runs fine but after the sleep period is over, it just exists
The text was updated successfully, but these errors were encountered: