LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-09-2003, 04:11 PM   #1
vrillusions
Member
 
Registered: Feb 2003
Location: Ohio, USA
Distribution: Ubuntu, Debian, CentOS
Posts: 99

Rep: Reputation: 25
[script] a better vlock


OK, not sure if this is the best forum/way to do this (i.e. put [script] at the beginning to show that it's a script), but I figured I set up a simple script that makes vlock work a lot better then before. Mainly I wanted it to do two things; lock the entire computer (or laptop in my case) and clear the whole screen so you can't see what I was working on. Thus I made the following...

NOTE if you see `something` that means type something in the command window and to not include the `s in it.

Prerequisities:
vlock installed (duh)
using bash (that's what the script is, although it should work with others)

cd to where vlock is. You can find out by typing `which vlock`
Login as root if you haven't yet
type `mv vlock vlock-bin`
type `vi vlock`
enter the following:
Code:
#!/bin/sh
#Clear screen
clear
#Now lock out the whole computer
vlock-bin -a
then do `:wq` to save it
type `chmod +x vlock`

now when you type vlock it will clear the screen and lock out the whole machine. Haven't tried this in a telnet session to see if gives you some error because there's only one screen then. Just something simple that I figure other's might benefit from.

Another option, if you don't want to modify how it works when you type vlock (for example, a lot of people use this machine) you can leave the orignal vlock how it is, change the script to vlocka or something and change the vlock-bin back to vlock. then type vlock for normal lockage and vlocka for better lockage
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables (with masq) troubleshooting, very simple script attached script and logs. xinu Linux - Networking 13 11-01-2007 05:19 AM
getting vlock for slackware vrillusions Linux - Software 2 05-24-2004 04:03 PM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 05:21 PM
vlock substitute? Narooze Linux - Software 4 01-05-2004 05:27 PM
compiling vlock for 9.1 vrillusions Slackware 2 11-28-2003 05:42 PM


All times are GMT -5. The time now is 08:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration