Useful Gibberish

Posts tagged ‘linux’

Feel more powerful in Ubuntu: kill all

This is some useful trick to kill task in Ubuntu (draft)

  • ps and kill

ps -A
sudo kill -9 pid

With the pid is the number we get from the first line.

  • Feel like windows’ task manager:
    sudo gnome-system-monitor
    This will open the system monitor tool, there we can view CPU+ Ram information, and a list of running program, kill what you need there by right click and choose End Process or Kill process

Those two methods can come to handy when we’re stuck, for example, in Ubuntu Software Center, that a package is not dpkg completely and the dpkg folder is locked and we can’t install another software due to this (installing apps in Ubuntu is one by one)

List of 5 (-1) apps you need on your Ubuntu as a newbie programmer

Everybody is not the same, but I assume that when you move to Linux in general, and Ubuntu in particular (Kubuntu, Xubuntu etc…), you will work with code, terminal .. a lot. So here is a list of very necessary apps that definitely should be installed on your lovely ubuntu machine. I’ll pass Synaptic Package Manager since it’s very popular (but it’s not installed by default for fresh Ubuntu, at least 12.04, I haven’t try another Ubuntu’s version yet), or ThunderBird, I will concentrate on apps that are useful, but probably not 100% people will know.

1. Ubuntu Tweak:

Don’t understand why it’s still not put in official ubuntu repository, since it’s really useful and give us a lot of shortcuts to system utilities: clean cache, modify desktop etc…

Link to apps:

2. VLC player: (all people know it)

This is a big, generous guy that does stuff smoothly, and this is one of the reasons why opensource users should be proud of: support almost every file type, fast, a lot of tools to play with. On Windows, before VLC, I use Media Classic, I also try WinAmp, Foobar, WMP, but with VLC, I forget them right away (and android users, FYI, VLC is available for you too)

3. System Indicator:

Ubuntu leaves us a system tray to put there useful informations, one of them should be the system indicator

Install it by

sudo apt-get install indicator-multiload

This will show us the CPU, Memory, Network… usage information as a dynamic diagram, also provide us a shortcut to system-monitor, just like Task Manager in Windows.

4. Geany IDE:

We can call this a text editor, but the way Geany helps us coding Python and some other languages is just genius. Clean text, easy commenting, intergrated terminal with clean view etc make it better for developper than gEdit, also, it’s easier than VIM. If it helps we do the jobs, it’s useful, just that simple.

Geany can be found in Ubuntu Software Center with ‘geany’ keyword.

5. Right Click Open Terminal here in nautilus.

If you’re using GNOME desktop and nautilus as your default file explorer, then the tool ‘Open in terminal’ in the context menu when clicking right click when you’re in some folder turns out to be extremely useful, trust me. The terminal will be open right there, with the path already into that folder, no need Ctrl+Alt+T and cd to that folder.

That utility can be installed by

sudo apt-get install nautilus-open-terminal

After installation is finished, restart nautilus, you’ll see that option when right-clicking in the folder, pretty awesome, huh? I stop at this point, there are still a lot of other apps (free + paid) but 5 is a nice number. Next time we’ll talk a bit about C++, Android tools, and some graphics tool for Presentation and Illustration.

Restore NVidia display on Ubuntu 12.04 after suspend mode

Suốt ngày lỗi kĩ thuật, đm. Nguyên đống kết quả chạy cả tối mất sạch, phát nản.

When reopen from suspend mode of a NVidia PC, probably we will see a fucking weird mess of color (display problem), to solve it, do as below:

1. Ctrl + Alt + F1, log in as usual via terminal

2. Run code:

sudo service lightdm restart

That’s all, the graphic log-in interface should appear.

For the lost data, sorry.

Side note: Linux + Windows 8

To boot Linux, enable the Legacy Boot Option. (ignore the raid notification for the mean time)

To boot Windows 8: reactivate UEFI boot mode. (Win8 seems slower though, maybe no more SSD’s strong points).

I hate this world.


Add PATH in Linux

For a custom built/compiled package, normally Linux won’t recognize it be default (like just typing matlab to open matlab).
There is a simple trick to do that (I play with Linux for almost 2 years but I just discovered this, how lame):
1. Copy the palce of the BIN folder (where the execute file located).
2. In home folder, Ctrl+ H to reveal hidden file, search for .bashrc
3. Edit it by adding this line:
export PATH=’path to dir’:$PATH
4. Then log out and log in again.
5. Enjoy, and feel like a genius.

Tag Cloud

%d bloggers like this: