Linux at Ngee Ann Polytechnic

Would you like an open-source conference in NP?

May 13, 2008 · 3 Comments

Hi all,

I’ve been thinking about organizing an open-source conference in NP / ICT. The idea is to invite speakers from various companies that are heavily involved in the open-source software industry to speak about open-source at a small event here.

Topics that you (readers) and I have in mind are:

  • Open-source software (OSS) in general
  • How Polytechnic students can benefit from OSS
  • The state of OSS in the local IT industry

The above list will grow as I receive suggestions.

What do you, dear reader, think about it? Please tell me in the comments.

Thanks.

→ 3 CommentsCategories: Linux · Ngee Ann Polytechnic · School of Infocomm Technology
Tagged: ,

Developing ASP.Net Apps in Linux

January 22, 2008 · 2 Comments

My Information Technology course has a module named “Developing Web Applications”, where, for the sake of exposure to the MS .net platform, and other reasons, students have to learn how to do server-side programming with ASP.Net.

Personally, I would rather use open-source languages and frameworks, such as Perl, Ruby on Rails or Django, so as to avoid vendor-lock-in by MS, and also because of ideological reasons. However, without much of a choice, I sought a way to avoid using Windows and Visual Studio to develop ASP.Net apps. My search led me to Mono, an open-source implementation of ASP.Net.

This site contains much more information on how to get through the module without having to use too much of Windows.

I would also like to thank <reverseblade> on ##mono at irc.freenode.org, for the following tips:

[17:11] <kohwj> hi, if i have an asp.net app written in vb.net, and it makes some sql calls to a microsoft sql server, can this app be run, without modificaiton, on mono and apache?
[17:12] <reverseblade> kohwj, not sure about vb.net
[17:12] <reverseblade> but if you use C# ,yes
[17:13] <kohwj> reverseblade: i’m not familiar with sql, but im assuming that mysql is the db used?
[17:14] <reverseblade> as long as you have the necessary driver
[17:14] <reverseblade> you can work with any db
[17:14] <reverseblade> and I am sure, asp.net + mono +linux + mysql is a working combo
[17:14] <reverseblade> if you have a correct setup of course
[17:14] <kohwj> reverseblade: thank you! my school can’t make me use windows now =)
[17:16] <reverseblade> kohwj, yeah but as said I am not sure about the VB.NET support. But I have developed a fairly large and a professional Web application with
[17:16] <reverseblade> asp.net + mono + linux + postgres
[17:16] <reverseblade> and ported it to windows
[17:16] <reverseblade> it’s a commercial application of course
[17:17] <kohwj> i think vb.net should work, i did ask around here once about vb.net in mono and asp
[17:17] <reverseblade> kohwj, if you have choice , use postgres instead of mysql
[17:17] <reverseblade> it is better and works better with mono
[17:17] <kohwj> reverseblade: cool
[17:17] <kohwj> reverseblade: but if the app is simple, no code changes are needed, right?
[17:18] <reverseblade> minority changes might be needed
[17:18] <reverseblade> on aspx code
[17:18] <reverseblade> not the compiled dlls
[17:18] <reverseblade> sometimes, mono asp.net is more forgiving that MS asp.net
[17:18] <kohwj> oh
[17:18] <kohwj> i
[17:18] <reverseblade> but should take few minutes of yours
[17:19] <kohwj> i’ll test on both, then. luckily i won’t need to spend much time on windows =)
[17:19] <reverseblade> if you test it on both platforms I am sure you’ll be fine
[17:19] <reverseblade> yeah
[17:19] <kohwj> thanks for the info!

→ 2 CommentsCategories: Diploma in Information Technology · Linux · Ngee Ann Polytechnic · Programming · School of Infocomm Technology

Gnokii + iTegno WM1080A

November 29, 2007 · 2 Comments

In the hope that this blog post will help owners of the now-discontinued iTegno WM1080A SMS gateway device, the purpose of this post is to report that Gnokii version 0.6.18 works with it. It supports the receiving and sending of SMSes (–getsms SM <no.>, –sendsms, –deletesms), but not the –showsmsfolderstatus or any options related to SMS folders.

EDIT: A note from iTegno:

WM1080A and WM1080A+ are different modems.
WM1080A is end of line; WM1080A+ is our new product

This guide was tested for the WM1080A only. I have no idea whether it works with he WM1080+ (Google: read this as WM1080 plus). If it does, please tell the Gnokii developers, not me =)

Use the dmesg command to get the its device pathname, and edit /etc/gnokiirc:

[global]
port = /dev/ttyUSB0
model = AT
initlength = default
connection = serial
use_locking = yes
serial_baudrate = 115200
handshake = software
sm_retry = 1
smsc_timeout = 10
[gnokiid]
bindir = /usr/local/sbin/
[connect_script]
TELEPHONE = your phone number

[disconnect_script]
[logging]
debug = on
rlpdebug = off
xdebug = on

Run wait 10 seconds after every time you plug it in, or Gnokii will complain about a (supposedly) damaged or missing SIM card if you try to access it too quickly..

→ 2 CommentsCategories: Uncategorized

Success! (Sort of) and an important message

October 17, 2007 · 2 Comments

NP replied to the feedback which I gave (see the previous post) and gave this reply (paraphrased):

  • Please don’t post instructions on your blog because users have no way of knowing whether they are harmful or not.
  • Thanks for the effort anyway. Would you like to help us create an FAQ for Linux users?

I’m pretty happy with NP for their willingness to help Linux users, whether or not we even exist. The current count stands at 1: me.

Thanks Ngee Ann Polytechnic!

By the way, regarding the first point they made, here is a friendly disclaimer: please attempt the instructions on this blog at your own risk although there is no chance that accessing a network printer or file share will damage your system. But feel free to use the official guides when they are up, for using those instructions are harmless!

→ 2 CommentsCategories: Linux · Ngee Ann Polytechnic

Enquriry to NP via their online feedback form

October 16, 2007 · Leave a Comment

This enquiry has been sent to NP via their feedback form at http://np.edu.sg/corpcomm/abt_np/con_contact.aspx .

Dear Sir/Mdm,

I am a student of NP in the School of ICT.

As I use Linux for all my school work, I access the ICT network shares via an address such as “smb://ictpolo.ict.np.edu.sg/share”, instead of “\\ictpolo\share”.

To use the shares, I have to append “ict.np.edu.sg” to the name of the server, as I describe in this blog post

http://linuxnp.wordpress.com/2007/08/12/using-shared-folders-on-npnet/

written by me.

If ICT students should use “ict.np.edu.sg”, what should students from the School of BA, Engineering, HMS, etc, use for their school’s network shares?

I would like to publish this information on the blog http://linuxnp.wordpress.com with your kind permission, to benefit NP students who use Linux. If NP does not provide technical support for Linux users, such as directions on how to use networked printers in NP or access shares on NPNet, I will.

Thank you for your help!

——————–

——————–
Student, School of ICT
Ngee Ann Polytechnic

→ Leave a CommentCategories: Linux · Ngee Ann Polytechnic

Using Ngee Ann’s Printing Facilities with Linux (specifically, KDE)

October 15, 2007 · 4 Comments

Students may have received an email such as the following from Ngee Ann Polytechnic:

Basically, the kind folks at Ngee Ann Polytechnic give directions to all MS Windows users on how to use the network printers in NP. Too bad that they don’t help Linux users. But don’t worry- it’s very easy to use the printers with Linux.

I assume that you are running KDE. Open the Control Center (kcontrol) and navigate to Printers via Peripherals. Get into Administrator Mode and add a new printer. When prompted, selected “SMB Shared Printer (Windows)“.

Enter your username and password, but make sure that you specify the domain NPSTD:

Username: NPSTD/s12345678
Password: your NP password

Next, provide the details of the network printer:

The server, which is ictpolo in this example, should be the server that Windows users connect to with “\\ictpolo\printername”, but append “.school.np.edu.sg”. In this case, the server is “ictpolo.ict.np.edu.sg“.

The printer name is simply the name of the printer given. In this case, it’s a dot-matrix printer named ictmatrix1.

That’s it! Print a test page to see if it works.

Do note that each student has a printing quota of 150 pages per semester for laser printers, and an unlimited quota for dot-matrix printers.

→ 4 CommentsCategories: Linux · Ngee Ann Polytechnic · School of Infocomm Technology

PDF::API2 Tutorials

September 30, 2007 · Leave a Comment

The Perl module PDF::API2 is awesome for perlers who want to create PDFs, but its documentation is horrible. In this post, I provide useful links for people who have just started with PDF::API2.

Tutorial for adding text and simple geometric shapes

http://rick.measham.id.au/pdf-api2/

A simple Hello World in PDF tutorial

http://pdfapi2.wiki.sourceforge.net/BeginnersTutorialStarting

Text and Images

Perl Graphics Programming by Shawn Wallace. Link points to Google Book Search.

Tables

http://search.cpan.org/~omega/PDF-Table-0.9.3/lib/PDF/Table.pm

Oh, by the way, make sure that your PNGs are not interlaced, as PDF::API2 does not support it. Yes, I’m looking at you, GD::Graph. Make sure that you disable interlacing for images generated with GD::Graph.

“Unsupported Interlace(1) Method at /usr/lib/perl5/site_perl/5.8.8/PDF/API2/Resource/XObject/Image/PNG.pm line 85.”

→ Leave a CommentCategories: Perl · Programming

Semester 1 Results

September 14, 2007 · Leave a Comment

I just got my grades for the April 2007 semester, and I am very, very happy that things are going according to plan.

Let’s just say that using Linux has not in any way negatively affected my grades, contrary to what people who use the “software incompatibility” argument against it may assume.

Don’t ask me what my results are- bother my classmates instead, for some have been clamoring to find out at the (willing) expense of my time.

→ Leave a CommentCategories: Diploma in Information Technology

vboxdrv + KVM = General Protection Fault

August 17, 2007 · 1 Comment

Greetings!

I just tried to install VirtualBox, a nifty virtualization tool from Innotek, on my Gentoo machine- but encountered a pretty scary general protection fault. Whenever Virtualbox tried to start a virtual machine, a general protection fault would occur, X would crash, and I would have to shut down with Alt+Sysrq+R/S/E/I/U/B and then holding the power button down for a few seconds.

It turned out that the kernel module used by Virtualbox, vboxdrv, conflicted with the KVM code in the Linux kernel. The solution was to simply re-configure my kernel, disable the KVM stuff (Device Drivers -> Virtualization -> [ ] Kernel-based Virtual Machine (KVM) support), recompile and boot from the new kernel.

Users who have KVM loaded as a module should simply unload it, and prevent it from being automatically loaded on boot, if it is.

You can view the error, posted by Poulpatine, from this Virtualbox support ticket.

I’ve been using Linux since Ubuntu 5.04- but I’ve never seen a GPF. This piece of troubleshooting was pretty educational.

→ 1 CommentCategories: Gentoo

Using Shared Folders on NPNet

August 12, 2007 · 1 Comment

NPNet is invaluable to students in Ngee Ann Polytechnic, as it is often used for the submission of assignments. Here is how to use NPNet’s file shares in Linux.

  1. Make sure that Samba is installed and running.
  2. Identify the name of the share. For example, \\ictbintan is used by Windows users, but we have to use “smb://ictbintan.ict.np.edu.sg“. I have yet to figure out how to use the Windows network path name in Linux.
  3. Fire up Konqueror or Nautilus, and enter this into the address bar:
    • For Nautilus:
      • smb://ictbintan.ict.np.edu.sg
      • Enter your student number and password, as well as “NPSTD” in the “Domain” field, and hit Enter.
    • For Konqueror:
      • smb://NPSTD\studentnumber@ictbintan.ict.np.edu.sg/ Note the usage of the domain name in the address. Konqueror won’t ask you for it in its username/password dialog.
      • Enter your student number and password and hit Enter.

I have not tested this, but if you are not an ICT student, you may have to use “smb://<schoolname>.np.edu.sg“, such as “smb://baweb.np.edu.sg“.

A list of (not necessarily workable when using smb:// ) addresses of the schools in Ngee Ann are:

  • baweb.np.edu.sg (School of Business and Accountancy)
  • soe.np.edu.sg (School of Engineering)
  • ict.np.edu.sg (School of Infocomm Technology. This definitely works)

Unfortunately, I could not find the addresses for the School of Humanities, School of Film and Media Studies, School of Health Sciences and other schools. However, if I manage to get smbmount or something else to use network addresses like “//ictbintan/wp“, there would be no problem with using the Samba shares in all of NP.

EDIT: http://lists.samba.org/archive/samba/2003-March/063175.html could help. I will test this when I get to school.

→ 1 CommentCategories: Linux · Ngee Ann Polytechnic · School of Infocomm Technology