LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-21-2014, 11:48 PM   #1
gonny95
Member
 
Registered: Feb 2014
Distribution: Slackware,Ubuntu
Posts: 84

Rep: Reputation: Disabled
Xfce-How to execute scripts in terminal emulator when I double click


I'm using 32-bit Slackware 14.1 and my desktop environment is Xfce

My question is how to execute scripts files or c/c++ or python files

I've tried to edit /usr/share/applications/mimeinfo.cache

I added the line: application/x-executable=exo-terminal-emulator.desktop

Although there is the terminal emulator in recommanded application ,when I double clicked a program or script it's not working in terminal,it's just executed

To see the screen shot, go here:

http://tinypic.com/r/28t8ej9/8
 
Old 02-22-2014, 06:46 AM   #2
s.verma
Member
 
Registered: Oct 2013
Distribution: Debian Sid, Gentoo, Arch, Debian
Posts: 186
Blog Entries: 4

Rep: Reputation: 25
Referring to your uploaded image,
You can see there is an option known as
"Use a custom command"
at the bottom of dialog with drop down arrow at left.

Just use
xfce4-terminal -e
in the text box.

Keep enabling
"Use as default for this kind of file."

Theory:Actually what you are doing is you are trying to execute script/program by

xfce4-terminal programname

But actual command to execute a program in terminal is

xfce4-terminal -e programname

Result: Hence you need to give it a custom command.

More:
You can use
xfce4-terminal -H -e programname
to hold the terminal. So that it doesn't close when program closes, rather wait for you to close terminal.

More Info:
man xfce4-terminal

Last edited by s.verma; 02-22-2014 at 06:52 AM.
 
1 members found this post helpful.
  


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
XFCE double click in thunar after last nov upgrading anti_user Slackware 6 11-23-2010 10:52 AM
Which is your fav. terminal emulator under Slackware13+Xfce and why? catkin Slackware 24 09-20-2009 01:12 PM
Execute a script with double click of mouse? hraposo Linux - General 3 08-27-2007 07:49 AM
how to execute a shell script in GUI by double click kamesh156 Programming 1 10-18-2005 05:25 AM
How to get Konqueror to execute shell scripts in a new console on double click nitrambass Mandriva 0 06-22-2004 10:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:47 PM.

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