My adventure with GUST Episode 1 & 2

February 5, 2010 Anxious Nut 2 comments

Well, I’ve been going to GUST with Q8BKman for a while. I go to there just for Q8BKman, I really don’t have anything to do there(really; i’m a KUNIV student). Anyhow, we usually stay in their library (I call it Internet Cafe, PCs are the only things in there). The thing I don’t like about it is that all PCs are running Win Vista, the one i really dislike! BTW, I wasn’t intending to write this, but SIGTERMer suggested, so this time it’ll be 2 episodes :)

Episode 1

Before two weeks we went there, Q8BKman had some stories to print. I had my netboot and my necessary stuff. I got bored in minutes so i did something bad, I shouldn’t do it, but i had to. I got out Ubuntu 9.10 and inserted the cd and started … installing, No i didn’t wipe the whole HDD, i installed it aside to windows (dual booting). Giving ubuntu 10 Gigabytes out of 160 GB, i think it’s fair enough. I continued clicking “forward” until i was asked for the user name and the password, if i entered one only I know, the PC will get formatted and Vista will be back :( . so I used “GUST” as the user name and “lab#123″ as the password, DO NOT PANIC, this password isn’t really a password, cause all other PCs have the same password it’s unified, except the fact the user they log in with has no administrative privileges :) mine -pffft- does. I also didn’t wasn’t students to be freaked out, so i had the option “log in automatically” checked.

Of course I was anxious during the process, I didn’t want to be caught knowing i have no right to do this. But what made me relax a bit was two things, the first is that they had no surveillance cameras in the boys’ section of the library. Second is when i opened firefox, while installing, and googled up a vista screenshot and had it in fullscreen mode.

It didn’t last long, man they have good PCs over there, nothing like KUNIV science library for sure. I then rebooted the system and got my CD back. In 25 secs the desktop was up, i dragged some common applications onto the desktop, to make it easy for those non-linux-experienced ones. Seeing that all they use is IE and Word, i had firefox (enlarged icon), OpenOffice word processor, and Tetris (just for the heck of it) on the desktop. I also enabled Arabic (+1 for this pc, there is only one other PC that has Arabic enabled in the lib, so now they are 2). I had little more time so I quickly started the UpdateManaged and updated the system. It was fast comparing to my home’s, the download rate was 600KB/Sec!!! Seeing that Q8BKman was going to return home, i had to restart the system (for the update), say “byebye” , and leave worried about my new baby.

Episode 2

Before a week, Q8BKman offered me another visit to his university and I accepted of course; i was panicking, needed to check how was my baby doing. We got there in no time, i was in the library in 5 minutes. Got to the second floor aaaaaaaaaaaaaaaaaaaand the PC was switched off :( . I pressed the power button and … GRUB WAS THERE :D . Q8BK started to do his work while I sat down doing my stuff. I first checked if anyone used ubuntu, but it turned none have used it, i checked by seeing “recent documents”, they were what i used last time :( . Anyhow, i was happy that it was still there!

Now that everything was okay, i started by installing “ubutnu-restricted-extras” to let ubuntu be friendly with videos and soundtracks, it was installed in seconds! I didn’t have anything else to install so i thought of the stuff i’d like to try on my PC. It was KDE, so I downloaded/installed “Kubuntu-desktop”. At home it takes a lot to get downloaded, but there … it took only 10 minutes and it was installed. I switched to KDE, it was smooth and cool, cooler than windows, and it didn’t affect the PC’s speed, on my Pentium 4 – 512 MB(ram) PC it usually become slooooooooooooooow. Q8BKman saw me and said “Why did you install another OS?!!” I explained it’s just a desktop environment, and to make it clear to him I installed XFCE (downloaded in seconds!!). Here I have captured a video of my mess!

http://www.youtube.com/watch?v=GOPwcyPP5xw
No, that’s not Xubuntu installed, it’s ubutnu, but when I installed “Xubutnu-desktop” package, it replaced ubuntu’s GDM files with xubutnu’s (both use GDM, kubuntu uses KDM). That’s why there’s a rat on the login screen.

I soon got back to Gnome and started to configure the stuff which students need, and that was printing. I launched the Printer Configuration Manager and searched for printers. The good thing it was able list them, the horrable thing was THERE WAS MORE THAN 20 PRINTERS!!! I needed to configure this since printing is necessary for the students over there, but there were just too many of them, I was confused! I didn’t know what IPs does the boy’s section printers have, nor any clue. All i knew was the name of the printers, LaserJet P2015. I wanted to see printers configuration on the other PCs (windows), but only admins can view it, so I was left with no other choice than trying. “So printer no 1 here we go” and i clicked on “print test page”. Then I heard a sound coming from the girl’s section. I was half laughing half asking a question: “is that a sound of a printer” I asked Q8BKman and he said “Yes” so I laughed extremely laud, he was saying that this was not possible. It turned out that all the printers of the library were listed, the boys’s, girls’s, and the reception’s were in the list. What caught my attention was the Xerox, any person is capable of printing ANY CONTENT from this PC to that machine which is at the helpdesk!! I hope nothing really bad happens. It was really funny, but i had to return home after that:(.

Yesterday was the registration day so i think at laest one person have used it. I’ll find out next time I go there, probably next Monday. And hey, they have ubuntu now.

Ouch, I wrote a lot this time, if you have read the whole thing post a comment. I doubt any will.

كيف تصل إلى جهازك من الإنترنت

February 1, 2010 sigtermer Leave a comment
بسم الله الرحمن الرحيم

لكي تستطيع ان تصل للجهاز من أي مكان في العالم، سيتعين عليك فعل امرين:
1- فتح port في الراوتر/فايروال و تمريره الى ip جهازك حتى تتمكن من الدخول إلى الشبكة الداخلية.
2- استخدام خدمة Dynamic DNS (إختياري، و لكن انصح به بقوة) حتى تتمكن من الوصول الى الشبكة الداخلية.

أولا، سأفترض ان الجهاز موصل للراوتر الأساسي في الشبكة (الموصل بالإنترنت مباشرة). سيترتب عليك تحديد ip للراوتر، و يكون في العادة 192.168.1.1 او 192.168.0.1 (إن لم تغيره بنفسك) يمكنك استخدام arp لتحديده. إذهب إلى أي موقع، أفتح الطرفية (xterm للنكس، cmd لوندوز)، ثم أدخل arp للنكس (arp -a لوندوز).

بعدما حصلت على الـip، استخدم متصفحك للوصول إليه. ان طلب منك كلمة السر، يمكنك اجادها على الموقع التالي:
http://www.phenoelit-us.org/dpl/dpl.html

الآن بعد دخولك على صفحة الراوتر، إبحث عن شيء مماثل لـport forwarding أو Applicattions & Gamming في حالة لنكسيس. أدخل ip جهازك و port الويب سرفر (عادة ما يكون 80) و نوع الإتصال tcp. أحفظ التحديثات. و ستتمكن من بعد ذلك الدخول إلى شبكتك.

أما بالنسبة للوصول إلى الشبكة الخاصة و بالتالي جهازك، يمكنك استخدام ip الحالي للشبكة او استخدام Dynamic DNS. المشكلة في الـip هي انه يخضع لإرادة شركة الموفرة لخدمة الإنترنت. و أعلم شخصيا شخص عمل مشروع مماثل للمشروع الذي تقوم به و لكن يوم التقديم لم يستطع الوصول إلية بسبب تغير الـip. إضافة الى ذلك، فإن بعض الشركات تقوم بتغيير العناوين بشكل دوري!
ولكن للتجارب البسيطة يمكنك استخدام الـip للشبكة. و لتحديد الـip، اذهب (و أنت داخل الشبكة) إلى:
http://whatismyip.com

إن أتبعت الخطوات المذكورة حنى الان ستتمكن من الدخول إلى جهازك من أي مكان في العالم (ما لم يتغير الـip) من خلال:http://ip

أضفة الى ما سبق، يمكنك استخدام خدمة Dynamic DNS. هناك العديد منها، كـFreeDNS ( الموقع: http://freedns.afraid.org) و التي استخدمها منذ عدة سنين، و DynDNS (تفرض قيود إستعمال، على عكس FreeDNS). و كلاهما سيعين نطاق خاص لشبكتك يتغير بتغير الـip مثل JehaziAl3ajeeb.mooo.com :)

يمكنكم الأستفسار من خلال منطقة التعليقات، أو (أفضل) طرح السؤال في القسم المخصص للمنتدى.

Categories: misc. Tags: , , ,

Disqus and Arabic

January 31, 2010 sigtermer Leave a comment

توفر شركة دسكس خدمة “تعليقات مجانية لمصممي الموقع. يمكنم من خلال هذه الخدمة إضافة طريقة يمكن للزوار من خلالها التعليق على أي صفحة HTML. و هذا بلا شك يُعفي المصمم من عبء كتابة برنامج من الصفر ليقوم بهذه العملية. و على الرغم من توفر وجه باللغة العربية، فأن إتجاه الكتابة لا يزال يتجة من اليسار إلى اليمين لمنطقة الكتابة. و للتغلب على هذه المشكلة ستضطر الى تغيير خصائص css المتعلقة بهذه العنصر.

المشكلة التي تواجة الكثير (بما فهم انا) عند محاولة تغيير هذه الخصائص هي أن مهما جربت من طرق، لا يتغير إتجاه الكتابة. سواء بتغير css للعنصر نفسة (textarea) او للإسم (form-message) او حتى ربط وظيفة جافاسكربت لتغير الcss من خلال DOM بحدث مثل window.onloaad لا يجدي نفعا. و السبب يكمن في عدة سطور التي تسبق العنصر textarea. فمعظم الناس يفترض ان textarea موجود على نفس الصفحة، ولكن في الحقيقة موجود بصفحة أخرى مضافة إلى صفحتك من خلال iframe.

أدرك تماماً ان iframe حذف من HTML4.1 strict، و لكن يبدو ان هذه الحقيقة لم تؤثر على من صمم هذا النظام…

لتغير إتجاه الكتابة او أي خاصية أخرى لـtextarea، سيتوجب عليك كتابة ملف css و إرساله لدسكس من خلال متغير جافاسكربت:

<script type=”text/javascript”>

var disqus_iframe_css = “http://نطاقك/style.css“;
</script>

أن لم يكن لديك نطاقك الخاص، يمكنك الربط بالملف http://adnanalliance.org/css/DISQUS.css. لجميع المتغيرات التي يمكنك ارسالها لدسكس إضغط هنا.
لا تنسى إحاطة الجفاسكربت بأكمله بـdiv (أو أي شيء آخر) لتعديل اتجاه الكتابة لباقي العناصر (التعليقات مثلاً).

يمكنكم الأستفسار من خلال منطقة التعليقات، أو (أفضل) طرح السؤال في القسم المخصص للمنتدى.


Categories: web Tags: , , ,

Ubuntu users of Kuwait: get your packages 3x FASTER!

January 5, 2010 sigtermer 1 comment
توضيح: تم تحويل النطاق kw.archive.ubuntu.com ليشير الى ubuntu.qualitynet.net. أي انه لن يفرق اذا غيرت نطاق المستودع الى كوالتي نت اذا كانت تستخدم kw.archive.ubuntu.com بالأصل. ولكن الطريقة المذكورة لا تزال فعالة لمن يريد وصلة مباشرة للمستودع أو لمن لا يستخدم kw.archive.ubuntu.com.

إي يا جماعه عندنا مستودع أبونتو قريب! صدمة مو صح؟ على العموم، جزاكم الله خير يا كولتي.

هناك مشكلة بسيطة و هي انه مهما كنت قريب من المستودع، لن تستخدمه الا إذا حددت هذا المستودع في النظام. أي انك ستستمر في التنزيل من المانية او فرنسا بالرغم من وجود مستودع يبعد عنك ببضع كلومترات فقط. للحد من هذه الظاهرة السخيفة، قام الفريق بإعداد هذا الدليل السريع لتسهيل التحويل الى المستودع المحلي.

الطريقة المعقدة نسبياً:

(مجربة على أوبونتو 8.04 LTS)

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

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

و الان الى العمل، افتح الملف “sources.list” بواسطة برنامجك المفضل (مثال بسيط موضح في الأسفل) و ابحث عن عنوان للمستودع الذي تسنخدمه. على سبيل المثال، العنوان الذي كان في الملف على جهازي يشير الى:
http://kw.archive.ubuntu.com/ubuntu/
قد يختلف هذا العنوان عن العنوان الموجود لديك. بعدما حددت الاهداف، باشر بتبديل كل هذه الوصلات بعنوان مستودع كوالتي:

http://ubuntu.qualitynet.net/ubuntu/
قبل المتابعة، أود التنبيه الى ان هذه العنوان (kw.archive.ubuntu.com) هو الوحيد التي قمت بتبديلها. فتأكد من عدم تبديل أي عنوان اخر، خاصةً العناوين المبنية على http://security.ubuntu.com/ubuntu

لتبديل العناوين بسرعه و سهولة، سأستخدم sed بدلا من المحرر . كل ما عليك فعله هو ادخال هذا الأمر في الطرفية:

sudo cat /etc/apt/sources.list.backup | sed "s/kw.archive.ubuntu.com/ubuntu.qualitynet.net/g" > /etc/apt/sources.list

قم بإعادة تحميل جداول apt:

sudo apt-get update

الطريقة السهلة نسبياً:

(مجربة على أوبونتو 9.10)

في أوبونتو 9.10 يمكنك التحول الى المستودع الجديد بإستخدام الفأرة و البئة الرسومية (طريقة السعبولة المرعصة) …

  • إذهب إلى System –> Administration –> Software Sources.
  • سترى في الوسط قائمة منزلقة بجانبها “Download from”، إضغط عليها و اختر “Other”.

  • ستظهر نافذة جديدة تحتوي على اسماء بعض الدول. إبحث عن “Kuwait”، سترى بجانبها سهم صغير. إضغط عليه و سيظهر “ubuntu.qualitynet.net/ubuntu” فاختره ثم إضغط على الزر “Choose Server”.

  • إنقر على الزر “Close”. سيسألك بتجديد المستودعات. إختر “Reload”.

و الان استمتع بالسرعة الرهــيــــبة ;)

مع تحيات فريق GATOG

I may not be a math person, but WOW.. just WOW!

December 19, 2009 sigtermer Leave a comment

I don’t like mathematics unless i can see an immediate application in areas of my interest (Electronics, Computer Graphics, and Programming in general). I’m one of those guys that try to make up mathematical functions on the spot without the slightest research whenever the need arose. For example, the color of the sky in 8oori was generated by functions the i developed via trial and error (my preferred technique up until now).

But even a non-super-math-guy like me has to admit, Eureqa is one impressive piece of software!

It’s a tool that can be used to detect “equations and hidden mathematical relationships in your data”. In other words, It attempts to find equations that describe your data as accurately as possible. This simply means no need to waste another morning trying to get the right colors! just put in the values you want, and let the software do the the work for you.

Of course, being incredibly late for most of my deadlines, I couldn’t help giving it a spin..

As a sanity check, I tested it in the realm of the most interesting field of mathematics so far; Trigonometry. Using approximate angles of a full radian cycle and sine (we can’t make it too easy for it, can we) as a data set for Eureqa, I started the detection process. surely enough, after a few seconds the program got it!

The 0.001 error is caused by my crude approximation of the angles ;)

no software is perfect, including Eureqa. some of the issues I found were:

  • Restrictive License: I can’t care less about source code, as long as i can use the software as i like, without any exceptions! unfortunately, Eureqas’ license does not allow people to use this version after 2010:

    This license and the permissions to use this beta version of the software expire on Jan. 1, 2011 or at any prior time when the end of the beta is announced by the authors.

  • It doesn’t have a GNU/Linux client to date although the developers stated that they are working on one. so for now, you need to install using wine. install with msiexec

Despite these minor issues, this is one piece of software i’m glad I took the time to explore.

Categories: Software Tags: , ,

PuTTY on your phone: do stuff with your linux box, from anywhere.

December 18, 2009 sigtermer 2 comments

What better way to show people how cool you are by shutting down your linux box (or anything else running ssh) from your phone? That’s right folks! I’ve just installed PuTTY on my symbian phone, and I’m happy about it.

Putty on nokia

I haven’t played with it long enough to give it a fair review. but judging from my experience so far, it does what it advertises; it connects you to your box via ssh. you can get your own putty here. The only drawback seems to be the lack of support for special characters (Ctrl, Alt, and all the merry bunch). so no nano and definitely no emacs.

Ignoring this somewhat serious bugs, it’s a really nice tool to have in your arsenal in case your server ever decided to stop working like it should. it can also be handy for the paranoid to constantly check system load or the auth.log (/var/log/auth.log)

a note for people new to sshd, please don’t make it too easy for people to get into your system. take all the precautionary measures to insure your system. at least move it from plain sight by changing the default port (still detectable though).

oh! and did I mention? puTTY has color support ;)

Categories: CLI Tags: , , , ,

SIGTERMer’s Whim-Based-Log: Git on the FTDI wave…

November 20, 2009 sigtermer Leave a comment

Before I start, an announcement that should make any electronics enthusiast explode with joy.
Any person who has dealt with a computer related project would tell you how incredibly helpful and *indispensable* the parallel port can be. It has this great reputation due to the fact that it’s is extremely easy to deal with both in circuits (IO lines can be connected directly to 74{LS}* – TTL compatible) and programming.
The trusty parallel, however, has been in a recession ever since the USB came out. Today, it’s difficult to find a PC motherboard with an parallel port, and you can definitely forget about laptops with the PP.

Many USB solutions exist, but nearly none are as practical and universal as the good-old PP. and until recently, my only option was my old Compaq Armada PP2060.

It turns out that FTDI (link) manufactures usb-serial converters which can be operated in bit-bang mode! this means that you can get up to 8 general purpose I/O lines. The main selling points for me was that it’s 3.95$ (link), there is a breakout board (link), and most importantly, there is a library for it for linux!
expect a detailed tutorial in the near future :mrgreen:

Now on to whats been happening this past week:

git


The comes a point in every programmer’s life when he/she realizes that he/she needs some sort of source code management. I was no exception. So I started looking for scm software. while searching, I came across git. I read a little about it and had the false assumption that it’s main feature was that Torvalds wrote it, which is not much of a reason for anything. so I decided on svn. recently, I came across a youtube video in which Linus talked about git (link). It opened my eyes on several issues with svn that i wasn’t aware of. he also mentioned some of the futures that got me searching for a SCM system in the first place. It seems that i might be switching to git soon! of course, that is if I ever get around to actually learning it :roll: never mind, switched already :)
for more information, see the video (link) and vist git (link).

Google Wave


Wave is interesting to say the least. a couple of days ago, I was invited by anxious.nut to google wave. To be honest, a did not expect this. after all, I wasn’t invited to gmail when it was invitation only -even though one person offered to invite me verbally, and I certainly didn’t do anything to get invited to this one. but i guess it helps to know a hardcore geek.
Anyways, The interface is designed in a simplistic manner; you get for boxes for wave lists, and for the wave itself. plus two more for contacts and navigation. Waves can be edited simultaneously (like google docs) and can be viewed at deferent point in its history (can single-step from the wave’s start up to its current state). I suppose it has its uses.
Anyways, being who we are (myself, and Anxious), we decided to test if it could be used for programming (you know, real time collaboration). suffice to say, it’s not for code development. it would of been fun if more people joined in though. my googlewave id is SIGTERMer [at] googlewave [dot] com.

A Pleasant Surprise…

It turns out that we have a close ubuntu repository here in Kuwait! It’s provided by qualtynet (link) and is synced every 4 hours. I haven’t switch repos yet but if it’s faster, and everything checks out, I will.
Thanks Qualtynet :)

link dump

Last but not least, some of the more interesting sites I’ve stumbled across this week
- Dirty Coding Tricks (link)

Until next time,
SIGTERMer

Categories: SIGTERMer Tags: , , ,

Compiling and Getting a Recent Version of wxMaxima to Work with Ubuntu

November 6, 2009 sigtermer Leave a comment
.::بسم الله الرحمن الرحيم::.
Ubuntu’s official Repositories are always outdated. Even when the latest distro has just been released. Normally, this isn’t much of an issue unless the software provided in the repository is really outdated as is the case with wxMaxima. this tutorial will go over compiling and setting up wxMaxima 0.8.3a.

 

Table of Contents
Step One: Getting maxima & wxMaxima
Step Two: Configuring & Compiling wxMaxima
Step Three: Improvising…

Step One: Getting maxima & wxMaxima

wxMaxima uses maxima as a backend, requiring you to install maxima. Luckily, the version provided in the official repository is recent enough to do the work required by wxMaxima. installing it from the repository should suffice. of course, you can build it yourself, but there is no need to. to install maxima (though you may want to read through this entire section first), open a terminal and type:

sudo apt-get install maxima

while that downloads, get wxMaxima from sourceforge. now, before you can start compiling wxMaxima, you’ll need a few libraries first (all of which are available in the repos, thankfully). assuming that you’re on on freshly installed system, you’ll need to install the following packages:

  • build-essential; this installs gcc, c libraries, posix, and a whole bunch of other stuff
  • libwxgtk-dev; you’ll need the headers/libs for libwxbase and libwxgtk, and wx-headers. because all these packages are listed as dependancies for libwxgtk-dev, you’ll only need to specify it when using apt-get. make sure that all libraries/headers have matching versions!

Assuming that you want to compile wxMaxima with libwx2.8, issue the following command in the terminal:
sudo apt-get install build-essential libwxgtk2.8-dev

Step Two: Configuring & Building wxMaxima

Extract the compressed archive using whatever software you use. And using the terminal, cd into the directory that was just extracted (if you extracted it on you desktop then type cd ~/Desktop/wxMaxima-0.8.3a). Compiling wxMaxima is like compiling most linux software; the all too familiar configure->build->build install(root). First run:

./configure

If no errors poped up, then you’re ready to go. If you got some errors, however, try resolving them (ussually a missing program or library, all availbe in the official repository). If you’re still having trouble, leave a comment, and i’ll see what i can do :) .

Now run:

make

This may take a while (av. a couple of min.s). If you get errors, check that all libraries are installed and that they are the correct version. Finally, to install wxMaxima, type sudo make install. Note that root privlages are required as the changes made are system wide. Congratulations! You have a working (almost) wxMaxima installation.
Step Three: Improvising…

run wxMaxima by typing wxmaxima at the prompt. you’ll see a nice gui pop up. but wait something’s wrong! the status bar says: “Maxima process terminated.”. Believe it or not, it’s not unheard of. In fact, it’s so common that the problem shows up as one of the suggestion when googling for wxMaxima! Most likely it’s ether one of two things; bad configuration, or a bad network setup. it has also been reported that spaces in the executable’s path may be to blame (ms-windows version).

To troubleshoot: first start a second terminal (or run wxMaxima in the background), and enter maxima -s 4010
now look and see if that ominous message has been replaced with a more pleasing “Ready for user input”. if that did the trick (and it probably did) you’ll have to change the configuration of wxMaxima. if not, check that localhost is 127.0.0.1 and not anything else (in /etc/hosts).

As usual, any feedback is appreciated. you can contact me at:

مستودعات برامج أوبونتو في غالب الأحيان قديمة بحيث لا تحتوي على احدث النسخ. يمكن التعايش مع هذا التقصير، عادةً. ولكن تقع المشكلة عندما يكون الإختلاف بين اصدارات كبير بحيث لا يكون استخدام تلك البرنامج عملياً، كما هو الحال مع wxMaxima. حلاً هذه المشكلة، يجب تصريف و بناء البرنامج من الأساس. و هذا ما سنقوم به بإذن الله سبحانه و تعالى.

المحتوى
الخطوة الأولى: تثبيت البرامج و كيفية الحصول عليها
الخطوة الثانية:تهيئة و تصريف wxMaxima
الخطوة الأخيرة:الإرتجال…

الخطوة الأولى: تثبيت البرامج و كيفية الحصول عليها

قبل الخوض في إعداد wxMaxima، يجب التنويه الى ان هذا البرنامج واجهة ل”Maxima” ، وليس البرنامج الفعلي المستخدم للقيام بالعمليات الحسابية. وبناءً على هذا، يجب جلب و تثبيت Maxima. يمكن تثبيت Maxima عن طريق مستودعات أوبونتو الرسمية حيث ان تلك النسخة حديتة بما يكفي لwxMaxima. لتثبيت Maxima، قم بفتح طرفية (Terminal)، و أدخل الأمر التالي:

sudo apt-get install maxima

بينما يتم تنزيل و تثبيت Maxima، بادر بتنزيل wxMaxima من سورس فورج. على الرغم من أن هذه النسخة هي الأحدث أثناء كتابة هذا الدليل، إنتبه إلى أن النسخة قد تكون قديمة في الوقت الحالي (الخطوات المذكورة هنا مبنية على a0.8.3). حتى تستطيع تصريف wxMaxima، يتوجب عليك أن تجلب بعض المكتبات للتصريف (متوفرة في المستودعات). هذه المكتبات هي:

  • build-essential; يقوم بتثبيت المصرف (gcc) و المكتبات الأساسية
  • libwxgtk-dev; ستحتاج ألى libwxbase، libwxgtk، و wx-headers. تأكد من أن إصدارات المكتبات متوافقة

إذا كنت ستستخدم الاصدار 2.8 للمكتبات في تصريف wxMaxima، قم بإدخال الأمر التالي في الطرفية:

sudo apt-get install build-essential libwxgtk2.8-dev
أنتبه الى أنه ليس من الضروري ان تذكر جميع المكتبات! يرجع هذا إلى أن libwxgtk2.8-dev يحتم وجود المكتبات الأخرى. فإن لم تكون مثبتة، سيقوم النظام بتثبيتها بالنيابة عنك.

الخطوة الثانية:تهيئة و تصريف wxMaxima

لتصريف و تثبيت wxMaxima، قم بإستخراج الملفات من الملف المضغوط باستخدام اي وسيلة تعجبك ثم وجه الطرفية الى الدليل (المجلد) الجديد المستخرج. إذا قمت بأسخراجة على صطح المكتب (Desktop) أدخال الأمر: cd ~/Desktop/wxMaxima-0.8.3a. ألان أبدء بتهيئة مصدر wxMaxima للتصريف من خلال إدخال:

./configure

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

make

أذا صدرت بعض الاخطاء اثناء عملية التصريف، تأكد من أن جميع المكتبات ذات إصدار متوافق (2.8). سيتطلب تصريف البرنامج بعض الوقت. بعد أن تتم عملية التصريف. إدخل sudo make install حتى يتم تثبيت البرنامج في النظام. بمجرد أتمام العملية الأخيرة، سيكون wxMaxima متوفر للمستخدم.

الخطوة الأخيرة:الإرتجال…

لتشغيل wxMaxima، أكتب wxmaxima في الطرفية. ستلاحظ (أن ظهرت لك هذه المشكلة) أنه على الرغم من أن البرنامج يعمل، لا يمكنك إجراء أي عملية حسابية. في غالب الأمر، ترجع المشكلة ألى خطاء في إعدادات wxMaxima أو خطاء في أعدادات شبكة النظام الداخلية. لمعالجة هذه المشكلة، قم بفتح طرفية أخرى و أدخل:

maxima -s 4010

ثم إختبار wxMaxima. أذا أجرى البرنامج العمليات الحسابية كما هو المطلوب، فإن الخطء يكمن في إعدادات wxMaxima. اذا لم يتغير شيئ و أستمر wxMaxima في عدم تقبل المعطيات أو عدم إجراء العمليات الحسابية، قم بتحقق في الملف

/etc/hosts

أن localhost يساوي 172.0.0.1 وليس أي قيمة أخرى(إن لم يكن localhost متوفر، قم بإضافته يدوياً).

للإستفسار، يمكنك ترك تعليق أو مراسلتي من خلال:

And so it begins with a one segment display…

October 10, 2009 sigtermer Leave a comment

A couple of weeks ago, I decided to learn how to program and use microcontrollers, and today I turned a new 7 segment display (single/10-pin) into a 1 segment display in a couple of seconds. I say we’re off to a good start.

only three segments remained functional

only three segments remained functional

it all started with hackaday.com. although most of the recent posts aren’t that good (it’s not their fault, it’s the hacks that are getting lamer and lamer, bleh!), some of the older projects posted at hackaday.com that were exceptional and down right amazing got me thinking about doing my own projects. since all the complicated projects required uCs, i needed to get my hands on one.

Almost everyone who knows what i do knows I’m an old fashioned TTL guy. I worked a lot with both 74XX and 74LSXX families, and know there attributes (fan out, current sinking, …) like the back of my hand. aside from 74*s, 7805s, 555s, and the required components required to get the circuit running, i never dealt with anything else.

anyway, I searched for a uC. i looked into PICs, and Atmels and ended up choosing an Atmel ATMEGA168. these are inexpensive (they go for 4.11$ at sparkfun.com) and powerful. but best of all, the ATMEGA168 can be programmed in circuit using high level languages (C). when i decided to buy some, I chose sparkfun. this is because of one simple reason: they provide a very well written tutorial. of course, i couldn’t just buy the uC by itself, i had to buy other *stuff* including the ill-fated 7 segment LED display.

After about two weeks my first "imported" box-O-electronics arrives..

After about two weeks my first "imported" box-O-electronics arrives..

I unpacked the package and inserted the 7SD into an old populated (555 astable circuit) breadboard i had laying on my desk since god knows when. without even referring to the datasheet I started experimenting to determine the pin layout (mistake #1). after doing a quick image search, i found the pin layout digram. i connected what seemed to be the OUT pin of the 555 to a segment’s electrode. the segment lite for half a second then went out. being the person i am, i tried another, which ended in a similar fashion. i know i blew something and that the display was probably history but still, there were five left :) . anyways i knew that the 555 OUT wasn’t connected to the power rail directly, so exceeding the current rating was not a possibility. i continued on burning testing the segments one after one until only one remained. then i realized what had happened; I connected the jumper to VCC!

There were two lines side by side. one was OUT which was buffered and could not drive a lot of current. the other, however, was connected directly to the power supply and could supply at least 800mA (upto 1A). no wonder why the thing wouldn’t light up.

bottom line: don’t drive 1000mA into a device that’s rated for 20mA or things might get hot and some get well.. destroyed.

edit: it turns out that one other segment survived along with DT (the dot). i guess i have a 2.5 segment now :)

Categories: Hardware, SIGTERMer

How to install Clam Anti-Virus, update it, and use it in Ubuntu

September 25, 2009 Anxious Nut 3 comments

Clam Anti-Virus is an open-sourced,  GPL-licensed, and a cross-platform application. ClamAV is capable of scanning files, directories, and archives for infected files. Filtering, coping, moving, and removing viruses are all options. For a virus-free PC.

Installing ClamAV

To install Clam Anti-virus, open the terminal and type:

sudo apt-get install clamav

Updating ClamAV database

When Clam is installed, its database may not be up-to-date so to update it enter the following:

sudo freshclam

Now the database will be updated. If you do not want check whether your database is up-to-date each time you want to search for viruses, the following command will check for database updates twice a day (you can increase the times by changing the number “2″, and notice that your limit is 50).

sudo freshclam -d -c 2

Once the enter key has been pressed it’ll ask for your password. This command will run as a daemon (runs in background), and will stop when the computer shuts down. To make is starts automatically when ubuntu starts, follow the following steps:

  1. Goto “System” –> “Preferences” –> “Startup Applications” (“Sessions” in ubuntu 8.10 & older).
  2. Press the “Add” button.
  3. In the name field type “ClamAV database update”, and in the command feild type “gksu freshclam -d -c 2“.
  4. Click the “Add” Button.

Because we used “gksu", each time you log into your gnome session a window will pop up asking for password (freshclam needs administrative privileges)

Of course, by using this method, the daemon will only start when you log into your gnome desktop. if you want it to start when your system boots up, add it with the rest of the system’s daemons; hal fam, gdb, …

Usng Clam AV

For scanning files, the command “clamscan” will be used.

  • To scan files under a specific file type this:
  • clamscan ~/MyFileToScan.extension (the viruses usually have the following extensions: .exe, .dll, .com, cmd, and .scr)

  • To scan files under a specific directory type this:
  • clamscan -r ~/MyDirectoryToScan (-r is used to search recursively)

  • To scan and delete the found viruses type:
  • clamscan -r --remove ~/MyDirectoryToScan

  • To scan and copy the found viruses type:
  • clamscan -r --copy ~/CopiedToHere ~/MyDirectoryToScan

  • To scan and Move the found viruses type:
  • clamscan -r --move ~/MovedToHere ~/MyDirectoryToScan

Other useful options:

  • To have ClamAV prints only the infected files instead of all of them, add the option -i
  • To make the console beeps whenever a virus is detected, ass the option --bell

The command I use for searching viruses:

sudo clamscan -r -i --bell --move ~/MyVirusArchive ~/DirectoryToScan

I use sudo so that ClamAV gets the capability of moving all the files, even the ones that I don’t have the permission to move as a normal user

Important Notes

  • This was tested on ubuntu 9.04 .
  • For more information and details see manpages: clamscan(1) and freshclam(1).
  • ClamAV also has a GUI, to install it type “sudo apt-get install clamtk” and then type “clamtk” to run the application.

This document was updated on 5 Nov. 2009

Anxious Nut

Categories: CLI, Software Tags: , , , ,