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.

IBus icon doesn’t show on systray? Problem solved

Put this line in terminal:

ibus-daemon -x -r -d

Additional info:

If you are a fan of GNOME Classic no effect as I am, here is a very good trick to add Shutter icon + Ibus Input icon to systray in Ubuntu.

Press Alt + Windows, right click on systray and click “Add to panel”. In the appeared list, choose “Notification Area”.

If Ibus is running and Shutter is running, they should appear there. Magnifique!

Good programming fonts

To begin with, I’m not professional programmers.

There there, you’re a painful programmer and you really care about the font of your code editor, I see. So I collect a few advices from all over the world and put them here.

The important point of the programming font is easy to read, neat and last but not least, the difference between 0 (zéro) and o (or O), you see, with the font of this blog post: 0o0 is a pain in the eye. and on the keyboard, O and zero are placed near each other.

1. Consolas:

Highly recommended by programmers and experts, I see if you love fat font, you can choose this.



2. Ubuntu Mono Regular:

If you’re on Linux, well I guess and hope so, Linux is a perfect place for coding. This font go with the system, and even (this is a small notice) the Space and the Point is greatly defferent if you choose to show the space (this is an option in gEdit, mostly depends on editing theme)


3. Pragmata Pro™:

Just found it this morning, look good to my eyes and I’m kinda like it, one disappointing point is that the space highlight is not so good but anyway, still better than a lot of others)


I recommended only 3 fonts I used and I’m satisfied with what they gave me. Right now my choice is the 3rd.

Hope you find your most favorite and productivitive one.

Tag Cloud