LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-23-2016, 05:00 PM   #1
Linux2016
LQ Newbie
 
Registered: Jul 2016
Posts: 6

Rep: Reputation: Disabled
Talking Gedit unresponsive when opened from terminal


Whenever I open a script from terminal, I then exit gedit with ctrl+z, which causes the program to hang for seconds until it ends.
 
Old 07-23-2016, 05:19 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 22,276

Rep: Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542
The program shortcut to exit is ctrl+q. ctrl+z actually sends the program to the background which causes it to appear to hang and then eventually stop.

What are you trying to accomplish and are you trying to send gedit to the background on purpose?
 
Old 07-23-2016, 05:40 PM   #3
Linux2016
LQ Newbie
 
Registered: Jul 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
OK, then it's just a problem of using the wrong shortcut. I'm doing some light scripting on Python which is just stuff printed on the terminal. I don't know what sending gedit to the background is used for.
 
Old 07-23-2016, 06:02 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 22,276

Rep: Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542Reputation: 4542
FYI

http://linux.about.com/cs/linux101/a/multitasking.htm
 
Old 07-23-2016, 06:46 PM   #5
Linux2016
LQ Newbie
 
Registered: Jul 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you for the info.

CTRL+q actually closes the program I'm working with. What I meant to ask was if it was possible to exit gedit 'on the terminal' while it kept working (probably not separable processes?), in order to keep using the terminal while I read/modify the gedit script on its window.

Opening multiple terminals (CTRL+shift+n) allows me to do this but I wonder if it's possible with just one terminal instance.
 
Old 07-23-2016, 07:55 PM   #6
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,780

Rep: Reputation: 425Reputation: 425Reputation: 425Reputation: 425Reputation: 425
I think what you want is Ctrl-Z to stop gedit, followed by "bg" (without the quotes) to unsuspend gedit into the background. Here's how it looks when I did it with geany. Ctrl-Z shows up as ^Z; what I typed is shown in green. I can now worked with geany and with the terminal.
Code:
~$ geany

^Z
[1]+  Stopped                 geany
~$ bg
[1]+ geany &
~$

Last edited by RockDoctor; 07-23-2016 at 07:55 PM. Reason: hit post too soon
 
Old 07-24-2016, 12:36 PM   #7
robertdaleweir
Member
 
Registered: Jul 2006
Location: Canada
Distribution: Fedora
Posts: 93

Rep: Reputation: 11
Quote:
Originally Posted by RockDoctor View Post
I think what you want is Ctrl-Z to stop gedit, followed by "bg" (without the quotes) to unsuspend gedit into the background. Here's how it looks when I did it with geany. Ctrl-Z shows up as ^Z; what I typed is shown in green. I can now worked with geany and with the terminal.
Code:
~$ geany

^Z
[1]+  Stopped                 geany
~$ bg
[1]+ geany &
~$
Hi RockDoctor
Just invoke gedit with the following code
Code:
gedit &
. This will leave your terminal available for use while putting 'gedit' in the background.
 
Old 07-24-2016, 01:32 PM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 17,555

Rep: Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930Reputation: 5930
ctrl-z is suspend, not exit. You can check it by executing: stty -a
Quote:
speed 38400 baud; rows 34; columns 125; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = M-^?; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
And suspend means no terminal i/o is possible, therefore the program will stop immediately when it tries to write to the terminal (or just when it waits for input). Exit is usually Ctrl-C (intr).
 
Old 07-24-2016, 07:49 PM   #9
Linux2016
LQ Newbie
 
Registered: Jul 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by robertdaleweir View Post
Hi RockDoctor
Just invoke gedit with the following code
Code:
gedit &
. This will leave your terminal available for use while putting 'gedit' in the background.
This does exactly what I need. So simple and useful.
 
Old 07-25-2016, 05:27 AM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 20 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924Reputation: 2924
Quote:
Originally Posted by Linux2016 View Post
This does exactly what I need. So simple and useful.
Excellent. If you could mark the thread as "Solved" (see Thread Tools), then that would be great. Many thanks.
 
  


Reply


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] gedit not opening from terminal - not authenticated Higgsboson Linux - Newbie 8 01-15-2015 01:41 PM
[SOLVED] Run commands inside a terminal opened from a terminal.... charlemagne-is-my-son Linux - Software 10 06-16-2014 01:38 PM
gedit - recently opened files yacau Linux - Newbie 3 01-06-2013 06:42 PM
SAN disk becomes unresponsive, and my diagnostics freeze the terminal. pangalactic Linux - Server 2 08-20-2011 01:21 PM
gnome terminal will be opened ram_rajavarapu Linux - Desktop 1 10-23-2008 07:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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