I used chmod +x to make the script executable and for the shortcut too.
But it isn't working. Clicking the shortcut brings up a window asking if I want to run it or display its contents. Nothing happens when I select "execute" and the icon isn't showing either.
I do have snippets of code from other sources, but for the life of me I can't make this work. Help?!
Avoid referencing home as ~ in a desktop entry. Use the Full Path, instead
(replace "$USER" or "username" with your actual system username): /home/$USER/scripts/kubuntu-vm.sh
Um... This may be a dumb question on my part, but in the above, you had it in /scripts - did you move the file?
EDIT: Nevermind, I misread it and yes, it was a dumb question. I just realized what I read and what I thought I read.
Can you remove the first argument ($1) and then try it?
I understand what your trying to do, but if you scrolled down in the first link it provided a script that should perform what you are looking for complete with the desktop entry.
#!/bin/sh
# call this script with domainname as parameter
# to start domain and open viewer
/usr/bin/virsh start $1
# domain must be known to virsh
/usr/bin/virt-viewer -w $1
# -w to wait until domain is running.
This script takes the domain as input ($1) from the command-line... so you would call:
sh vm.sh [domain-name]
In your script above you call the domain Xubuntu... is this correct? Remember capitalization counts. You can hardcode it like that but defining the domain at the terminal when called allows for change. Matter of choice.
Thanks so much for replying @337harvey . It's actually working now (mostly). Moved the script and icon to a folder in the /home/ directory, and just removed the ' ' around the directory names and it's working and have it on my dash dock no less!
Only, for the life of me, I cannot get the png icon to show. Any ideas?