Executing shell script from desktop

Hello All,

Is there a way that I can have wrapper place in my desktop and when I run it, it connect with my server and do the action.

If this can happen, Can I know how to get started

Thanks

You could place:

  • the script itself
  • a symlink to the script
  • a script that sources the script
  • a desktopfile which executes the script

A desktopfile could look like:

[Desktop Entry]
Type=Application
Name=Script-Tools
Comment=A collection of bash scripts to accomplish diffrent tasks.\n* Change plymouth\n* Change grub2 theme\n* Toggle Repo's (En-/Disable)\nand more...
Exec=/usr/bin/st
Icon=/usr/share/script-tools/Script-Core/Templates/SSTLogocombined.svg
Terminal=true

If it is more about the script, then it might differ from the tools required to access/connect to the server.
If you have provided the info in ~/.netrc ( machine URL login USER password PW where the capitals are your values) it could looks like this:

ftp my.domain.com<EOF
lcd /path/to/local
cd /path/remote
prompt
mput *
bye
EOF

This would upload all files in /path/to/local to /path/remote without asking to upload/overwrite to your ftp server.

Hope this helps

Do I need any extension to the script to execute from desktop, and if you can show me a sample script, it will be of great help.

For 'visual' reckonize or forum compatiblity, you could use .sh for any sh or bash script. Use csh, ksh, tcsh or zsh accordingly.

All it requires is the execution flag.
Either by right-click-properties - tab: permission - Execute: owner/everyone?

Or by:

chmod +x filename

Hope this helps