Results 1 to 3 of 3

Thread: get script to run in alt-f2

  1. #1
    Join Date
    Apr 2007
    Beans
    42

    get script to run in alt-f2

    Hey,

    I have a few bash script in ~/.bin

    I want to be able to run them both the command line and from if I use the alt-f2 command prompt. I happen to use gmrun.

    I know I can do this by hardlinking each file to /usr/local/bin but I would rather be able to just put my scripts in ~/.bin

    Any ideas. Thanks

  2. #2
    Join Date
    Oct 2009
    Location
    Elgin, IL USA
    Beans
    3,363
    Distro
    Ubuntu 16.10 Yakkety Yak

    Re: get script to run in alt-f2

    If you put your scripts in ~/bin (without the dot) that will automatically be in your PATH the next time you login. So you just have the directory name slightly wrong.

    Code:
    efflandt@natty-ssd:~$ echo $PATH
    /home/efflandt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    i5 650 3.2 GHz upgraded to i7 870, 16 GB 1333 RAM, nvidia GTX 1060, 32" 1080p & assorted older computers

  3. #3
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: get script to run in alt-f2

    You can do it from Alt+F2 run dialog by using the command in the box
    Code:
    bash -c "/path/to/file.sh"
    This works wherever the script is in your home, but I'm not sure what happens if the script will only run with root privileges.
    Last edited by ajgreeny; January 7th, 2011 at 09:17 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •