Comments

Howdie,

I am pleased to announce that gmedcon, a port of xmedcon to gtk2.0 and libglade has been hosted at sourceforge.net.

Click here to visit the project page

xmedcon is a tool that is used to manipulate dicom images, a standard used in medical imagery. If you would like to help please give me a ping

Comments

ETK is a gui toolkit similar to gtk and is a part of Enlightenment Foundation Libraries or EFL. The syntax is very similar to GTK with only minor differences. Infact you could even use Glade to design GUI with ETK. For this you need a small but nifty tools called ‘enhance’ also part of E. Glade btw is a tool which removes the need of manipulating each and every widget manually. It does all these in an efficient manner leaving the developer to concentrate only on callbacks.

I am very new to ETK+Enhance and dont know which is better. EWL or ETK. If someone could shed light on this, I would be grateful. Myself, being a novice found the lack of documentation for enhance a bit unnerving. But still I managed to get hold of the concepts. So here is a short tutorial about using ‘enhance’ to parse your .glade files and use them in your etk source codes. Comments are welcome.

I assume some knowledge in ETK or atleast GTK…Lets dig in..

Now create a glade file with the name of project1.glade. Create a simple window with a single button in it. Now in the property window of the button in the Signal tab, add the following information Signal->Clicked, Handler-> , in our case “button_callback”

The following code is the famous hello world program using ETK and glade for creating the GUI..

`#include “Etk.h”

include “Enhance.h”

Enhance en; void button_callback(Etk_Object obj, void data) { printf(“Whee THis works\n”); } int main(int argc, char argv[]) { enhance_init(); etk_init(&argc, &argv); en=enhance_new(); enhance_file_load(en, “window1”, “project1.glade”); etk_main(); enhance_free(en); enhance_shutdown(); etk_shutdown(); return 0; }`

` Ok now a step by step description of whats up

include “Etk.h”

include “Enhance.h”

Enhance *en;` We are just including header files that is required for our program..duh! Anyway the third line, we are creating a pointer for the Enhance datatype. ‘en’ will be used while loading our .glade file

void button_callback(Etk_Object *obj, void *data) { printf("Whee THis works\n"); } The above function is the callback function. When we click the “button” of our program the line within the printf would output to the console. If you dont understand what I am tallking about visit the gtk website and download the tutorial to get an idea of what callbacks and widgets are. enhance_init(); etk_init(&argc, &argv); We are initialising enhance and etk.. en=enhance_new(); Remember the pointer ‘en’ of datatype Enhance. en now becomes a new instance of enhance..

enhance_file_load(en, "window1", "project1.glade"); The above line will load the widget “window1” from the “project1.glade” file and “en” will point th them. You should load each widget, for example, you may have more than one window in your .glade file. The remaining lines are self-explainatory..:D

Save the file as hello.c, in the directory containing project1.glade..and compile the program gcc -g hello.c -o helloenhance-config —libs —cflagspkg-config —libs —cflags“

If all went well, you will be left with the executable called “hello”.. run it ./hello You will get a small window with the button with E17 theming containing the label you had specified while creating the gui with glade. Click on the button and you will see the text “Whee THis works” output on the console everytime it is clicked. Reference: E Developers Portal Glade and GTK+ If you find something wrong, which is mostly likely, please comment about them. I am learning ETK/enhance myself.

Comments

Grr..First GNOME, now KDE getting on to my nerves..No matter what I try i just cant get enough juice out of them..Yesterday I decided I will try E17 but couldnt quite do it because of the time needed to compile all the dependencies one by one..Luckily theres a live cd distro called elive 0.5.2 which attracted my attention. The screenshots were stunning and I could see why the developers were calling it a work of art.

Installer was quite buggy in the sense that you get only Ok and Cancel buttons, the latter one doing the job of the ‘No’ button. Also from time to time the time interval between two successive dialogs were quite freaky especially during the partition part. That said, the speed of installation is the fastest I have evr experienced..

After Installation the initial boot up time though small was extended by the post-install configuration and after that I was greeted by a very cool login manager called as entrance.

Elive offers two themes by default Elive and Lukas, a light and a dark theme respectively. By the way, eye candy was totally awesome with some sexy animations and effects. All this and my card doesnt even support direct rendering!! E17 is a really light desktop ‘shell’ but amazingly beautiful…

All said the desktop does require some bit of playing around. I took around 2 hours to get used to it. But let me assure you, its worth it. Now my desktop is less cluttered and sports a clean look..And this is the first distro I have used which has flash, java and win32 codecs out of the box.. Go get elive at Elivecd.org More about enlightenment at Get-E A detailed review here

Heres a screenshot of my desktop showing the snazzy elive panel. Note that everything moves in E17…too bad I cant show them. Check them out yourself :P

Comments

Whatever you do..insist on an ethernet based router…You save a lot of aspirin and usb ports..

Oh and router=modem in this article…

DHCP way:

The most simple way of course is to use DHCP to set up your network automatically, In most cases everything gets configured automagically. If not enabled you should start the DHCP server by logging into the admin interface. See the wikipedia article to know more about DHCP. http://en.wikipedia.org/wiki/Dhcp

pppoeconf:

In ubuntu there should be a program called pppoeconf installed by default, just run sudo pppoeconf You will be taken through a set of screens wherein you will be able to enter the details regarding your dataone account, Mostly configuring the DNS isnt required. Just rememeber that it is @dataone and not @dataone.in

Then to connect use pon dsl-provider if you have followed the default steps.

poff dsl-provider to disconnect and plog to view status

In gentoo this tool is known an rp-pppoe, only the name differs..although its wizard is command line rather than the ncurses based pppoeconf

Configuring the router directly:

Of course another alternative is to use the admin interface available in the router provided. First make sure your box is detecting the ethernet interface correctly

next.. ifconfig eth0 up 192.168.1.2 and… route add default gw 192.168.1.1

Point your browser to 192.168.1.1 and you should be greeted with the admin interface of your router. I use a Huawei Sterlite WA1003A.

username and password are admin.

After logging in goto Modem Setup, PVC0

select pppoe, fill in the details, save the settings and restart the router…Your modem should automatically dial-in.

Most distros have gui to configure this stuff, But some of us are smarter than the others and use distros like gentoo..For those users..:P

open up /etc/conf.d/net

and add/modify iface_eth0="192.168.1.2 broadcast 192.168.1.255 netmask 255.255.255.0" gateway="eth0/192.168.1.1"

After saving the file do a /etc/init.d/net.eth0 restart

If nothing works: So if these steps dont work..there a last chance. Most of the times resolv.conf is to be blamed, Double check if its ok, Even if you have valid nameservers try putting the following in /etc/resolv.conf.

1
2
nameserver 4.2.2.1
nameserver 4.2.2.2

These are public nameservers. If it still doesnt work..you may have goofed up somewhere..

Note:

  • Configuring the router directly is more convenient since the configuration sits in your router rather than your system. So if you in some point lose your data, all you need to do to configure the internet is to configure the interfaces of the modem. Also when using pppoeconf, when I chose to enable the connection during boot time I found that my system was taking more time to boot, but this time delay was not experienced when I configured the connection through the admin interface of the router. Of course if for some reason, if the modem is restarted you need not execute the ‘pon’ command to connect when you configure the router directly. It automatically connects.

  • Use any one of the methods..not both

  • Sometimes if you have two ethernet interfaces you may need to disable one of them

Comments

Howdie..At last dad gave me broadband connection…Its been tough without internet for 4 months. Right now I am working on ldtp stuff…Lets see how it goes. Apart from that my college is turning out to be a nightmare because of ECE dept. Anyway..Any new stuff should be started off with ‘Hello World’ (I dont want to see what happens if we dont)

print “Hello World..Welcome to my new blog”