Several times a day I need to open my development environment by opening a terminal window (the default xfce4-terminal) and typing the following commands:
cd ~/Desktop/xyz
conda activate tf_gpu
I want to automate this process with a shell script that I can double-click. I've seen lots of similar questions but none of the answers open the window for me.
Not sure if it matters, this is on Linux Mint 20.1.
I've tried putting the following files on my Desktop with "Allow this file to run as a program" ticked in Permissions.
- This seems to do nothing:
#!/bin/bash
cd ~/Desktop/xyz
conda activate tf_gpu
- This:
#!/bin/sh
x-terminal-emulator -e "cd ~/Desktop/xyz && conda activate tf_gpu"
throws the following error:
Error
Failed to execute child
Failed to execute child process "cd" (No such file or directory)
con-tfgpu
instead of those two... – Atharva Kadlag May 31 '21 at 10:42