LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 10-02-2012, 11:20 AM   #1
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 185

Rep: Reputation: 3
How do you bring up terminal in background started with startup script in Gnome?


I can see it running in systems monitor but can't access the terminal program I started with a startup script...Any ideas? For now I took it out of startup and just have the open terminal program so it can be accessed. I did "ask unbuntu" and the only suggestion I got ther was to press the window + s key....Thanks!
 
Old 10-02-2012, 12:11 PM   #2
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,220
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Okay, some thoughts...
At start-up, stuff gets started, but not in a terminal. It runs and the only way to "see" it is either top, or ps. (unless I'm mistaken, in that case: enlighten me)
You can see the breadcrumbs it leaves behind, as logfles.
If you want to see (actually SEE) a program work in a terminal, you have to start it up...in a terminal. You cannot "see" any of that stuff running as such...
Try it! If you've got gimp installed, open a terminal and type

Quote:
gimp
...and see what the program has to say...

So, what is the goal here, anyway. Maybe is we knew where you want to go, we can give you some pointers...

By the way, welcome to the forum...

Thor
 
Old 10-02-2012, 12:30 PM   #3
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,185

Rep: Reputation: 812Reputation: 812Reputation: 812Reputation: 812Reputation: 812Reputation: 812Reputation: 812
Show us how you started the program in your script and that may reveal what the problem is.
 
Old 10-02-2012, 12:34 PM   #4
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 185

Original Poster
Rep: Reputation: 3
More detailed explanation

Using the add startup program menu I linked a program called Bukkit Server Script to start a Server program in Terminal at startup. (This is all for my Grandson's Minecraft Game) The Startup program works fine and is running cause he and his freinds can log into the server and play the game. You can also verify that it's running by looking at the systems monitor and see the program but there is no way to access it. Some commands can only be issued from the terminal server. When you load it from the desktop you can minimize it and bring it back to front but when loaded in startup it doesn't show up anywhere. My goal is to have his server load on startup to simplify it for him, but he's got to occasionally access it. I installed GIMP BTW...wow!

Does that help?
 
Old 10-02-2012, 12:37 PM   #5
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 185

Original Poster
Rep: Reputation: 3
Script I added to Startup

#!/bin/sh
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
java -Xmx1024M -Xms1024M -jar craftbukkit.jar

#The Craftbukkit.jar file runs in terminal......
 
Old 10-02-2012, 12:39 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,614
Blog Entries: 2

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
I don't know which terminal Ubuntu uses, but most terminal programs have an execute option, mostly -e or -x. Instead of starting the startup script directly do that using a terminal. For example, i use Roxterm as a terminal, so in the autostart use something like this:
Code:
roxterm -e What_ever_your_startup_script_is_named
Of course you have to adapt the command to the terminal you actually use and to the real script name.
 
Old 10-02-2012, 12:45 PM   #7
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 185

Original Poster
Rep: Reputation: 3
Newbie there for a reason :)

How do I know what Terminal I use?
 
Old 10-02-2012, 12:59 PM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,614
Blog Entries: 2

Rep: Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070Reputation: 4070
I just made a short websearch and it seems that the default terminal emulator on Ubuntu 12.04 is gnome-terminal. So in that case the command would be
Code:
gnome-terminal -e STARTUP_SCRIPT
Replace STARTUP_SCRIPT with the actual name of the script.
 
1 members found this post helpful.
Old 10-02-2012, 01:18 PM   #9
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 185

Original Poster
Rep: Reputation: 3
Ok...

It's running as a gnome-session terminal but I still can't access it.
 
Old 10-02-2012, 01:25 PM   #10
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 185

Original Poster
Rep: Reputation: 3
Screen shot of how it's loaded

Here's the screen shot of how it's loaded in startup.

Nevermind...Just tried to load his game and it won't work like this with the gnome terminal prefix added to startup command....
Attached Images
File Type: png Screenshot from 2012-10-02 12:22:54.png (14.1 KB, 3 views)

Last edited by EODSteven; 10-02-2012 at 01:29 PM. Reason: Not working
 
Old 10-02-2012, 01:34 PM   #11
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 185

Original Poster
Rep: Reputation: 3
Screen shot of system monitor

Ok, I put it back to running the script and it's fine, here's a pic of system monitor showing the craftbukkit.sh file

I bet I have to provide the path to the terminal then back to the script again......whew.....what a mess!
Attached Images
File Type: png Screenshot from 2012-10-02 12:31:47.png (83.5 KB, 2 views)

Last edited by EODSteven; 10-02-2012 at 01:38 PM. Reason: new idea
 
Old 10-02-2012, 01:41 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,543
Blog Entries: 54

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Have your startup script run screen:
Code:
#!/bin/sh --
screen -S minecraft -d -m /path/to/craftbukkit.sh
exit 0
screen then starts the craftbukkit script and detaches the session which you can later on list with 'screen -ls' and enter with 'screen -dr' from any console or terminal window.
 
1 members found this post helpful.
Old 10-02-2012, 01:48 PM   #13
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 185

Original Poster
Rep: Reputation: 3
Thank you!

Added the gnome-terminal -e before file and the path and it ran fine! The first time I included it after the path to the script file and thats why it didn't work.

Very Nice...Next time he's over he'll be excited!
 
Old 10-02-2012, 01:56 PM   #14
EODSteven
Member
 
Registered: Oct 2012
Location: Manchester, Tn
Distribution: Ubuntu 14.04, Windows 8, Windows Server 2012. Ubuntu Server 14.04
Posts: 185

Original Poster
Rep: Reputation: 3
Unhappy This is what I need but I'm confused....

Quote:
Originally Posted by unSpawn View Post
Have your startup script run screen:
Code:
#!/bin/sh --
screen -S minecraft -d -m /path/to/craftbukkit.sh
exit 0
screen then starts the craftbukkit script and detaches the session which you can later on list with 'screen -ls' and enter with 'screen -dr' from any console or terminal window.
Gonna try this too but what is the minecraft -d in there...Sorry don't understand this.
 
Old 10-02-2012, 02:01 PM   #15
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,543
Blog Entries: 54

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
See 'man screen'. If it says no such manual page and such you need to install the "screen" package first.
 
1 members found this post helpful.
  


Reply

Tags
background, finding, terminal


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] How to change/set background from gnome-terminal? cola Linux - Newbie 10 05-30-2011 12:34 AM
change gnome startup background under squeeze cccc Debian 3 02-18-2011 08:22 PM
trouble with VNC in gnome-rdp started through terminal via ssh (Xubuntu 7.10) sehku17 Linux - Software 2 05-01-2008 07:47 PM
vi background in gnome-terminal soccercisco Linux - Newbie 3 10-06-2007 01:15 PM
kontact startup script - check if started pbhj Linux - Software 2 12-04-2006 04:41 PM


All times are GMT -5. The time now is 02:06 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration