Linux.com

Home Linux Community Community Blogs

Community Blogs



Eye Candy: A Love Story

I'm what you'd call a Linux Veteran.  One who's been using Linux since long before it was considered "cool" or "pretty".  In fact, I recently reminisced  with a friend at being around when the advent of ISO releases was considered new.  I remember installing Slackware 4.0 from a handful of floppy disks on an old 486 DX.  "What's a floppy disk and what's a 486 DX?" you ask.  Wikipedia is your friend, my friend.

Aside from relic grade hardware and floppy disks that can't hold even a fraction of what a cheap flash jump drive can hold today, I do remember early desktop Linux.  Trust me, it wasn't pretty.

With the release of Ubuntu and its countless derivatives, the Linux community has grown exponentially.  People accustomed to modern GNOME, KDE and XFCE releases need to take a look at the ghost of desktop Linux past.  Windows and Mac OS aren't the only ones with a checkered past of ugly (but plenty useful) desktops and GUIs.  Along with being around when Slackware 4.0 was a new release, I was also around when major leaps forward in OSS took place.  I remember when KDE 2.0 was released, I remember when GNOME 2.0 was released and when anti-aliased fonts were considered eye candy.  Also at this time, there was no such thing as XFCE.

As a Linux old timer, I feel that my perception of eye candy in Linux is much more conservative than the  average desktop Linux user of today.  I use Linux as the only operating system on a few of my systems and prefer a near cherry GNOME as my desktop environment.  Things like Compiz do nothing for production in my opinion.  The rotating cube when switching between workspaces and wobbly windows look nice in screenshots and desktop screencasts but I fail to see what this brings to productivity.  Maybe I'm just an old timer but I'll gladly settle for my rather boring composite enabled Metacity and Avant Window Navigator.

 

Funny compiz

Look at HTML code of http://www.compiz.org

Hint: search after the "style="display:none".

Read more... Comment (0)
 

SocialNerds Webteam Brainstorming

Hallo Freunde,

das SocialNerds Webteam Brainstorming hat ein Ende. (Infos auf: http://socialnerds.org/webteam)

Der Brainstormingthread (http://socialnerds.org/webteam/brainstorming) wird geschlossen.

Die Beiträge sind via http://wiki.socialnerds.org/webteam abrufbar.

 

Making My Own Desktop Manager: Starting at the Beginning

The hardest part of this whole project is the lack of people talking about X Window Managers. There are countless forums post for people asking how to start learning about Window Managers and either get no response or someone just says "read the source code of {insert open-source window manager here}".

While, as a programmer, I probably agree with learning from others' source code; but I also think there is a big gap of information missing from this equation. There are plenty of high-level explanations of the roles of Window Managers and there is source-code. That's about it.

So just to clarify, here are the roles my Window Manager will be responsible for:
  • Listening for events on the root window and all child windows
  • Size and placement of windows when they are first created
  • Show the difference between the focused/active window and all other windows
  • Iconified/Hidden states of windows
  • Resizing windows
  • Moving floating windows
  • Window decoration (If I choose to go down this route?)
  • Launching programs

I decided the next phase would be to write the simplest possible Window Manager. This window manager would allow programs to accept the programs preferred location & size and would also draw a white border around the focused/active window.

The code for this example can also be found in 'simple-wm' in my GitHub project-sandbox. (Including the MakeFile)

#include <X11/Xlib.h>
#include <stdio.h>

#include <stdlib.h>


static Window focused_win;

int handle_xerror(Display *dpy, XErrorEvent *ee) {
   int i=0, alen = sizeof(ee) / sizeof(XErrorEvent);
  for (i=0; i
<alen; i++) {
    fprintf(stderr, "An error occurred: %d\n", ee[i].error_code);
  }
  return 0;
}

int main()
{
  printf("opening display\n");
  Display *d = XOpenDisplay(NULL);

   printf("grabbing default screen\n");
  int screen = DefaultScreen(d);
  printf("default screen = %d\n", screen);

  printf("grabbing root window\n");
  Window root = DefaultRootWindow(d);

  // tell root window you'll be capturing it's events
  XSetWindowAttributes a;
  a.event_mask =   StructureNotifyMask|SubstructureNotifyMask|EnterWindowMask|LeaveWindowMask;   // root + child (sub) windows created, window-in, window-out
  XSelectInput(d, root, a.event_mask);

  // handle errors
  XSetErrorHandler(handle_xerror);

  // capture those events
  XEvent e;

  // main event loop
  for (;;) {
    XNextEvent(d, &e);

    if (e.type == CreateNotify) {
      printf("Event: create\n");
      XSelectInput(e.xcreatewindow.display, e.xcreatewindow.window, a.event_mask);
      XSetWindowBorderWidth(e.xcreatewindow.display, e.xcreatewindow.window, 1); // always set border to 1px
     }

    else if (e.type == ConfigureNotify) {
      printf("EVENT: configure\n");
    }

    else if (e.type == EnterNotify) {
      printf("EVENT: focus-in\n");
      focused_win = e.xcrossing.window;
      a.border_pixel = WhitePixel(e.xcrossing.display, screen);
      XChangeWindowAttributes(e.xcrossing.display, focused_win, CWBorderPixel, &a);
    }

    else if (e.type == LeaveNotify) {
      printf("EVENT: focus-out\n");
      a.border_pixel = BlackPixel(e.xcrossing.display, screen);
      XChangeWindowAttributes(e.xcrossing.display, e.xcrossing.window, CWBorderPixel, &a);
    }
   }
   return 0;
}


To see this window manager in action you will need to edit your .xinitrc file to launch and wait for an xterm and run the window manager form here. I realise I could launch the window manager from .xinitrc as a background process, but I want to watch the events as they happen from my logging in the host xterm shell.

So I:

  • Edited the .xinitrc file for my wmtest user (click here for my .xinitrc file)
  • Logged in as that user via SLiM
  • Started simple-wm:
    • $ /path/to/simple-wm/program&
  • Then launched another terminal window on the other side of the screen:
    • $ xterm -geometry 50x50+500+500

Notice how I didn't need to do anything in the code for the xterm window to position correctly at x=500,y=500 and size of 50charsx50chars? If you don't change the values on the ConfigureNotify event, the client window's hints are accepted! Now when I hover over the xterm window, I get a white border! Hover out and the border goes black! :)

To exit the session just type exit on the xterm shell.

 

mysqldump: error 29 - TEMP SOLUTION

On MYSQL DB with LOTS of tables, you might run into an error with 'mysqldump':

    mysqldump: Got error: 29: File .....

Solution:

    Add --skip-lock-tables to your command

System: CentOS 64bit with MySQL 5.0.45-log
 

Malware found on brand new Windows netbook ...

Security vendor Kaspersky Labs found malware on new Windows XP netbook, just out from the factory. The firm is warning users to take extra precautions, and ensure virgin systems are malware free before connecting them to the Internet.

 If You is owner a netbook - be attention ...

Read more... Comment (0)
 

nmap: checking port listening in one subnet

nmap -vv -p 23 157.171.250.0/24

 example above is checking any listening port for telnet in subnet 157.171.250.0/24

 

Config NIS Server/Client on CentOS 5

I created two VMs via VirtualBox, named CentOS_Srv and CentOS_Cli with the IPs 192.168.172.131 and 192.168.172.131, networking type is bridged.

 1. ENV

OS: CentOS 5.3

Software: ypserv, yp-tools, ypbind, etc

NIS Server: 192.168.172.132 glynnsrv.com

NIS Client: 192.168.172.131 glynn.glynnsrv.com

2.  Steps

1) Config NFS in the NFS server (use the NIS Server here)

[root@glynnsrv]vi /etc/exports, add the following line:

/home  *(rw,sync)

this allow  all host to mount /home as writable.

2)Make effective

[root@glynnsrv] exportfs -a

3)Start NFS server

[root@glynnsrv]service nfs start

4)Let nfs start when boot

[root@glynnsrv]chkconfig nfs on

 5)Config the firewall

[root@glynnsrv]setup

select firewall settings and add NFS service.

6)Config the NFS client

[root@glynn]mv /home /home.bak

[root@glynn]mkdir /home

[root@glynn]vi /etc/hosts

127.0.0.1 localhost localhost

192.168.172.131 glynn.glynnsrv.com glynn

192.168.172.132 glynnsrv.com glynnsrv

[root@glynn]mount -t nfs glynnsrv:/home /home

Let autofs mount the nfs at boot time:

[root@glynn]vi /etc/auto.master # add the following line:

 /home      /etc/auto.home  --timeout 600

[root@glynn]vi /etc/auto.home # add the following line:

  *    -fstype=nfs,r2   192.168.172.132:/home

 [root@glynn]chkconfig autofs on

 7) Config NIS Server

a) install needed softwares:

[root@glynnsrv] yum -y install ypserv ypbind yp-tools

b)vi /etc/sysconfig/network

...

NISDOMAIN=glynnsrv

 

PSA: Warning, Phishers have arrived!

Two nights ago, I checked my inbox. I had a message from a user named "Izzy". Upon opening I discovered its noting but an evil phishing plot. Here is the contents of the message:

Dear Friend, I know that this is an unusual platform for us to be discussing this Kind of business but the situation has necessitated me to use this Medium to communicate you for now. But let me introduce myself to you. I am Miss. Elizabeth Mark, the manager of bill and exchange at the foreign remittance department of my Bank. In my department I discovered an abandoned sum of US$14.5M, (Fourteen Million, and Five Hundred Thousand US Dollars) at our head office Accra Ghana, that belongs to one of our foreign customers, who died along with his wife and only son in a plane crash of Alaska Airlines Flight number 261 which crashed on 31 January, 2000. The owner of this account is Mr. Morris Thompson an American and great industrialist and a resident of Alaska. It is therefore upon this discovery that I now decided to make this Business proposal to you and for our bank to release the money to You, for more detail send me an email in my private email address( This e-mail address is being protected from spambots. You need JavaScript enabled to view it or This e-mail address is being protected from spambots. You need JavaScript enabled to view it ) Yours truly, Miss. Elizabeth Mark.

 If you see something like this in your Inbox or Email please discard it. It's a scam. 

 

On Being a Female Computer Nerd

Sometimes when attempting to explain Linux to friends or family members who are not computer or tech-savvy, I find myself "dumbing down," as much as I'm able to, the explanations I give. Look, I say patiently. There's no green start button. Linux computers don't get infected by viruses. Our systems are inherently more secure than Windows, and don't require you to surrender personal information to use. The reason Internet Explorer on Windows is so slow and insecure is because it tracks all of your personal information, all the time. Linux doesn't do that.

Being a female computer nerd is tough

Being a female Linux nerd is even tougher.

 First and foremost, when asked to explain something technical about an operating system, I'm almost always handed the most incompetent people. A couple of months in a "tech support" position answering telephones proved that. For the short while I was an employee of an ISP, some fairly friendly customers always requested to speak to me directly: old ladies, on-site "engineers" of rival providers and even co-workers would request my input about specific technical problems. The problem with my job (which I loved, minus the telephone part) was that it was in Utah, a place that historically treats women as "less than" men.

As a female techie, I can honestly say that our pay is less commiserate.  Our hours are more demanding. Our challenges are all in all, tougher.

Being in the land of Utah, the questions I received were always all about the Microsoft operating system. Yet. . . Microsoft has never paid me a dime for all of their dollars of profit.  Even after I applied to work there (dear Linux community, please forgive me; it was a long time ago).

And to this day, I still don't have an official employer. Along this path which has been riddled with frustration, I actually now choose to consciously shun employers who require "Microsoft" competence as part of a job description. As in "Microsoft ____" AKA Microsoft (Anything). Especially Excel. It's just not necessary. Being a female computer nerd is tough. Somewhere and some how, we need to erase this stereotype, and open up the idea of computing as being something *more* than Microsoft-based or hyped Apple marketing. 

 

Synchronizing console sessions

Some time ago i found `screen` utility.  With it you can synchronize input and output from two or more console sessions, e.g. for remote illustrations of something.

Read more... Comment (0)
 
Page 112 of 142

Upcoming Linux Foundation Courses

  1. LFS230 Linux Network Management
    06 Oct » 09 Oct - Virtual
    Details
  2. LFD331 Developing Linux Device Drivers
    13 Oct » 17 Oct - Virtual
    Details
  3. LFS430 Linux Enterprise Automation
    13 Oct » 16 Oct - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board