LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-01-2009, 04:14 PM   #1
vwtech
Member
 
Registered: Dec 2007
Distribution: Fedora, Oracle Linux & Centos
Posts: 197

Rep: Reputation: 26
Question Run .sh file without being prompted


I have created a .sh file to log out of my current session however when double clicking on the item a prompt continues to come up.
I have chosen the option for it to open in the gnome-terminal but it still comes up.

When I ran the file the terminal is works as it should be I want to just double click on the file and have it run with being prompted. I don't see any prompts. Anyone have any idea's, running Fedora 9 w Gnome.

Thanks for reading.
 
Old 01-01-2009, 04:45 PM   #2
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
I don't know if I understand everything here (I don't use gnome and maybe there's something I am not considering). However, can you post the contents of the script? It might help.

Maybe it will work if you modify it to launch the terminal from the script itself. For example:

Code:
#!/bin/sh
xterm -e <whatever command you want to run>
I can't be more specific without knowing your current script code.
 
Old 01-01-2009, 05:12 PM   #3
vwtech
Member
 
Registered: Dec 2007
Distribution: Fedora, Oracle Linux & Centos
Posts: 197

Original Poster
Rep: Reputation: 26
#!/bin/bash
#This program will log the user at
date
who
echo"You are logging out fool"
who
skill -kill -u
 
Old 01-04-2009, 10:16 AM   #4
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 36
Quote:
Originally Posted by vwtech View Post
I have created a .sh file to log out of my current session however when double clicking on the item a prompt continues to come up.
I have chosen the option for it to open in the gnome-terminal but it still comes up.

When I ran the file the terminal is works as it should be I want to just double click on the file and have it run with being prompted. I don't see any prompts. Anyone have any idea's, running Fedora 9 w Gnome.

Thanks for reading.
Run the file preferences dialog: on my Debian box it is under "System" --> "Preferences" --> "File Management". Select the "Behavior" tab and then select "Run executable text files when they are opened". You may also need to change the application associated with these files to the terminal instead of gedit, which they are normally associated with.
 
Old 01-06-2009, 09:23 AM   #5
vwtech
Member
 
Registered: Dec 2007
Distribution: Fedora, Oracle Linux & Centos
Posts: 197

Original Poster
Rep: Reputation: 26
Thanks very much, setting the behavior was the ticket.

-Windows 7 anyone...LOL.
 
Old 01-06-2009, 09:34 PM   #6
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 36
Quote:
Originally Posted by vwtech View Post
Thanks very much, setting the behavior was the ticket.

-Windows 7 anyone...LOL.
Glad it worked for you. On the Windows 7 comment, never...seriously!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to run .exe file as we run the samwe in windows chandrala13 Linux - Newbie 2 05-22-2008 05:30 AM
Not getting prompted for Root password Doug Vitale Fedora 8 02-20-2007 11:59 AM
samba: win xp client does not get prompted for username djidji Linux - Software 4 01-09-2007 04:51 PM
Prompted for Password When Configuring Printer Kamex SUSE / openSUSE 3 08-14-2005 10:05 PM
How to delete the whole folder without being prompted anything conkhikho Linux - Newbie 1 10-27-2003 01:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration