Sunday, September 21, 2008

Timekeepr - Keep control of computer usage

This program will track and control the computer usage of your user accounts. You can limit their daily usage based on a timed access duration and configure periods of day when they can or cannot log in. With this application, administrators can limit account login time duration or account access hours.

DEVELOPMENT:

  • This program is heavily depended on Linux-PAM and its time and access modules.
  • Beta 5 has been released, and now supports Ubuntu, Kubuntu & Xbuntu version 8.04 and 8.10 - Special thanks to .nedberg for this much anticipated release.
  • If you would like to contribute to the code, join the timekpr-maintainers team on launchpad.
  • Current status indicated below:
    - Ubuntu Hardy: Works
    - Ubuntu Intrepid: Works
    - Kubuntu Hardy KDE3: Works
    - Kubuntu Interpid KDE4: Works
    - Xubuntu Hardy: Works

HISTORY & CREDITS:

  • This project was born after Charles Jackson's (crjackson) request for a program that time-limits user accounts:
    Ubuntu Forums. You can also find a progression of the history posted at the
    Bucknasty. blog.
  • This is a complete re-write in python and vast improvement from the original timekpr bash script:
    Waggledance.
  • Even Nedberg initially began to improve the original bash script from Chris Jackson. Savvas Radević packaged it and soon began co-development.
  • Special thanks go to Charles Jackson (crjackson), who has contributed a lot by suggesting, brainstorming useful features, writing the initial blueprint, and
    being the primary tester.
  • We would also like to thank all the people posting to that topic in ubuntu forums for their comments.

Additional Information
Developers Even Nedberg and Savvas Radević (or .nedberg and forger) of the Ubuntu forums have rewritten the package using python as opposed to the bash shell script of it's previous form. timekpr now has a full featured interface with the ability to change and grow as needed. The beta 3 release adds support for both KDE and Xfce versions of Ubuntu 8.04 & 8.10.

I have requested an additional feature of a black-out setting that would let you slice a chunk of time right out of the normally allowable login hours. This would be for designated home work time, or other required activities. Please bookmark this page for future updates.
- Charles

INSTRUCTIONS
Download the deb file and double click on it to install. Configure your users, click apply and then quit when done. Just remember to check back here to always get the latest version available.

Intrepid Ibex Users should install by adding Even's PPA repository to there software sources list, and then use your package manager to install. This will always give you the latest version and keep your system updated.

Stable repository:
deb http://ppa.launchpad.net/timekpr-maintainers/ubuntu intrepid main
deb-src http://ppa.launchpad.net/timekpr-maintainers/ubuntu intrepid main


Development repository:
deb http://ppa.launchpad.net/nedberg/ubuntu intrepid main
deb-src http://ppa.launchpad.net/nedberg/ubuntu intrepid main


Prior to installation, you must Un-install any previous versions by running the code below in a terminal session.
sudo dpkg --purge timekpr


Blogged with the Flock Browser

Okay, I,m testing the Flock Browser for my Bolggin Needs

This is a test of the Flock Browser.  If this works out, I'll be removing "ScribeFire" from Firefox 3 and using this.  I haven't have much luck lately with ScribeFire sooo...  I hope this works out.  Well it seems to work very well so far.  Not much choice in font sizes and control, the the blog site itself is limited.  When using ScribeFire I have lots of choices in font contro, the only problem is that the Blog Site doesn't accept them properly and that's been causing problems.  I would prefer to be limited by my blogging application in a manner that reflects the capabilities of the actual posting site.  At least the bolg won't look messed up when some one views it.

I'll be blogging more today about the progress of Timekeeper.  It has come a long way and need a new blog post to reference.  I'll explain more on that later.

Friday, September 5, 2008

timekpr.sh - Limit Daily Desktop Usage in Ubuntu

NEW GUI VERSION
Here is the install script: install_timekpr.sh - Download the script to your desktop, open up a terminal and paste the following into the terminal. cd Desktop (remember to use a capital 'D') sudo bash install_timekpr.sh

This script will make sure you have the latest version. You still need to edit /etc/rc.local and add /usr/local/bin/timekpr.sh & to make the script run at boot. The GUI should be self explanatory, but here is a short how-to:
Select the user you wish to configure
  1. Check "Use limits" if you want to use timed limits
    a) Set the "Every day" limit or
    b) Check "Configure single days" and set different limits for every day of the week

  2. Check "Use boundaries" if you want to control when the user can log in
    a) Set the "Every day" boundaries or
    b) Check "configure single boundaries" and set different boundaries for every day of the week

  3. Click "Apply" if you want to configure another user, OK if you are finished or Cancel to just exit.

To Un-Restrict a user, select the username, uncheck both "Use limits" and "Use boundaries" and click Apply/OK


Blogged with the Flock Browser

Tuesday, August 19, 2008

How to Limit Daily Desktop Usage in Ubuntu

This is not my script but I'm placing it here for me and my family to reference. It comes from another blog called "Waggle Dance" The link to that bog is posted on the left hand side of this page under "My Links". All credit for the following scripts go to the author of the original timekpr.txt, and to Ubuntu Forums member .nedberg for making the modifications and additional two scripts I requested in this thread.

Here's the original content.

I have been looking for a way to limit the amount of time my kids spend on the computer. After toying with a couple of different things like timeoutd and pam_time, I decided to hack together something to meet my needs:
  1. My kids share a PC with their Mom using fast-user-switching, so I needed it to keep track of multiple sessions.

  2. I needed different times for different users ( Mom wouldn’t be toothrilled with me forcing her to log off after an hour or two )

  3. I wanted everyone to get ample warning so they could save their work and logout cleanly.

With those ideas in mind I came up with this:

timekpr - (Modified - this is not the creator's original version)
What timekpr does is watch for instances of the session manager, keep a running tally of the time they are running, and logs kills it when time is up. Several libnotify alerts let the user know when thier time is running out.







It’s pretty rough right now ( just a couple of hours of research and bash hacking ) but it just kicked my son of the PC after his alloted hour and a half, so it’s functional - YMMV - I need to allow for different time limits on the weekends, and it uses a less than elegant method for
shutting down gnome-session, so it’s very much a work in progress.

Lets make sure you have the notifier libs installed so that you can get the nice graphical notifications that your user is about to be kicked to the curb. Open up a terminal and paste
this:

sudo apt-get install libnotify-bin

To install it, down load the script, timekpr , and rename it. Copy it someplace useful and make it executable:

mv timekpr.txt timekpr.sh
chmod 755 timekpr.sh
sudo mv timekpr.sh /usr/local/bin


Next make a directory for the time tracking files and limits:

sudo mkdir /var/lib/timekpr

I added a line to /etc/rc.local

/usr/local/bin/timekpr.sh &

to start the script after a re-boot.

To limit someone’s per day usage, just add the number of seconds they will be allowed to a file in /var/lib/timekpr

sudo -i
echo 7200 > /var/lib/timekpr/username
where username is the account you want to time limit.

IMPORTANT UPDATE - NEW VERSION

This is a new version and needs a new config file for each userername located at:

/var/lib/timekpr/username

To use the new script, login to a terminal with root permissions and delete the old script AND all the old user configuration files and REBOOT your system. Then install the new script and create all new username config files. Then paste the settings (as shown below) into the newly created confg files. Reboot your system again, and the script should work it's magic provided you have added it to the: /etc/rc.local file as instructed above. If you don't create a configuration file for any user, they will have unrestricted access.

Each of the username files should have the following format:
limit=( 345 345 345 345 170 345 345 )
from=( 7 7 7 7 7 7 7 )
to=( 22 22 22 22 23 22 22 )

Each of the seven numbers on a line stands for the value of that certain day of week

(SUN--MON--TUE--WED--THR--FRI--SAT)

An unrestricted user does not need this file, so don't make one for yourself.

To start the script without rebooting, open up a terminal session and type:
$ bash /usr/local/bin/timekpr.sh


You need to be sure that libnotify is installed. Type the following code in a terminal session.

$ sudo apt-get install libnotify-bin

Here are the scripts
- Notice the 2 extra scripts for added usefulness.

timekpr.txt
This is a modified version of the original. It lets you set additional time controls that prevent the user from being able to login outside of the allowable limits (7 & 22 by default) of 0700 & 2200 hours.

addtime.txt
This is a "rewards" script to give additional time to your well behaved little users. This script (when ran) is only effective for the day you run it. Run this script in the following format:

sudo addtime.sh
This does not expand the login hours regular boundaries of 0700-2200 hours.

extendlimits.txt
This script will allow you to set user privileges to extend beyond the default login boundaries of 0700 to 2200 hours. This is only effective for one session and will reset when the timekpr.sh script is next executed. To run this script, use the following format:

sudo extendlimits.sh

What's ahead?
.nedberg of the Ubuntu Forums is currently working on a GUI frontend for this script. Here is a preview of the work as it stands.

Saturday, August 16, 2008

Enemy Territory: Wolfenstein - Complete Install Guide for Hardy

Make sure that the driver to your 3D graphics card is properly installed and working by opening up a terminal and typing:

glxgears

Be sure your sourcelist is correctly set and download the relevant libs to Wolfenstein.

sudo aptitude update && sudo aptitude safe-upgrade

sudo aptitude install libc6-i386 libgtk1.2

wget http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb

sudo dpkg -i getlibs-all.deb

INSTALLATION:

Open the terminal and type;

cd ~/Desktop

wget -c http://ftp.games.skynet.be/pub/wolfenstein/et-linux-2.60.x86.run

chmod +x et-linux-2.60.x86.run

sudo sh et-linux-2.60.x86.run

NOTE: It's important that you exit the installer window and do not press the installers play button. It will course permission problems for Wolfenstein.

Get any missing dependencies

getlibs /usr/local/games/enemy-territory/et.x86

Build a Launcher in the Games Menu


sudo nano /usr/share/applications/etwolfenstein.desktop

Add the following;

[Desktop Entry]
Name=Enemy Territory: Wolfenstein
Comment=Wolfenstein:
Enemy Territory is an online multi-player game, where the players
interact with each other over a network in two teams (Axis and Allies)
to defend or destroy mission objectives.
Exec=et
Icon=/usr/local/games/enemy-territory/ET.xpm
Terminal=false
Type=Application
Categories=Application;Game;


Then save (ctrl)+(o) and exit (ctrl)+(x)

Wolfenstein: Enemy Territory - no sound fix

The following is information I found by searching the internet for making the sound work in my WolfET installs. I found this information in 2 seperate forum posts and I take no credit for the accuracy of this information.

I have tried this on 3 different systems of mine, and it works on all 3. I have no idea why the commands in the first group do not match the second (i.e. sudo echo... vs sudo sh -c "echo...")

I personally used the 1st group when I tested and found it to work perfectly. The second group was found when I was looking a permanant fix (holds after reboot). I would guess they both do the exact same thing but use a slightly different command.

Older games like Wolf: Enemy Territory and Quake3 do not support ALSA (Advanced Linux Sound Architecture), the older games support OSS (Open Sound System) . The commands below direct the game to use OSS.

For WolfET
As root user (sudo -i) type:
sudo echo "et.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss

For Quake3
As root user (sudo -i) type:
sudo echo "quake3.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss

The commands I posted only effect the games. After I'm done with the game everything else works good like Gaim and Rhythmbox. The commands I posted are only good for that session, after a reboot, I have to re-enter commands.
Try type this on terminal

sudo sh -c "echo 'et.x86 0 0 direct' > /proc/asound/card0/pcm0p/oss"

sudo sh -c "echo 'et.x86 0 0 disable' > /proc/asound/card0/pcm0c/oss"

Then test the game. If sound works, you can apply this fix permanetly by typing in terminal:

sudo gedit /etc/rc.local

and add these lines end of file

echo 'et.x86 0 0 direct' > /proc/asound/card0/pcm0p/oss
echo 'et.x86 0 0 disable' > /proc/asound/card0/pcm0c/oss
exit 0




Friday, August 15, 2008

What is the equivalent of Ctrl-Alt-Del in Ubuntu

Press the Alt+PrntScrn(SysRq) keys and hold them down while you type each of the following keys in order: R-E-I-S-U-B

R switch the keyboard mode
E send all processes the SIGTERM singal
I sends all processes the SIGKILL signal
S Sync filesystem
U Unmount all devices
B reboots the system (typing O instead will turn the computer Off)

Theoretically you could just do Alt+SysRq+B to do an old school, Win 95 style Ctrl+Alt+Del reboot, but it’s just as bad as hitting that power button. Your best bet is to run the whole sequence to ensure that the system shuts down in the way it would normally shut down when you issue a reboot command.

And it’s almost guaranteed to work even on a completely locked up system. That is, if it’s enabled on your system. If you are not sure, do a really quick test right now:

cat /proc/sys/kernel/sysrq

If you see a 1, you are in good shape.
If you see a 0 (zero), you can enable the SysRq keys by doing:

sudo echo 1 > /proc/sys/kernel/sysrq

How to add the source of Ubuntu Tweak

No matter your Ubuntu is Feisty, Gutsy or Hardy, open your terminal, type the command to run gedit(or other editor in your opinion) to modify the sources.list:

sudo gedit /etc/apt/sources.list

And put the two line into it:

deb http://ppa.launchpad.net/tualatrix/ubuntu hardy main
deb-src http://ppa.launchpad.net/tualatrix/ubuntu hardy main

Then update the source and install or upgrade Ubuntu Tweak:

sudo apt-get update
sudo apt-get install ubuntu-tweak

if you have installed, just type:

sudo apt-get dist-upgrade

Thursday, August 14, 2008

Randy - To Fix your refresh rate try this

Okay, I was able to fix this problem by doing this:
Open up a terminal session and paste sudo displayconfig-gtk

then set the screen model to your exact monitor. After doing that, you should be able to change your refresh rate using the System->Preferences->Screen Resolution program.

Also have a look at the ATI links posted in the "My Links" section to the left of this page.

Reconfigure your ATI Driver - Instructions for Ubuntu 8.04 (Hardy)

Enable accelerated the accelerated ATI graphics driver in the restricted-manager, then open a terminal and past the following code:

sudo dpkg-reconfigure -phigh linux-restricted-modules-`uname -r` && sudo insmod /lib/modules/`uname -r`/volatile/fglrx.ko

Log out and log in.

Friday, August 8, 2008

Version Locking Packages and Kernel

COMMAND LINE METHOD:
Locking the version on a package prevents it from being upgraded. I'll show you two ways to do this. The first is to open a terminal and type: sudo aptitude hold linux-image-`uname -r` Those ` are backticks, usually located to the left of the 1/! key.


SYNAPTIC PACKAGE MANAGER METHOD:
For those who prefer to use GUIs, open Synaptic and scroll down to where the packages named linux-image- and then some numbers are. Find the one you are using (probably the highest number), and click Package > Lock Version. Both of these will prevent the kernel from upgrading at all.

OK, now you need to release those holds.
Synaptic, that's no problem. Just un-check it, do the upgrade, then make sure you lock version on the new one. For the command line one do
sudo aptitude unhold linux-image-`uname -r`. Redo all your tweaks of course, and you're good to go.

Wednesday, August 6, 2008

Bonus Check

Today I got a bonus check from my employer, a plaque, a service ribbon, and a letter of commendation. You might say it's been eventful. I'm very appreciative towards my boss for recognition because I've definitely been loyal and a producer of results. It's all about the bottom line, and I'm good at that.

As a result of the bonus check, I'll be taking some time off from work (just a day) and visiting my son who just moved into his new house with my Daughter-in-law and my grand baby Audrey. I can't wait to see them.

I'll also be traveling a route that allows me to visit my parents and siblings, and that will also be great.

That's all I've got for the day. I can't wait for some more great Ubuntu updates and/or bug fixes. Goodnight...

Monday, August 4, 2008

RaLink RT2500 rev 01 speed tweak...

If you have this wireless card and it won't connect at a good speed (mine only connected at 1M) then you will love this tweak. First you have this card. In a terminal session issue the "lspci" command and look for this:

"
01:09.0 Network controller: RaLink RT2500 802.11g Cardbus/mini-PCI (rev 01)"

Next, Check you speed (right click on the connection and choose Connection information). If it says anything less than 54Mb/s, open up /etc/rc.local (as root) and add the following lines:
Code:
ifconfig wlan0 up
iwconfig wlan0 rate 54M
Replace wlan0 with you interface name. Worked for me.

To put in to effect immeadiately, open up a terminl and run:
sudo /etc/init.d/networking restart

Install audio and video codecs in ubuntu

Open up a terminal (applications -> accessories -> terminal) and copy/paste this code:
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list && wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update && sudo apt-get install -y ubuntu-restricted-extras non-free-codecs w32codecs totem-mozilla libdvdcss2 libdvdnav4 gxine totem-xine xine-ui libdmx1 libxine1 libxine1-ffmpeg libxinerama1 libdvdread3

That’s it.

(if you use 64bit, replace w32codecs with w64codecs)


————–

If you are looking for a better audio player, I suggest either exaile or bmpx.

You now have 99% of the codecs in the world installed on your system.

Saturday, July 26, 2008

2 Kittens Adopted - 3 to go

Last night at work I got a call from my wife Joy. She told me that lots of people have been calling her after listing the kittens for adoption on craigs list. As it turns out, 2 of the white kittens got adopted by some very nice people while I was at work. I'm glad I wasn't home when it all took place. I'm kind of sad about the whole thing.

There are 3 kittens left. One is solid white, one is an orange/white tiger striped kitty, the last (the runt) is my favorite. She is orange, white, and black. I don't know if I can let that one go... Stay tuned...

Sunday, July 6, 2008

4th of July - BORING...

The 4th of July has come and gone for 2008 and it was really boring. It's been raining all day and screwed up my plans to finish the repairs on my stairway to the back porch. I finally have the constructed and they look nice. The problem is that I haven't figured out a good way to attach them to the porch. My back porch is in tested condition and not really constructed by a professional (it was built by the previous owner I suppose).

It's looking like I'm going to have to find a way to improve the porch it's self before I can safely attach the stairs. Bummer! This should have been a 1 day job, but this is my 2nd weekend working on this monstrosity.

I was thinking of upgrading my Ubuntu installs on the 2 machines used by the kids (They're still running 7.10) but I decided not to fix it since it's not broke.

So back to my original title... BORING...

I guess that's it for now...

Friday, July 4, 2008

Lots of things...

Wow! Ubuntu 8.04.1 was released today. I may do a fresh install on my desktop just to see if it fixes a problem I'm having with Firefox 3.0

I installed a Mac Leopard theme and it looks great. Really liking the look and feel of things.
Joy got a new HP laptop with Vista (Yuk), but the Laptop is great. Very fast. Heck, it has 3GB of ram. That's more than my desktop.

Joy is warming up to Ubuntu a little. She prefers to do her school assignments using Ubuntu.

Sunday, June 15, 2008

Father's Day...

It's been a while since I last checked in. Ubuntu has hundreds of new updates and fixes. I've ordered a new Intel MiniPCI wireless card for my eMachines laptop (better supported in Linux). My niece had a baby boy 2 weeks ago. His name is Ashton Jace...

AND it's Fathers day. We went out to eat last night but the grill is fired up today and the beer is cold.

I got a new pressure washer for Fathers day, I've been playing with that and all I can say is wow! Those things are awesome. I can't believe how well it has cleaned the sidewalk and the brick on my house. It will have lots of use down the road. Everyone wants to play with it. It's my present to myself, but I don't mind everyone else doing the work..

Thursday, May 22, 2008

Runnin Good... Hardy Loves eMachines Lappy

Well the install was pretty uneventful. Setting up wireless was different. I no longer needed the windows driver or ndiswrapper. The ristricted driver saw my hardware and with a reboot I had wireless. My only complaint is that it's a 1 MB/S connection. Now, that doesn't really seem to make any practical difference as it downloads and streams video/music just as fast as always. I would however like it to show a faster connection.

All my usual apps. installed without a hitch and I moved my data from the old home folder to the new one. The machine seems to be a little faster but nothing to blow your socks off. However Firefox 3 is much faster and nicer to use.

Under Gutsy, I always had an annoying issued with sound playback. It would skip at about a 3-5 second interval and continue until playback was stopped. This would happen on nearly every media player except that I had NO PROBLEMS with exaile music player and MPlayer Movie Player. Any thing else and it was an issue...

With Hardy 8.04 installed, I have no more sound issues on this machine.

It seems that something was improved with ALSA or perhaps that now it's running PULSE AUDIO that was the fix. I don't know, but I'm loving it so far...

MUFFY UPDATE: Muffy delivered 7 healthy kittens 3 days ago.... Anyone want a Kitten?

Saturday, May 17, 2008

eMachines m6809 - Hardy x86 Install

I'm backing up my personal laptop right not using Acronis TrueImage. When I'm done, I plan to move my home folder to a save place and then I'm going to wipe the Gutsy partition in preparation for a clean install of Hardy. My current setup runs so well that I've been putting this off, but I can't resist anymore. If it runs like crap or something, I can just restore my disk image and the laptop will never know it was violated. I hope... I'll report back after the install.