LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-03-2008, 09:58 PM   #1
Bob Armstrong
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Rep: Reputation: 0
auto closing console ?


I Recently got an ASUS Eee running Xandros .

But my question is really basic :

I made a simple one line .sh script to switch to an external display . If I highlight it in the file manager and hit enter , it opens a console and executes . But then the console window asks me to type enter to continue ( and close ) .

How can I make a shell script that just executes and quits ?
 
Old 08-03-2008, 10:12 PM   #2
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
Uhm. end your script with 'exit'
 
Old 08-03-2008, 10:29 PM   #3
Bob Armstrong
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Thought I'd tried that . Obviously not as wrong as 'kill' , but doesn't do anything . Here's the script :

sudo /usr/bin/xrandr --output VGA --mode 1024x768 --output LVDS --off
exit


I still get
Press <ENTER> to continue...
 
Old 08-03-2008, 10:35 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
exit 0

You may need to redirect STDOUT/STDERR and run it in the background.

sudo /usr/bin/xrandr --output VGA --mode 1024x768 --output LVDS --off > /dev/null 2>&1 &
exit 0
 
Old 08-04-2008, 11:05 AM   #5
Bob Armstrong
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Still pops up a console window and waits for me to close it .

I find that when I run it using the run window it runs 'silently' - no console popping up .

So it must be something in the way KDE has set up its File Manager .

Pain , but I guess I'll just use the Run command window from now on . ( The script is something I generally do whenever I attach the Eee to my desk monitor . )

Thanks for the help .
 
Old 08-04-2008, 12:18 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
If you are running KDE (AKA the "Advanced Desktop" - see http://wiki.eeeuser.com/howto:getkde ) on the stock Xandros OS then you can just R-click your desktop, Create New ... Link to application.

Then:
General Tab: Click on the blue gear Icon, and choose a more suitable icon, and then name it "External_Monitor" instead of just "Link to application".
Application Tab: In the Command box, put your command.
Click OK

You now have a new desktop icon that'll do what you want with one click.
You can play with this new icon by R-clicking it and choosing "Properties".

If it annoys you by being on your desktop, drag it somewhere else. It needs to keep its name as something.desktop though.

If you did want it to run in a terminal, under the Application Tab, Advanced Options, there's the option to "Run in terminal".

If you are not running KDE, I strongly suggest you install it: it is highly customisable, which is one of the many reasons I love it.

Have fun.
 
Old 08-04-2008, 12:50 PM   #7
Bob Armstrong
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Hey , thanks .

That worked . ( Leaves a little icon stuck to my cursor for a while tho . )

I've never really been a "desktop" user ; it's always covered up with work . But this gives me the flexibility to use it from anywhere .
 
Old 08-04-2008, 01:36 PM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Pleased it worked for you.

Quote:
Leaves a little icon stuck to my cursor for a while tho
Yes, it does, and I cannot be bothered to work out how to stop that, but if you are interested, it'll probably be here somewhere:
Launch kcontrol (from a terminal, I don't think it is on the eee's menus). Then General Settings - Desktop Behaviour - Launch feedback

"Launch feedback" is quite useful on the (rather slow) eee as it lets you know that it has recognised your Click-to-do-whatever, and the fact that nothing is opening is because the eee is quite slow (at the 600MHz default). I don't care as I only use it for travel, and it is light, small (but not too small), and fully functional.
 
  


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
Closing a virtual console Akky Linux - General 7 08-13-2009 07:41 AM
Auto detect a closing connection helpmhost Linux - Networking 4 01-23-2007 02:08 PM
nvidia problem: console unreadable after closing X drkstr Linux - Software 6 04-04-2006 01:34 PM
Closing programs with console john7343 Linux - Software 3 02-22-2006 05:15 PM
Firefox current seems to be kind-of-auto-closing johnnydangerous Fedora 2 03-08-2005 11:25 PM

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

All times are GMT -5. The time now is 08:09 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