As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label Linux. Show all posts

i7tt is a nice CPU temperature monitor. It draws each core in line chart in Braille and groups all cores in a bar chart for overview, which uses different colors to indicate the temperature ranges.

https://lh3.googleusercontent.com/-gxgTmi78oOo/Vq70K_gMmvI/AAAAAAAAJGw/aQ5v-fbdYnI/s800-Ic42/i7tt.gif

There is only one command-line option for average period. It uses coretemp drivers sysfs interface to get the data.

i7tt was created by Marios Andreopoulos on 2015-08-19, written in Go with termui under the GPLv3, currently git-3335dbb (2015-11-20, post v1.03 (2015-08-28)).

Back into Orbit is a fun shooter game in X Window, said a simple isometric shooter roguelike.

https://lh3.googleusercontent.com/-gpXg4RYyeeQ/VqL6PgdMtAI/AAAAAAAAJBg/W-_etU9ni4Y/s800-Ic42/back_into_orbit.gif

You shoot some black robots and green device which generates some kind of wave harming your health if you stay within the range. There is also different colors of cones that transport you to different locations. Some are really bad as you are ambushed.

Enemies and devices might drop coins, which might be used in a shop area. Never lived that long to try. The bigger robots shoot.

Back into Orbit was created on 2015-06-11, written in C with SDL2, GLEW, OpenGL 2.0+, and Assimp (Open Asset Import Library) under GPLv2, running on Linux and Windows, currently git-dc03083 (2016-01-21).

Pymux is a terminal multiplexer and a clone of tmux, but with some improvements, such as autocompletion menu as you can see below.

https://lh3.googleusercontent.com/-ZJVBn-JMjsQ/VpGbIiK3xOI/AAAAAAAAI4o/ZEfAn_67O88/s800-Ic42/pymux.gif

Panes have titlebar, which shows process command name, window title, also information from like using copy-mode. Using fish-style command-line suggestions, it also has 24-bit color support.

Pymux was created by Jonathan Slenders in 2014, written in Python 2/3 with Pyte, docopt, prompt_toolkit, and wcwidth under the New BSD License (3-clause), currently git-9877c9e (2016-01-09, v0.5 (2016-01-05)), works on Mac OS X and Linux.

ASCII-Pony is a screenshot information tool, but it does not display distribution logo like screenFetch, ponies from My Little Pony: Friendship Is Magic (2010-) instead, which is an animated television show for children.

https://lh3.googleusercontent.com/-4firlCDbHHk/VohyIxUeyII/AAAAAAAAIyM/l6fTI8UqOXQ/s800-Ic42/ASCII-Pony.gif

The script is even named systempony, how fitting to this pony overloading tool. You pony it for screenshot, pretty sure its a verb. As for what it actually mean, I have no clues.

PseudoBusy is not for you to slacking on job, but a noninvasive, nonintensive, screen saver.

https://lh3.googleusercontent.com/-H-lAn_bvRqA/VnyR4SEhzRI/AAAAAAAAIt8/16-4npxuOek/s800-Ic42/PseudoBusy.gif

It comes with a simple packager, so you can pack all scripts into one executable, it would be easier to move a single file.

This script actually reminds me of some scripts that help you to produce busy screens, such as compilation or whatever need to be filling up the entire screen with nonsense texts.

PseudoBusy was created by Brandon Dreager on 2015-06-03, written in Python 2 under the MIT License, currently git-efe324e (2015-12-24), for Linux, Mac OS C, and Windows.

Wanderer (GitHub) is a Boulder Dash (1984) like game, originally written in K&R C now C99 for UNIX and released on Usenet comp.source.games in 1988. Later, it was ported to different systems, MS-DOS, Atari, Amiga, BBC Micro, and SCO-Unix. Some even in graphics mode.

https://lh3.googleusercontent.com/-Jr4yFDckp3c/Vmt9HwJ1zjI/AAAAAAAAInU/Iw8Ts3L2G7I/s800-Ic42/wanderer.raw.gif

Wanderer

To clear a level (screen) is to collect all the diamonds, stay alive, then head out through the WAYOUT.

Few days ago (2014-06-21T10:19:46Z), I was very surprised to discover the --pretty format of uptime, when I ran it with -h, which I never did before:

-p, --pretty   show uptime in pretty format
-s, --since    system up since

Neither had I read uptime(1), it was first times to do both. I was wondering how my dzen status calculated the uptime, which should be from /proc/uptime not uptime command. Anyway, I started to find out when the pretty format was added.

The feature #3e7f78d was added after 2012-02-22 via a pull request1. Here are some outputs of uptime:

$ uptime -p
up 1 week, 5 hours, 21 minutes

$ uptime -s
2014-06-20 10:51:41

$ date -d "$(uptime -s)" +%s
1403232701

$ echo \
  $((($(date +%s) - $(date -d "$(uptime -s)" +%s)) / 3600)) \
  hours
173 hours

$ td.sh $((($(date +%s) - $(date -d "$(uptime -s)" +%s))))
7 days 5 hours 22 minutes 36 seconds

The last one uses td.sh, which is actually the main reason why I wondered how my dzen status does the calculation, it uses td.sh to convert seconds into human-readable time duration. At this moment, I am currently in the process to transform it into a C and GNU Autotools learning project, although I havent yet made any progress. Too many things to do, and too little time.

Since we are talking about human-readable and pretty print, you might also want to know we have dmesg --human.

[1]https://gitorious.org/procps/procps/merge_requests/2/diffs is gone with Gitorious.

I came across Glances, a system monitoring program written in Python, as its name hints, it enables you to review system information, status, or resource usage in just a few glances. As you can see from the screen shot above, all information in one screen.

  • CPU: Glances probably the only few programs which display the details of what CPU spends time on rather than just a simple percentage of utilization. How much time it's idling or waiting for IO? For example, iowait is an useful information, when disk is busy, more or less it could slow down the system for different reasons and by reading iowait, you know some heavy IO activity is going on.
  • Load average: It's same as uptime gives, the load average of past 1, 5, and 15 minutes.
  • Memory and Swap: Like CPU, more detail is shown, such as buffered, cached, active, or inactive memory. Similar to free command output.
  • Network: Each interface's bandwidth usage, upload and download rates. You can press B to switch unit between bit/second and byte/second.
  • Disk I/O: Read/Write rates on partitions and devices. Not only physical storage devices but also optical devices.
  • Mount points: Similar information you get from df command, such as total size, used space, and available size.
  • Processes: Like htop or top, you can use keys to choose sorting fields.
Glances shows information as much as they can be fitted in terminal window size. You can turn off sections by keys, separately, if you don't need them.

It also support server mode, a client can use XML-RPC call to get the system information in JSON format. It's possible to write your own client if you don't like default text-based client or you can write a GUI or web interface to display the data. It supports Linux, Mac OS, and Windows, although no default client for Windows, it will only runs as server due to no curses module available on Windows platform.

Glances is only one-year-old, first released on December 4, 2011, there are many possibilities for improvements. For example, configuration file for colors or disabling sections by default. Also custom fields for processes, and the list can go on and on.

I was intrigued by its name when I first heard of it and the idea behind this program is useful and simple. You don't need to run several programs to get all information of a system. You can have everything on one screen, even status of multiple systems at same time with client/server mode and terminal multiplexer.

This date is the fifth anniversary of being a full-time Linux user. Five years ago, I made a decision to switch to Linux, it was a great call. During the years, I have learned a lot with Linux. Before Linux, thats 15 years with MS-DOS and Windows series. Do I miss Windows? No, but odd enough, I like the time with MS-DOS.

https://bitbucket.org/livibetter-backup/my-os-timeline/raw/default/mot.png

Because of this post, I finally finished the timeline chart I posted two years ago. Actually, it didnt need much editing, only to mark that I was no longer using Arch Linux and Mac OS X.

To me, Linux is the best Operating System and Gentoo is the best distribution, which I have been using for three years. All because Linux has lots of choices and transparency.

I chuckled when I said choices, if you know me in person, I am terribly awful in making decision from choices. I could stand in front of store shelves for ten minutes, just to think which drink I want. Before I check out, I might run back to switch. Strangely, I seem to know what I want from Linux.

On Linux, there are plenty for alternatives just for almost anything. Not to mention dozen of actively developed Desktop Environments and Window Managers. It is full of options, if you dont like one, you always can find another to try until you are tired.

As for transparency, it means in many aspects. On Linux, you most likely to have a lot of open source projects. The code lies in public, there is no secret, no hassles no BS. When something is broken, you know where to look at if thats possible to fix on your own, or you can report a bug.

For me, Linux is all good, but possibly not for other computer users. I would say you need to invest some time with, nonetheless what doesnt need if you want to be good at it? If you are someone who can code and is willing to read, Linux can save a lot of time. Its been lots of times that I type in a one-liner script in shell and leave it to work. The most valuable part in Linux, I say that would be common command-line programs.

20+ years with computers, thats more than two thirds of my life. Its amazing, now come to think about it. Before this post, I never really calculated how long I have been using computers. At the beginning, to put it in a funny way, before I actually was told about and had seen a computer through my eyes, a television and a washer probably were the most advanced machine I had touched.

Over these years, computer gets smaller, faster, cheaper, and sadly fancier. I always have a feeling that computer does exactly the same thing except some fancy stuff are added for fooling user to think they are doing more powerful things, only the energy is wasted in processing the fancy stuff. Its funny to hear people talk about green and emphasize the awareness of any good intentions, how they try to make a change, but what they actually do is wasting more.

As most people go after pleasure, I went opposite direction, looking for things actually get job done without beautiful gift wrappers. However, this is just personal preference, there is nothing absolutely right or wrong in my opinion. The only problem is my life is quite boring since the scripts and codes I wrote have taken care most of tasks for me, the only thing I need to do is to read generated reports in plain text format mostly.

Computer is one of the most important invention in modern world and it will always be in human history. The importance of it is undeniable, sometimes, I wonder if I could live without it and Linux.

There was an incredible idea posted early this month in Linux kernel mailing list by Paul E. McKenney:

Although there have been numerous complaints about the complexity of
parallel programming (especially over the past 5-10 years), the plain
truth is that the incremental complexity of parallel programming over
that of sequential programming is not as large as is commonly believed.
Despite that you might have heard, the mind-numbing complexity of modern
computer systems is not due so much to there being multiple CPUs, but
rather to there being any CPUs at all.  In short, for the ultimate in
computer-system simplicity, the optimal choice is NR_CPUS=0.

This commit therefore limits kernel builds to zero CPUs.  This change
has the beneficial side effect of rendering all kernel bugs harmless.
Furthermore, this commit enables additional beneficial changes, for
example, the removal of those parts of the kernel that are not needed
when there are zero CPUs.

Who would have thought the solution is just that simple, zero CPUs. All problems will be gone as long as you have zero CPUs. No more unexpected bugs and developers wouldn't be stuck in complex of design. Zero is the one.

If you think that's ultimately optimal choice, then you are mistaken. Less than five hours later, Eric Dumazet brought up another concept which makes the entire kernel ascends to completely different and extraordinary level. No one has foreseen it until now:

Hmm... I believe you could go one step forward and allow negative values
as well. Antimatter was proven to exist after all.

Hint : nr_cpu_ids is an "int", not an "unsigned int"

Bonus: Existing bugs become "must have" features.

Of course there is no hurry and this can wait 365 days.

Using opposite to negate the disadvantages of having CPUs. As if matter-antimatter collides, which results the energy generated much more than by options we have today. We may have several orders of magnitude greater than currently most powerful CPU's processing capability.

Lucky for Linux user, this technology doesn't need to wait for long. Less than 365 days to go. Since then, our Linux box will be able to do almost everything in a split of a second, which needs an hour or so at the moment.

No doubt that the major OS developers will try to patent it. Someone with good heart has to prevent such thing from happening and allows everyone to use this new concept freely. This is the future of human beings, not just computing, we can not afford being ruined by corporations.

As a Windows user

Don't you dare to say PC! Damn you, don't even know of the OS you are using.
  1. Search for it, click on first software directory website, go through a few pages, close it, try second website...
  2. Download it.
  3. Double-check with anti-virus software.
  4. Triple-check with another anti-virus software.
  5. Install it while praying that it really doesn't contain any viruses.
  6. Run it.
  7. Figure out which Next button to click...
  8. Job done.

As a Mac OS X user

You... uhm... I got nothing to bitch.
  1. Go to App store.
  2. Search for it.
  3. Slide, Slide, and Slide.
  4. Pay for it.
  5. Install it while paying for additional copies for your i[whatever] and i[whocares] and i...
  6. Run it.
  7. Job done.

As a Linux user

Alright, GNU/Linux user, happy?
  1. Search for it with package manager.
  2. Install it.
  3. Run it.
  4. Job done.
or
  1. Search for it.
  2. Download source tarball.
  3. Compile it while joining on #[channel].
  4. Install it.
  5. Run it.
  6. Job done.
or
  1. #!/bin/bash or whatever Shebang line you nerd at.
  2. Code it.
  3. RTFM.
  4. Test it.
  5. RTDFMA (Read The Damn  Fucking Manual Again).
  6. Fix it while cursing why a library sucks.
  7. Run it.
  8. Job done.

Please don't take anything above seriously, just for fun and they may not all be true.

I used to run the following commands to find out if a command exists (besides using Bash auto-completion if it's executable in PATH) and what kind of the command is:

$ type which
which is /usr/bin/which
$ file /usr/bin/which
/usr/bin/which: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

And I am not kidding you, I manually typed /usr/bin/which in the second command to find out the file type. file requires a full path. I feel little embarrassed. :) But, it's nothing wrong with it.

However, the better ways can be:

$ file `type -p which`
$ file `which which`

Note that type is a Bash shell builtin command (can differ from your environment), which is a normal program. You can also use locate for file'd a list of matched files if you only have partial filename. All three commands can accept a number of filenames.

Gentoo is a source-based distribution. The main benefit of using Gentoo is you pick features of a software you need to compile if its configurable. Here is an example I just saw:

% emerge -pvuDNt world

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R   ] www-client/chromium-7.0.503.1  USE="sse2 -cups -gnome -gnome-keyring%" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

The developer just made GNOME Keyring dependency optional if you use gnome USE flag. That cups USE tag is an example, too. When Chromium just added printing support, they have made CUPS dependency necessary. It got fixed quite fast, in just a few days, Gentoo developer fixed it.

Note

I couldnt find an issue about it on Chromium issues, but it seems fixed in upstream because I dont see any patch in Portage tree.

Anyway, after CUPS, GNOME Keyring suddenly jumped out from nowhere. I already had GNOME Keyring on my system, but I didnt have CUPS. So, I let Chromium to compile with it, I didnt have a choice. Now, we have new USE flag.

If you are using any binary-based distribution, unless you try to build on your own or with some tools, your system is always with a bunch of stuff you dont need. And you never could have even a vague idea what have been made.

I still have some packages depends on GNOME Keyring, I should check them up again, some are optional, some might have no need to be on my system.

% equery d gnome-keyring
[ Searching for packages depending on gnome-keyring... ]
dev-vcs/subversion-1.6.12 (gnome-keyring? gnome-base/gnome-keyring)
gnome-base/gnome-mount-0.8-r1 (<gnome-base/gnome-keyring-2.29.4)
gnome-base/libgnome-keyring-2.30.1 (>=gnome-base/gnome-keyring-2.29)
net-libs/libsoup-gnome-2.28.2 (gnome-base/gnome-keyring)
sys-auth/pambase-20100310 (gnome-keyring? &gt;=gnome-base/gnome-keyring-2.20[pam])
www-client/chromium-7.0.503.1 (&gt;=gnome-base/gnome-keyring-2.28.2)
                              (gnome-keyring? &gt;=gnome-base/gnome-keyring-2.28.2)

Another interesting thread got me, I subscribed to the updates when it was just posted. I was wondering how they got someone to use Linux, especially the older. I had tried but I had no victims so far. ;p

The discussion went normally until post #17. In case the post or thread got removed. I saved a screenshot.

Thread of My mother now uses Arch Linux

Wtf? (Updated: that post got moderated)

This thread is getting more interesting... The OP replied something:
... I know that when I get older and get married, I'm going to be running a Linux house. It may seem horrible of me, but I couldn't marry a Windows user. I'd compromise with OS X, probably, if that's what my wife really prefers. It's that important to me...
Serious?

Fall Of Imiryn is the name of the RPG game and Annchienta is the game engine it uses. The game is written in Python and the engine is written in C++ with Python binding. It runs on Linux and Windows. The installation process is easy (I use Gentoo), you only need to follow the steps on the web pages. If you dont want to install the engine on your system, simply copy the shared library (src/_annchienta.so) and Python binding module (modules/annchienta.py) to Fall Of Imiryns directory and run the game.

I knew this game via a post on Arch Linux forums, the poster has put it in AUR. Its not a long story game (rev903). I posted it because its written in Python. Here is some screenshots:

http://4.bp.blogspot.com/_CLdf4ORfzWk/SuqK8_7k1tI/AAAAAAAACUQ/9m6IZmyS3LU/s800/2009-10-30--10:48:04_800x600.png

Story begins

http://3.bp.blogspot.com/_CLdf4ORfzWk/SuqLCSBRTvI/AAAAAAAACUY/XTi1FpMUO0s/s800/2009-10-30--10:46:16_800x600.png

Scene Transition

http://3.bp.blogspot.com/_CLdf4ORfzWk/SuqLPp7sMXI/AAAAAAAACUg/MLh3udMxm-g/s800/2009-10-30--10:51:25_800x600.png

Heal and save point

http://3.bp.blogspot.com/_CLdf4ORfzWk/SuqLUCB6xAI/AAAAAAAACUo/HF54zQK-IvI/s800/2009-10-30--11:09:03_3360x1050.png

In-game small game

http://1.bp.blogspot.com/_CLdf4ORfzWk/SuqLYQLPfDI/AAAAAAAACUw/CFcyVe2TMt0/s800/2009-10-30--11:14:00_3360x1050.png

Alright, you caught me cheating!

The story is quite short (if you cheat). I dont think this game is near completion because you can not have any real settings to set, such music/sounds on/off. But its definitely playable.

Since its written in Python, I believe its easier to work on if you want to join the development. The default screen size is 400x300, but you can double it or more if you edit the source. I am not a gamer, so I couldnt give any comparisons. I have to disable the music and sounds, I am not used to listen to all RPG games music. (for f in music/*.ogg ; do cp /path/to/blank.ogg $f ; done, if you wonder how I disable the music and sounds.)

Lastly, let me give you few memorable quotes (revealing by selecting):

Avril: What the fuck?! March: Avril, language.

Avril: Yeah right, you fucking monster! You cannot treat Laustwan like that. If this is the way of the Fifth Guard, then it you can stick it right up your March: Avril, language.

Avril: What the fuck are you talking about? March: Avril, language.

I havent been tagged before and still not. I just want to start one tagging game. So if you are not visiting via search engine, you must be that lucky person, or not so lucky. :)

1   First, my lists:

1.1   5 GUI Programs:

  • Firefox: Do I need to explain about this?

  • Amarok: I used to use Rhythmbox, but I found Amarok is better for me. Its the only KDE/Qt program that I constantly use.

    Note

    In April, 2009, I switched to MPD. (2015-07-21T22:59:35Z)

  • GnuCash: Keep my poor money flow clearly. SHOW ME THE MONEY!

    Note

    In October, 2009, I stopped using it. (2015-07-21T22:58:55Z)

  • gmplayer: You always need a media player. Totem is not so good for me, its just too GTKish.

    Note

    In May, 2009, I switched to SMPlayer. (2015-07-21T22:58:28Z)

  • Gimp: A place let my inner child out.

1.2   5 Command-line Programs:

  • GNU/Screen: The first command that I type into terminal. Tabbing FTW!

    Note

    In November, 2009, I switched to TMUX. (2015-07-21T23:03:30Z)

  • Vim: My favorite editor. Sometimes, I still open gedit, but I try to save by typing :wq, and that also happened in Firefox before I using Vimperator extension.

  • Yum: Its yum and gets my system up-to-date!

    Note

    In April, 2009, I switched to Gentoo Linux, therefore Portage replaced Yum. (2015-07-21T23:03:34Z)

  • rTorrent: My torrents downloader, I dont like GUI programs for downloading torrents, they are just resources waster, sorry!

  • g: Technically, its not a program, its just a Bash script. It helps me switch directory quickly, and I am shameless to put it in list, because its written by me.

    Note

    In January, 2014, I switched to qfi. (2015-07-21T22:53:46Z)

2   Now about the tagging game:

2.1   Being Tagged?

If you are tagged, Im sorry for that. I meant wow! Great! You need to

  • List 5 GUI programs that you cant live without.
  • List 5 Command-line programs that you cant live without.
  • Report the damage your blog posting to your tagger.
  • Tag some victims, I meant some people who use Linux.
  • Maintain a list of whom you tag.

If you just happened to read this posting and want to try, go ahead. Dont forget to leave a link to your post.

2.2   I Tag These People:

  • ardsrk from the comments below.
  • I am tagging and waiting from them.

I thought I needed to do some tricks in order to put them all together, but it turns out none is needed. The following is cited from README:

Installing multiple versions
----------------------------

On Unix and Mac systems if you intend to install multiple versions of Python
using the same installation prefix (--prefix argument to the configure
script) you must take care that your primary python executable is not
overwritten by the installation of a different versio.  All files and
directories installed using "make altinstall" contain the major and minor
version and can thus live side-by-side.  "make install" also creates
${prefix}/bin/python which refers to ${prefix}/bin/pythonX.Y.  If you intend
to install multiple versions using the same prefix you must decide which
version (if any) is your "primary" version.  Install that version using
"make install".  Install all other versions using "make altinstall".

For example, if you want to install Python 2.5, 2.6 and 3.0 with 2.6 being
the primary version, you would execute "make install" in your 2.6 build
directory and "make altinstall" in the others.

All I did is:
./configure --prefix=/usr
make
su -c "make altinstall"
for both Python 2.6.1 and Python 3.0.

Since Python 3.0 is compatible with current any Python programs, never make install Python 3.0 unless you are 100% sure your system doesn't use Python scripts for system maintenance. On Fedora, Yum is very important Python script. If you have done, rpm and Koji are your savers.

As you can see on Koji, Python 2.6 seems to be the primary version on Fedora 11.

When I make 2.6, there are few bits missing:
Failed to find the necessary bits to build these modules:
bsddb185           dl                 imageop
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

After checked the setup.py, I think they are not necessary on my system.

Hooray! I am using Microsoft Word!

Here is how I install:
- Download the Microsoft Word.
- Move or unpack the package to ~/Desktop/word_package/ with your Archive Manager, that package is a PKZIP+SFX. If your Archive Manager can't unpack it, you can run it in DosBox to unpack.
- Install DosBox. If you are using Fedora, you can install by yum install dosbox.
- Run DosBox.
- You need to mount your ~/Desktop, please run: mount c ~/Desktop
- Switch to C Drive: c:
- Enter the directory: cd word_package
- If you haven't unpacked it, you can run the Wd55_ben.exe (No ./, it's DOS!)
- Then run setup.exe and follow the instruction on screen. I didn't update any system things while installation. If your arrow keys do not work, please read the next; if they do work, skip next.
- On Fedora 10 or Ubuntu 8.10 (maybe some others), you need to create an configuration file for keycode issue. Use your favorite editor to create ~/.dosboxrc with:
[sdl]
usescancodes=false
- After you done installation, the Word should be at C:\WORD. Switch to it cd C:\WORD and run word.
I got the link via CLICK and read the resolution of keycode issue in this thread.
This post is written in Microsoft Word 5.5 with DosBox on Fedora 10, saved as RTF, uploaded to Google Docs, then copy-and-paste to Blogspot. However, some styles are applied on Google Docs for readability.



You can download the original DOC and RTF.

This is my new blog for exclusively writing about GNU/Linux  more precisely the Fedora distribution since I use Fedora day by day. My first working distribution is Fedora Core 2 or 3, then I left animal planet for a while. I was back on Fedora Core 6. I have used Arch Linux and Ubuntu for months, but they didn't taste good. I think Fedora is right distribution for me, even though I still have some complaints about it.

Anyway, because of Fedora, I named this blog with it. But, the posts on this blog will not only be for Fedora, they are suitable to other distributions in some degree. I will post things caught my eyes, so this blog is not a comprehensive blog for GNU/Linux or Fedora. This is a personal blog with own notes and experiences.

About the header image, I use this Tux and this Fedora. You can download the final GIMP format file.

Hope you would like this blog and give me some comments!

Sometimes, when you are in shell, you need the current process but also want to run another command. Yes, you are running in GNU/screen, but you think you have enough tabs. What can you do? Use the magic!

Put it in background


Simply press Ctrl+Z. You will be back in your shell immediately. But the process has just been put in background is NOT running. You have to use bg to let it run in background. Use jobs to find its number and run bg 1, for example.

Want it back? Just run fg <num>.

Directly Run in Background


Run program &.

Detach it from Shell When exit


After put in background, run disown -a. You can also make directly nohup program &. However, it will show up in jobs, you can run disown -a to remove it.

When you logout, exit or Ctrl+D, the program won't exit.

This a re-post, originally posted on 2008-09-04 on The Tiny Bit blog.