Thursday, January 31, 2013

How do I run multiple commands on a Unix/Linux system without a GUI?

Q. I have a gentoo linux system with no GUI. I want to compile stuff, and while it's running, execute more stuff at the command line. How can I give it one command, then give it more commands without installing a GUI (running multiple terminals) or using SSH?

A. Try to use screen (if it is installed on your system -- read man 1 screen).

You can
- create a new "window" with Ctrl-A c
- kill a "windows" with Ctrl-A k
- switch between "windows" with Ctrl-A <space> and Ctrl-A <backspace>
- you can detach the screen (run in background -- you can even logout -- your jobs will still run): Ctrl-A d
- reattaching:
$ screen -r

That's only for starters. Read the built-in help: Ctrl-A ? and the manual for more information.

Of course you can work with background jobs too, but it will be a quite demanding task when you are juggling between 4 or 5 jobs.
It gets even more complicated when you're using && and || operators or redirections.

You can send your job to the background with either "&" at the end of the line or just by pressing Ctrl-Z (stop) and the executing "bg" command (check your shells manual)
You can "retrieve" a background job by issuing the fg <jobnr> command.

Example:
- start 2 long running jobs:

$ ./compile &
$ ./update_doc &

The & operator marks the end of line, so you could actually use single line instead:

$ ./compile & ./update_doc &


- check the job list:

$ jobs

[1]- Running ./compile &
[2]+ Running ./update_doc &

$ "foreground" the first job and send it back to background

$ fg %1
Ctrl-Z
$ bg

kill the second job:

$ kill %2
[2]+ Terminated ./update_doc

Believe me -- you'll prefer screen ;-)

Edit:
yet another solution -- if you're an Emacs user -- just start your editor, M-X shell, voila! I know some hard-core Emacs users who actually _never_ leave their editor.

How do i convert files to .psx?
Q. I downloaded some roms for a psx emulator, but it needs files in the .psx extension i guess :/ the game came with a .bin file and a .cue file. How do i make this work?

Oh, I am running Gentoo Linux btw, and using pcsx as the emulator, neither of which should matter too much i dont think.

A. Open up either the .cue or .bin file using your emulator

OR

Use the PSX Emulator called "ePSXe"
http://www.epsxe.com/

Configure it and open up either the .cue or .bin file

What distro of linux works best with world of warcraft? also kde vs gnome which one?
Q. I've tried playing wow on ubuntu through wine, and the graphics are all chopy at low settings. But when I play in windows 7 the graphics are fine? Is there a better distro that will not make the game so choppy? (Like emulate windows drivers) also is arch linux, gentoo, or saybian good for this game or 3d drivers in general?

A. The choice of distro does not really affect performance to that degree; the presence of suitable drivers does. You may wish to try installing the proprietary drivers for the video cards.

https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia
https://help.ubuntu.com/community/BinaryDriverHowto/ATI

The choice of KDE or GNOME should not really impact gaming, though you may need to disable Compiz or compositing in KDE temporarily. Arch Linux and Gentoo do not ship proprietary drivers by default. Sabayon does include them, but that is because of a difference in opinion / politics, not technical.



Nec Projector Review

Plastic Shed Reviews

Ati Graphic Reviews

Nurse Uniforms Reviews

Cabochons Reviews

Inflatable Water Slides Reviews

Barcode Scanner Reviews

No comments:

Post a Comment