Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Simple question that I feel silly asking
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
merpal
n00b
n00b


Joined: 08 Apr 2005
Posts: 36

PostPosted: Fri Apr 15, 2005 6:23 am    Post subject: Simple question that I feel silly asking Reply with quote

Being new to linux, I'm not too keen on all these funky keyboard shortcuts, although they are useful.

I'm running gentoo without a window manager, as it's on an older computer and it needs all the ram it can get. :D

In another thread, a user says

Quote:
and let stuff compile in the background, you'll hardly notice anything.

How do you "switch" out of an emerge? Is there a way to open another terminal/console? (sorry if I'm using the wrong terminology)
Back to top
View user's profile Send private message
Xaid
Guru
Guru


Joined: 30 Oct 2004
Posts: 474
Location: Edmonton / Alberta

PostPosted: Fri Apr 15, 2005 6:26 am    Post subject: Reply with quote

well, if u're not running X, you can either use the virtual consoles (F1 -> F11 or so), or you can emerge GNU screen and then you can have one "screen" doing emerge, another doing running irssi, another doing something else...
I hope that answers your question :)
Back to top
View user's profile Send private message
evader
Apprentice
Apprentice


Joined: 10 Dec 2004
Posts: 180
Location: Australia

PostPosted: Fri Apr 15, 2005 6:39 am    Post subject: Reply with quote

Let me give you a bit of a longer answer...

Let's do this as an exercise.

Code:
emerge -v screen


As that is happening, press alt-f2.

Now you're at another login prompt!

Login as a normal user.

Press alt-f3.

Yet another one!!

Press alt-f2 to go back to the terminal you just logged in at, and exit.

Code:

exit


Now, press alt-f1 and wait for Screen to finish compiling.

When it's done, type:

Code:

screen


Now, look, back at just another empty login prompt? Not really.... type:

Code:

uname -a


This is just an example command for this next trick. You could have executed any command here, such as emerge --sync, emerge -Du world... whatever.

Press ctrl-a-d. That's hold down ctrl, press a then press d.

[detached] should appear.

Now your out of the Screen session, and back at the login prompt.

Type:

Code:

#hello world


And press enter. This is again just an example command. You could have done anything.

Now, type:

Code:

screen -r

That's shorthand for 'Reattach to my Screen session'.

Enjoy.

Search the forums for screen help. I posted a bit of a detailed command explanation there.


Hope that helps.

evader
_________________
//Take this barrel and end this struggle
Back to top
View user's profile Send private message
merpal
n00b
n00b


Joined: 08 Apr 2005
Posts: 36

PostPosted: Fri Apr 15, 2005 7:07 am    Post subject: Reply with quote

evader wrote:
Let me give you a bit of a longer answer...

Let's do this as an exercise.

Code:
emerge -v screen


As that is happening, press alt-f2.

Now you're at another login prompt!


That does nothing. :x

Do I need something running first?
Back to top
View user's profile Send private message
RuiP
l33t
l33t


Joined: 15 Jan 2005
Posts: 643

PostPosted: Fri Apr 15, 2005 7:45 am    Post subject: Reply with quote

is not alt+F2 is ctrl+alt+F2 (or F3 or F4... if you are now at F2)
Back to top
View user's profile Send private message
HAL_9000
Tux's lil' helper
Tux's lil' helper


Joined: 29 Sep 2004
Posts: 114
Location: Netherlands

PostPosted: Fri Apr 15, 2005 8:41 am    Post subject: another hint :) Reply with quote

Screen is ideal to detach processes (read: to make them independent) from their terminal,
but for simple commands with little or no output that need to run for a while, you can use a & to get the command prompt back immediately...

example:
Code:
 odyssey root # updatedb &


:)
Erik
_________________
We are the keepers of the sacred words: Ni peng and Nee wom!
Back to top
View user's profile Send private message
BlackEdder
Advocate
Advocate


Joined: 26 Apr 2004
Posts: 2588
Location: Dutch enclave in Egham, UK

PostPosted: Fri Apr 15, 2005 10:34 am    Post subject: Reply with quote

RuiP wrote:
is not alt+F2 is ctrl+alt+F2 (or F3 or F4... if you are now at F2)
The ctrl is only needed when switching away from x windows. For normal consoles just alt is enough
Back to top
View user's profile Send private message
merpal
n00b
n00b


Joined: 08 Apr 2005
Posts: 36

PostPosted: Fri Apr 15, 2005 2:01 pm    Post subject: Reply with quote

Alt + Fx and Control + Alt + Fx do nothing. This is a standard American 101 key keyboard.

I did a stage 3 installation using the latest stage available on the gentoo mirrors as of yesterday, then genkernel'ed. When I emerge'd links and irssi, I believe the X server was one of the dependencies.

Any clues? It's annoying having to wait while PHP and MySQL compile. :/

Edit:
I'm not using a window manager, but I might install Fluxbox so I can do more than one thing at a time on this system. :|
Back to top
View user's profile Send private message
SilverOne
Apprentice
Apprentice


Joined: 10 Nov 2003
Posts: 161

PostPosted: Fri Apr 15, 2005 2:24 pm    Post subject: Reply with quote

Just to make sure we get this right:

Are you physically at the machine, or using a remote connection? (remote connections do not work with multiple consoles, but the "screen" program still works).

If you are at the machine, try using the other Alt key (linux differentiates between the two, so you might need to use the other, I believe the left Alt key should work).

Hope This Helps
Back to top
View user's profile Send private message
merpal
n00b
n00b


Joined: 08 Apr 2005
Posts: 36

PostPosted: Fri Apr 15, 2005 3:20 pm    Post subject: Reply with quote

YES, I was using the right alt key. The left alt key + Fx works perfectly. <3

Thank you all for the help.
Back to top
View user's profile Send private message
enigma_0Z
Guru
Guru


Joined: 29 Aug 2004
Posts: 531
Location: Either lurking here or at my forum (see sig)

PostPosted: Fri Apr 15, 2005 4:26 pm    Post subject: Re: another hint :) Reply with quote

HAL_9000 wrote:
Screen is ideal to detach processes (read: to make them independent) from their terminal,
but for simple commands with little or no output that need to run for a while, you can use a & to get the command prompt back immediately...

example:
Code:
 odyssey root # updatedb &


:)
Erik


Or, if you really want to be spiffy, you can run a command, redirect it's output to null (read dangerous, heh) and send it to the background:

Code:

emerge sync &> /dev/null &


That's what I did before I learn't about ctrl+alt+f1-12
_________________
Check out my...
Website: (CURRENTLY DOWN) http://sledgehammer.ath.cx
Forum: (ALSO CURRRENTLY DOWN) http://sledgehammer.ath.cx/forum/
Back to top
View user's profile Send private message
noobix
n00b
n00b


Joined: 17 Jul 2004
Posts: 68

PostPosted: Fri Apr 15, 2005 5:44 pm    Post subject: Re: another hint :) Reply with quote

HAL_9000 wrote:
Screen is ideal to detach processes (read: to make them independent) from their terminal,
but for simple commands with little or no output that need to run for a while, you can use a & to get the command prompt back immediately...

example:
Code:
 odyssey root # updatedb &


:)
Erik

Also you can ctrl+z to pause, and type fg to resume(or fg <n> if you have a few processes in bg, e.g. fg 1, fg 2 and so on).
Also it's useful to add a few available consoles to default 6 ones into /etc/inittab:

# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
.........
c9:12345:respawn:/sbin/agetty 38400 tty9 linux

The last three F-keys are reserved for X and logs (i have logs tailed there ;) )
Cheers
Back to top
View user's profile Send private message
woZa
Guru
Guru


Joined: 18 Nov 2003
Posts: 340
Location: The Steel City - UK

PostPosted: Fri Apr 15, 2005 6:32 pm    Post subject: Reply with quote

If you want the emerge in the background try reducing it's priority using nice

Code:
nice -n {-20>>19} emerge .....


where -20 is highest priority and 19 is lowest.
_________________
A few months struggling with gentoo is better than a lifetime struggling with windoze!
Back to top
View user's profile Send private message
curtis119
Bodhisattva
Bodhisattva


Joined: 10 Mar 2003
Posts: 2160
Location: Toledo, Ohio,USA, North America, Earth, SOL System, Milky Way, The Universe, The Cosmos, and Beyond.

PostPosted: Fri Apr 15, 2005 6:52 pm    Post subject: Reply with quote

woZa wrote:
If you want the emerge in the background try reducing it's priority using nice

Code:
nice -n {-20>>19} emerge .....


where -20 is highest priority and 19 is lowest.


Or just set

PORTAGE_NICENESS=

in /etc/make.conf
_________________
Gentoo: it's like wiping your ass with silk.
Back to top
View user's profile Send private message
woZa
Guru
Guru


Joined: 18 Nov 2003
Posts: 340
Location: The Steel City - UK

PostPosted: Fri Apr 15, 2005 7:16 pm    Post subject: Reply with quote

curtis119 wrote:
Or just set

PORTAGE_NICENESS=

in /etc/make.conf



I never knew about that! Handy... :D
_________________
A few months struggling with gentoo is better than a lifetime struggling with windoze!
Back to top
View user's profile Send private message
merpal
n00b
n00b


Joined: 08 Apr 2005
Posts: 36

PostPosted: Fri Apr 15, 2005 10:00 pm    Post subject: Reply with quote

Ok, thanks for all the tips guys. I appreciate it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum