Archive

Posts Tagged ‘job’

Network Manager on Slackware 13.0, the dirty and easy way

December 4th, 2009 bodom_lx 2 comments

I love to be back to Slackware, my very first distribution. However, there are a couple of things that I’m missing from the other more comfortable distributions. From among them, I totally miss Network Manager.
I saw many people asking in forums on how to install Network Manager in Slackware 13.0. There is Wicd, already present in Slackware “repositories”. Every Slackware maniac will tell you that it does the same job of Network Manager, but I don’t agree. It does not always work and is more complicated to be configured than NM.

Anyway, I’m going to explain to Slackware newbies the dirty way to have a fully working Network Manager on Slackware 13.0. This method is totally against Slackware philosophy and will also replace some important libraries of the system! Anyway, the packages being replaced are prepared from the guys behind GNOME SlackBuild, a project to bring Gnome in every Slackware release.
You have two way to have Network Manager in your Slackware: either install the entire Gnome from them (or any other similar project) or use slapt-get against their repositories and just install Network-Manager. Here are the instructions. All the following actions must be performed as root user:

  1. Download, install and configure slapt-get. Instructions are provided on their website.
  2. Update your system with:

    slapt-get –update
    slapt-get –dist-upgrade

  3. Add GNOME SlackBuild repository in /etc/slapt-get/slapt-getrc:

    SOURCE=http://mirror.switch.ch/ftp/mirror/gsb/gsb-current/

  4. Update the list of available packages and replace some system packages:

    slapt-get –update
    slapt-get –add-keys
    slapt-get –install –reinstall alsa-lib bluez glib2 gtk+2 libwnck

  5. Now install Network Manager and its GTK applet:

    slapt-get –install NetworkManager network-manager-applet

  6. Be sure that dbus, hal and NetworkManager daemons will be loaded at boot time:

    chmod +x /etc/rc.d/rc.messagebus /etc/rc.d/rc.hald /etc/rc.d/rc.networkmanager

  7. Add your user to the plugdev group. Edit /etc/group, find the line

    netdev:x:86:root

    Add your username after root (bodom_lx is my case)

    netdev:x:86:root,bodom_lx

  8. You are quite finished now! Log back as normal user and create a startup script for network-manager-applet:

    cd ~/.kde/Autostart/

    Create a file called nm-applet.sh with the following content:

    #!/usr/bin/bash
    nm-applet –sm-disable &

    Give it execution permission:

    chmod +x nm-applet.sh

    .

Reboot your system. Everything should work fine now.

To uninstall Network Manager and restore the system as it was before the installation follow these instructions, as root::

  1. remove any GNOME SlackBuild package using:

    removepkg /var/log/packages/*gsb

  2. Comment GNOME SlackBuild entry in /etc/slapt-get/slapt-getrc:

    #SOURCE=http://mirror.switch.ch/ftp/mirror/gsb/gsb-current/

  3. Update your slapt-get sources and re-install the replaced Slackware packages:

    slapt-get –update
    slapt-get –reinstall –install glib2 libwnck alsa-lib gtk+2

  4. Toggle execution permission to the auto-started network-manager-applet. Log back as normal user and type:

    chmod -x ~/.kde/Autostart/nm-applet.sh

Feel free to comment any suggestion.

Related posts

How to limit a field with javascript-prototype and display the counter

December 3rd, 2008 bodom_lx No comments

For job purposes I had to learn a lot of JavaScript, including AJAX related stuffs. Like every lazy (but intelligent) developer, I looked around for frameworks that could help me doing my work. I knew that prototype existed, but I never looked at it because of lack of interest. Well it’s great, it’s really great! Nowadays everybody should use frameworks, as their abstraction permits a rapid development without worrying about things like platform compatibility, in our case browsers. Prototype also has a very nice and clean syntax that overtakes functions not compatible with every browser.

In this post I’m going to report a very nice function I implemented for limiting Form input fields, like textarea and input of type text. You have to call it via onkeyup and onkeydown events. The function accepts 3 parameters: field, limit and counterDesired.
The first is the field object, you should use the keyword this for a value.
The second parameter is a limit value, the number of characters that the field should contain at maximum.
The third parameter is optional, false as default. It permits to add a visual counter after the field, like the one you see on YouTube, for example. You can either tell to the function to add the counter for you (put inside a <span> block) or to put it inside another block you’ve already defined. In the second case, the block must have an id of the form ‘fieldID_counter’

This is the compact version, see below for some examples and the expanded, explained version:

<script type="text/javascript">
// < ![CDATA[
function limit_text(field, limit, counterDesired) {
    if (counterDesired == null)
        counterDesired = false;
    var length = $F(field).length;
    if (length > limit)
        $(field).value = $(field).value.substring(0, limit);
    if (counterDesired) {
        if ($($(field).id + '_counter')) {
            $($(field).id + '_counter').update($F(field).length + " / " + limit);
        } else {
            var counterText = new Element('span', {'id': $(field).id + '_counter'});
            counterText.update($F(field).length + " / " + limit);
            $(field).insert({'after': counterText});
        }
    }
}
// ]]>
</script>
 

Read more…

Related posts

Fedora 10, thank you very much! (macbook review and fixes)

November 29th, 2008 bodom_lx 3 comments

I’ve never been a big fan of rpm-based Gnu/Linux distributions, since I’ve always preferred the stability of Debian and Debian based distros, with their great dpkg system.
The problem with Debian on Macbooks is that I do not see both the stability and performance anymore, as I have to use Lenny/Sid. Etch is too old and I don’t have the time (*sic*) to play with it to make it work well. Lenny should be next to be released but I don’t feel the very famous stability AND lightness of Debian distributions on this release, like I was accustomed in the past years. Is this because I own a Macbook? Maybe, but a Macbook Santa Rosa is nothing more than an Intel-powered notebook with some strange input devices and a strange non-bios system :-)

Regarding Ubuntu, I believe that this distribution has become naff and really slow. See this Slashdot discussion on this topic.

Yesterday I stumbled to Scientechie review of Fedora 10, which convinced me to try it out.
The software shipped with Fedora 10 is aligned with the one provided with the other distributions: Gnome 2.24.0, kernel 2.6.27.5, NetworkManager 0.7.0 (svn) and so on. Read the release notes for more information.

Fedora 10 really surprises me, as it is the first Gnu/Linux distribution in many, many years that makes me feel again the great stability and performance of the Penguin. Therefore I’m writing this review that is also a how-to, as it contains some fixes for Fedora 10 and Macbooks.

Read more…

Related posts

Testing Ubuntu 8.10 (Intrepid Ibex) beta on a Macbook (updated!)

October 3rd, 2008 bodom_lx 6 comments

It’s a very long time since I abandoned Ubuntu, 1 year and 9 months being precise, although I continued to use Ubuntu derived distros.
I decided today to give Ubuntu 8.10 beta a try. Obviously, every time I decide to try a Gnu/Linux distribution it happens that a new release comes out: I downloaded Alpha 6 yesterday, I fell into problems with it and a apt-get update && apt-get dist-upgrade brought me Ubuntu 8.10 beta, correcting some of them :-)
Read more…

Related posts

Announcing BD-incollo Project

September 24th, 2008 bodom_lx No comments

As I promised, I would like to announce the start of a new BD-thing! I’m currently learning Django because of job needing and because of fun. The best way to learn a new language (even if a framework) is to apply it for solving a problem.
That’s why I decided to start BD-incollo!
BD-incollo will be a kind of pastebin clone written in Django. Totally free. Free meant as free software. You may download the sourcecode and use it by your own.
Ok, what’s difficult with this? I’m planning to release a decent usable version in less than a week.
This means, I want to release the sourcecode on Sunday, 2008-09-28 and also to launch the service on Monday, 2008-09-29.

I believe in Django and I know it will be possible to make it!

Related posts

BD-shell 1.0.0 RC2 is out! Processes in background are dangerous

September 13th, 2008 bodom_lx No comments

Release Candidate 2 for my C shell is out. This is a real release candidate, code is frozen and hopefully this one does not have serious bugs like RC1. As you may know, RC1 has been retired because of a bug causing a segmentation fault when launching short commands in background. Let’s see why this happened. The following schema summarizes what happens when a program in background is launched:

Schema for BD-shell, anatomy of process handling

Schema for BD-shell, anatomy of process handling


As you see, there is a non-synchronous function that is called when the child exits, the SIGCHLD handler.
What if the background command is very short, like ls? It may happen that SIGCHLD is thrown before the job object creation. Bdsh RC1 did not manage this case, and crashed. RC2 fixes this and does not have relevant bugs according to my definition of 1.0.0 release.

Finally, go and grab the code!

Related posts