Choose style:

Author Topic: script question (SOLVED)  (Read 175 times)

0 Members and 1 Guest are viewing this topic.

Offline arky217

  • Member
  • ***
  • Posts: 170
  • Karma: 10
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
script question (SOLVED)
« on: May 28, 2019, 06:08:49 pm »
How do I bypass the prompt when running a script ?

Simple example: I create a new document on the desktop and name it startxed.
I want it to start xed text editor, so I put in the document the lines

#!/bin/bash
xed

Then under the documents permissions, I check 'execute file as a program'.

Well, when I click on startxed, it gives me a prompt with the choices:
Run in Terminal, Display, Cancel, Run.

When I click run, it starts xed alright, but I want it to start it without the prompt.
Is there any way to lose the prompt and just run the script without the prompt ?

« Last Edit: May 28, 2019, 10:57:36 pm by arky217 »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25300
  • Karma: 2793
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: script question
« Reply #1 on: May 28, 2019, 06:27:31 pm »
Why would you want to do that ?

Wouldn't it be better to create a .desktop launcher for your application ?



In any case, the correct way to do it would be to create your script .. then run your script from a .desktop launcher.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline arky217

  • Member
  • ***
  • Posts: 170
  • Karma: 10
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: script question
« Reply #2 on: May 28, 2019, 06:33:27 pm »
Why would you want to do that ?

Wouldn't it be better to create a .desktop launcher for your application ?



In any case, the correct way to do it would be to create your script .. then run your script from a .desktop launcher.

Yes, I realize that and that's the way I've always did it, but I was just wondering if it were possible
 to eliminate the launcher step and run the script directly by just clicking on it without having to answer the prompt.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25300
  • Karma: 2793
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: script question
« Reply #3 on: May 28, 2019, 06:49:28 pm »
Okay if you wanna run scripts by clicking on them, who am I to stand in your way :)

Open the Nemo file manager

go to:-

Edit > Preferences > Behaviour (tab)

And tick "Run executable text files when they are opened" (under the Executable Text Files heading)
« Last Edit: May 28, 2019, 07:01:01 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline arky217

  • Member
  • ***
  • Posts: 170
  • Karma: 10
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: script question
« Reply #4 on: May 28, 2019, 10:55:27 pm »
Okay if you wanna run scripts by clicking on them, who am I to stand in your way :)

Open the Nemo file manager

go to:-

Edit > Preferences > Behaviour (tab)

And tick "Run executable text files when they are opened" (under the Executable Text Files heading)

Wow, PCNetSpec, I thought for sure you were going to tell me no way, Hosea.
No idea it would be that simple.
Thank ye, thank ye.
(Not that that's the way I should run a script or maybe even will, but
it's nice to know that it's possible)

That Nemo file manager is something else; I prefer it over any others that I've tried.

I used Peppermint for quite some time, but for seemingly no reason, I have been
using MX for the last several months.
But there's just something about Peppermint that I really like, and what with
the release of Peppermint 10, I just had to come back.

You and your team do a fantastic job with Peppermint and
I thank you very much !
Keep up the good work.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25300
  • Karma: 2793
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: script question (SOLVED)
« Reply #5 on: May 28, 2019, 11:03:52 pm »
Yep, without a shadow of a doubt Nemo is the best file manager out there .. well at least that's my opinion.

Oh, and you're most welcome, I'm sure the rest of the team will appreciate the compliment too :)
« Last Edit: May 28, 2019, 11:09:16 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline VinDSL

  • Global Moderator
  • Hero
  • *****
  • Posts: 5183
  • Karma: 939
  • Peppermint Mod
    • View Profile
  • Peppermint version(s): Developmental Builds
Re: script question (SOLVED)
« Reply #6 on: May 28, 2019, 11:14:38 pm »
Aye, Captain  ;D