0

Trying to create a global command to launch lighttable (the editor) version 0.8.0

Initially I tried it the i thought easy way and moved the extracted lighttable folder to /opt and then created a symlink

sudo ln -s LightTable /usr/bin/Lt

When that didn't work I changed it to

sudo ln -s ./LightTable /usr/bin/Lt

That didn't work so I have tried to add the directory to my path and then create an alias from there.

The command to execute lighttable is

./Lighttable

so in my ~/.profile I have added

export LT_HOME=/opt/lighttable/ 
export PATH=$PATH:$LT_HOME

then I created my ~/.bash_aliases file and added

alias light="./LightTable"

I then restarted the shell and tried using the alias however it fails

sayth@:~$ light
bash: ./LightTable: No such file or directory

How can I achieve this?

Edit

Couldn't initial locate an answer, have now found

https://askubuntu.com/a/500698/25659

1 Answer 1

0
sudo ln -s LightTable /usr/bin/Lt
sudo ln -s ./LightTable /usr/bin/Lt

Neither command does what you think it will do. In both cases, Lt points to the LightTable in the current directory relative to itself.

What you should do is specify the full path of the link's target:

sudo ln -s /opt/lighttable/LightTable /usr/bin/Lt

alias light="./LightTable"

You're still running LightTable from the current directory (./). When you provide a path, absolute or relative, to a command, then the PATH isn't checked. You should have run just LightTable, or the alias should be just:

alias light=LightTable

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .