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
    2,531
    Distro
    Ubuntu 12.04 Precise Pangolin

    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, 8 GB, nvidia GTX 550 Ti 32" 1080p | i7-4700, 8 GB, Intel HD 4600/nvidia GTX 765M 15.6" 1080p | etc.

  3. #3
    Join Date
    Jul 2005
    Location
    England
    Beans
    13,575

    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.
    DISTRO: Xubuntu 12.04-64bit --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo

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
  •