How to enable 3D chess view in Gnome’s glChess (Ubuntu)

Open a Terminal and type:
sudo apt-get install python-opengl python-gtkglext1

Then open/restart glChess.

How to update grub menu in linux

Open a Terminal and type:
sudo grub-mkconfig

Notes:

  • update-grub and update-grub2 should do the same job; both of these commands are based on the command grub-mkconfig.

How to switch between tabs in gedit using the keyboard

To switch between tabs, press Ctrl+Alt+PgUp or Ctrl+Alt+PgDn. To close a tab, hit Ctrl+w.

How to shutdown ubuntu from the command line

To shutdown ubuntu, type:
sudo shutdown -h 0

This command can be used for other purposes such as rebooting the system (-r). The 0 indicates the amount of time before the systems starts to shutdown which can be an integer or the string now.
see man 8 shutdown

Converting a string to an Integer in C

To convert any char string to an integer, include stdlib.h and use the function:
int atoi(const char *nptr);
see man 3 atoi

/*example*/
#include <stdlib.h>
int main(int argc, char **argv){
	return(atoi(argv[1]));
}
/*check the return status (for linux/bash: echo $? )*/

How to run Java applets in a web-browser (Ubuntu)

Open a Terminal and type:
sudo apt-get install sun-java6-plugin

To install Java fonts (optional):
sudo apt-get install sun-java6-fonts

Sending notifications and other messages to your desktop

To send messages to your desktop (which appear as simple notifications), use notify-send (ubuntu users: sudo apt-get install libnotify-bin).
To send a message, run the following:

notify-send "message"

Example: you can use notify-send to script a little timer:
sleep 5m; while [ 1 ]; do notify-send "Time's up"; sleep 1; done
This script will wait 5 minutes, then display up to seven notice bubbles (at a time) on your screen indicating that “Time’s up”

This has been tested with gnome and might work with other desktop environments.

تغيير مالك الملف في لينكس

لتغيير مالك الملف في ليينكس، قم بفتح “الطرفيّة” الترمينال (terminal) ثم أكتب:

sudo chown [user] [path to file];

حيث يستبدل “[user]” بإسم المستخدم، و “[path to file]” بمسار الملف.
يمكن تطبيق هذا على المجلدات و الأدلة كما يلي:

sudo -R chown [user] [path to directory];

لكي يتم تغير الملفات الموجودة دخل المجلدات (و الأدلة)، نستخدم الخيار “-R”.

(Open Office) كتابة باللغة العربية في أوبن أوفس

Information هذه الخطوات مبنية على الإصدار 2.4. ويمكن تطبيقها على 3.1

لتمكين أوبن أوفس من التعامل مع اللغة العربية بالطريقة الصحيحة (إتجاه الكتابة من اليمين إلى اليسار)، قم بالخطوات التالية: أضغط على قائمة “Tools” ثم إضغط على “Options”. سيظهر لك نافذة تشبه تلك الموجودة في هذه الصورة:

Options - OOo

أضغط على علامة الموجب(+) المجاورة ل”Language Settings” ثم إضغط على Languages. الان قم بتغير الإعدادات المبينة في الصورة التالية حتى تتطابق إعداداتك مع تلك الموجودة في الصورة.

crc

إضغط على OK و ستظهر لديك زرين جديدين على الشريط العلوي من خلالهما ستستطيع تحديد إتجاه الكتابة!

Screenshot



How to Change File Owners in Linux

To change the owner of a specific file, open the terminal and type:
sudo chown [username] [filepath]

This can also be applied to directories, as in:
sudo -R chown [username] [directory]
Usually, you’d want to change the files and directories bellow the directory as well hence the “-R” option (to enable recursive behavior).