Results 1 to 3 of 3

Thread: How to make an .sh run in Terminal

  1. #1
    Join Date
    2013-Apr
    Location
    Norway
    Posts
    16

    How to make an .sh run in Terminal

    I know, not the most interesting question.

    But I made an update.sh that I want to NOT have to type ./update.sh to after navigating into the directory everytime.
    I chmod it but it still won't open in Terminal. When I try to choose open with: I cannot find terminal?

    So I tried to add it to PATH and further more follow this page http://linuxcommand.org/lc3_wss0010.php
    but I don't know where .bash_profile or .profile file to make it last.

    My issue is that I rather want to just double click it on desktop to make it execute?

    How do I do this?
    I would love to change the world, but they will not give me the source code!

  2. #2
    Join Date
    2017-Mar
    Posts
    1
    Make sure your .sh is correct and works from command line.
    Then you can edit your DE options to open it with double click, or add it to crontables or /etc/init.d/ to run it i.e when system boots.
    Besides, whats your problem with terminal? You wont do much on kali with just double-clicking.

  3. #3
    Join Date
    2013-Apr
    Location
    Norway
    Posts
    16
    Hi, thanks

    Nothing wrong with my terminal, it works there.
    But it is an update script to apt-get and I do not want to type in the ./update.sh as I would then need to have the script in the root so I would not need to navigate to a perticular folder.
    Time consuming!!!

    I want to execute from desktop or place the script in the menu somehow, ease of use.
    What is DE options?

    PS. here is the content of the file

    !#/bin/bash

    apt-get update
    apt-get upgrade -y
    apt-get autoremove
    I would love to change the world, but they will not give me the source code!

Similar Threads

  1. How to make URLs ctrl+clickable in terminal?
    By appas in forum General Archive
    Replies: 0
    Last Post: 2019-05-28, 18:15
  2. Replies: 10
    Last Post: 2018-01-14, 16:47
  3. Replies: 3
    Last Post: 2015-07-01, 19:25

Posting Permissions

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