User Tools

Site Tools


opus:fall2012:dsherbur:part3

Part 3

Entries

Entry 1: November 28th, 2012

Today, I found something to get bash, or something like it, onto a windows environment. I like bash, and I don't have much experience with the windows command line interface. I have heard terrible, terrible things, though. This is important because the computer I am currently working on (I have named it “REDTOP” /cruise) has a locked uefi bios that will not allow me to install linux. I tried my damndest to no avail, but there are people, wizards I think they are called, working on a fix for this problem. If I had spent 1000 years in the astral planes consuming the souls of angles and dead stars, I might be able to aid them in their glorious battle. But alas, my experience renders me a mere child when palely compared to they, and I am not fit to lend my axe, let alone feast beside them in Valhalla. This could be significant because I almost always have this computer within arms reach, and when I want to do linux work at home, I have to get up and walk all the way across the room to one of my other computers, restart it, and boot up linux (so many steps!) just to get my bash on. Hopefully, this program called Cygwin will be an adequate solution. If, by some strange grace, someone is reading my barren opus, they may find the link to this Philosopher's Stone here:http://cygwin.com/ . I must say, though, it smells of fool's gold.

Entry 2: November 28th, 2012

After installing Cygwin and using it for about 5 minutes, I can say that I just might be happy with it. It is lacking a few things like ssh so I will have to find a new way to connect to lab46. There is a root directory and I was able to run my favorite incantation cat /dev/random, although this caused my terminal session to end… After a little research, I found that most packages are not included with a default install. I must re-run the installer and select those packages I want it to include, like python, games, openssh, etc. When I installed it before (for the first time), the process took about 5 minutes from start to finish with a prompt in my face. This install could take a while longer, since I went a bit inclusion-crazy.

Entry 3: November Day 30th, 2012

So I was thinking about why my favorite command (cat /dev/random) casues cygwin to crash. When I run it in lab46, it can run for as long as I care to let it run until i decide to kill it. I think there might be some sort of resource manager on lab46 that prevents overflows, and, I think, my computer has no such manager, allowing the command to make full use of my 3rd generation i5 processor. This could be a good experiment, but I dont think it is within the scope of my abilities.

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Entry 4: November Day, 2012

THE BEAUTY OF UNIX ON THE HOMEFRONT! GAMES, MOFO!!

Let's talk about something important. There is an incredible disparity among high school educated suburbanite white males aged 18-30, and that disparity lies in each of those males' choice of video gaming platform. The two most notable nations in this discussion are PC and console gamers. PC gamers are treated to incredible graphics capabilities along with the pure utility provided by a PC. Console gamers are locked in a 10-year cycle where the hardware is unchanged and unchangeable with very little additional utility. One exception to this rule was the PlayStation 3, which could be made to run linux. However, after a recent patch to the core of the system, this functionality has been axed. The USN was using a cluster of linux PS3's for super-computing and now they are stuck with a few hundred bricked playstations. Furthermore, PC gamers, through the help of services like Steam, can get great deals on great games. Almost any game that comes out for both PC and console will be cheaper to purchase on PC sooner than consoles. For example, it takes about 6 months for the price to drop on the Steam store, where it could take a year or more for a game to be added to Xbox's Platinum Hits collection. This is all well and good for a PC gamer operating on a Windows platform, but graphically intensive block-buster games are virtually nonexistent on a linux platform. But that could be changing soon. Steam is working diligently to get their entire library of titles to run on a linux platform, provided that the end-user has to hardware required to run those titles. Why is this important? Because linux needs gamers. Also, I am planning on building a gaming computer within the next year and it would be just super if I could limit my dependence on Windows. This could help linux become more mainstream. Many linux-using gamers are forced to dual boot with windows just to play their games. What a travesty! If Steam can get this project on the fast track, these users would use windows even less.

Keywords

unix Keyword 3

Identification of chosen keyword: umask

Definition of umask

The command umask is used to determine file modes at creation. Using umask on a file will determine the permissions of that file and all child processes resulting from that file. umask was used on Super Puzzle Box 2 Turbo (vim setup.exe). Where chmod changes permissions on a file, umask sets the initial permissions. In Super Puzzle Box 2 Turbo (the best Puzzle Box this side of the Danube), when the datafile is created, umask is used to set permissions to (octal) 777, ensuring that permissions will not be an issue when working with the file.

lab46:~$ umask u=rwx,g=,o=
lab46:~$ mkdir goop; cd goop
lab46:~/goop$ touch trees
lab46:~/goop$ mkdir pain
lab46:~/goop$ ls -l
total 0
drwx------ 2 dsherbur lab46 6 Nov 14 15:19 pain
-rw------- 1 dsherbur lab46 0 Nov 14 15:18 trees

Setting the umask values to what would be octal 700, which gives all permissions to the user and owner and no permissions to group or other, I have made private files. Changing umask again changes the permissions of newly created files.

lab46:~$ umask u=rwx,g=rwx,o=rwx
lab46:~$ cd goop
lab46:~/goop$ ls -l
total 0
drwx------ 2 dsherbur lab46 6 Nov 14 15:19 pain
-rw------- 1 dsherbur lab46 0 Nov 14 15:18 trees
lab46:~/goop$ touch park
lab46:~/goop$ ls -l
total 0
drwx------ 2 dsherbur lab46 6 Nov 14 15:19 pain
-rw-rw-rw- 1 dsherbur lab46 0 Nov 14 15:22 park
-rw------- 1 dsherbur lab46 0 Nov 14 15:18 trees

Note the difference in the umask line from the first block to the second block. We can use this to prank people who leave their terminals open by setting the umask vales to 0 across the board, making files that they create themselves unaccessible. However, umask can be changed and the files created under the permissionless umask and be changed via chmod to be accessible.

lab46:~/goop$ umask u=,g=,o=
lab46:~/goop$ touch jello
touch: setting times of `jello': Permission denied
lab46:~/goop$ ls -l
total 0
---------- 1 dsherbur lab46 0 Nov 14 15:26 jello
drwx------ 2 dsherbur lab46 6 Nov 14 15:19 pain
-rw-rw-rw- 1 dsherbur lab46 0 Nov 14 15:22 park
-rw------- 1 dsherbur lab46 0 Nov 14 15:18 trees
lab46:~/goop$ vim jello
lab46:~/goop$ chmod 777 jello; ls -l
total 0
-rwxrwxrwx 1 dsherbur lab46 0 Nov 14 15:26 jello
drwx------ 2 dsherbur lab46 6 Nov 14 15:19 pain
-rw-rw-rw- 1 dsherbur lab46 0 Nov 14 15:22 park
-rw------- 1 dsherbur lab46 0 Nov 14 15:18 trees

When I vim'd jello, i was greeted with a permission denied screen and I was unable to modify or write to the file, verifying the initial permissions of the file.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

unix Keyword 3 Phase 2

whiptail/dialog

Definition

Whiptail and dialog are used to make interactive dialog boxes from shell scripts. A good example of these programs at work is GIMMEH. It is important to note that a command line interface is not always the best solution. Sometimes, information is better presented in a more graphical manner, even though the mouse is still mostly vestigial.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Reference 1
  • Reference 2
  • Reference 3

Demonstration

Demonstration of the indicated keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

Experiment 3

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • Was your hypothesis correct?
  • Was your hypothesis not applicable?
  • Is there more going on than you originally thought? (shortcomings in hypothesis)
  • What shortcomings might there be in your experiment?
  • What shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

opus/fall2012/dsherbur/part3.txt · Last modified: 2012/12/06 18:23 by dsherbur