Announcement

Collapse
No announcement yet.

How to enable binary files to be run in terminal in GUI

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to enable binary files to be run in terminal in GUI

    Hey all,
    I has a problem with running binary files using GUI. I'm using Kubuntu 8.10 and when I double click on *.bin files it opens a dialog box asking for the associated app. As I want to run them in terminal I checked "run in terminal" checkbox. But doesn't activate the OK button to proceed .

    Please somebody can tell me the reason for this

    Thanks.
    --------<br />Kasun Gajasinghe,<br />University of Moratuwa,<br />Sri Lanka.<br /><br />Blog: http://kasunbg.blogspot.com<br />Twitter: http://twitter.com/kasunbg

    #2
    Re: How to enable binary files to be run in terminal in GUI

    as a preliminary notice, please bear in mind that a file extension has no particular meaning in gnu/linux.
    so, a .bin file extension does not necessarily mean the file actually is a binary file.
    this said...
    the reason why the "ok" button is not activated is that you did not provide an application with which to run your .bin file.
    that application is a "command interpreter" (i.e. a shell; e.g. the bash shell).
    so...
    you can most likely achieve what you want by:
    a) double clicking on your .bin file
    b) enter "/bin/bash -c" in the "open with:" textfield
    c) click "run in terminal"
    and possibly (but not necessarily)
    d) click "do not close when command exits"

    hth
    gnu/linux is not windoze

    Comment


      #3
      Re: How to enable binary files to be run in terminal in GUI

      I tried running the bin file like you suggested, but the terminal complained.
      Code:
      [sudo] password for sapper:
      /bin/bash: /home/sapper/Desktop/ati-driver-installer-9-1-x86.x86_64.run: Permission denied
      What's with the permission denied? Should I use change mod? If I should, what is the proper code to use?

      Comment


        #4
        Re: How to enable binary files to be run in terminal in GUI

        let's try from command line.
        it should be easy enough.

        please start a konsole and issue the following commands:

        Code:
        cd ~/Desktop
        to change to your desktop directory

        Code:
        chmod a+x ati-driver-installer-9-1-x86.x86_64.run
        to make sure your .run file have execute permissions (this step might be superfluous)

        Code:
        sudo /bin/sh /home/sapper/Desktop/ati-driver-installer-9-1-x86.x86_64.run
        to start the installation of your ati drivers
        sudo is to gain admin privileges
        /bin/sh is the commands interpreter to "execute" the .run file

        hth
        gnu/linux is not windoze

        Comment


          #5
          Re: How to enable binary files to be run in terminal in GUI

          Thanks jankushka. I thought I was going to have to use chmod.

          kasunbg, I couldn't open my .bin by double clicking it. Right click it and select "Open with:" and enter in the text field
          /bin/sh /home/your_name/Desktop/your_file.run
          And like jankushka said to check "Run in terminal" and possibly "Do not close when command exits"

          Comment


            #6
            Re: How to enable binary files to be run in terminal in GUI

            Yeah, thanks Kannedheat.
            It means that for *.run files we have to use /bin/sh
            and for *.bin files /bin/bash , right
            --------<br />Kasun Gajasinghe,<br />University of Moratuwa,<br />Sri Lanka.<br /><br />Blog: http://kasunbg.blogspot.com<br />Twitter: http://twitter.com/kasunbg

            Comment


              #7
              Re: How to enable binary files to be run in terminal in GUI

              Originally posted by kasunbg
              Yeah, thanks Kannedheat.
              It means that for *.run files we have to use /bin/sh
              and for *.bin files /bin/bash , right
              that is not correct.
              you can use /bin/sh or /bin/bash.
              the difference in this case is the use of the -c option.
              but, as i said, file extensions in gnu/linux are a mere convention.
              so, you cannot be 100% sure as to what a file is/contains, simply based on the file extension.
              hth
              gnu/linux is not windoze

              Comment

              Working...
              X