In linux your task is to automatically start and stop the ‘gnome-calculator’ application with the following guidelines:
Hi,
Here is the solution. please use root user to run the application because of link file and add argument like start,stop,status.
Here is Some Screenshots:
Screenshots:
Here is the code below. I hope you will like it. Please give the positive rating if you like it. Please comment below if you need to ask something.
-----------------------------------
#!/bin/bash
#sudo ln -s /home/kapil/Documents/control-script.sh /etc/rc2.d/159
myvar="$PWD"
#echo $myvar
file="/etc/rc2.d/"
if [ -f "159" ]
then
echo ""
else
sudo ln -s $myvar/control-script.sh
/etc/rc2.d/159
chmod +x /etc/rc2.d/159
fi
status= ps -ef | grep gnome-calculator | grep -v grep | awk '{print $2}'
case "$1" in
"start")
echo "Starting the application"
/usr/bin/gnome-calculator
;;
"status")
blank=""
if [ $status == $blank ]
then
echo "Not Running"
else
echo "Running"
fi
;;
"stop")
echo "Stoping the application"
ps -ef | grep gnome-calculator | grep -v grep | awk
'{print $2}' | xargs kill
;;
esac
----------------------------------
Thank you.....
In linux your task is to automatically start and stop the ‘gnome-calculator’ application with the following...
Login to Suse Linux as root. Complete the task working as the root user. 1. What is your current directory. What did you enter at the command prompt to determine your current working directory? 2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use...
Task (Python) A lot of police investigations start off by examining where the potential suspects was at the time of the crime. This is often done by asking phone companies to provide lists of all mobile phones that was in the area where the crime was committed around the time when it was committed. If there is only one crime scene this is not a big problem but if there are several crime scenes then the task of cross referencing...
For milestone #1, we will start the CARIT site with three static HTML pages and a CSS file. Create a dedicated folder for this project. This folder should contain all related files in this project. The future milestones are cumulative and built directly on top of your prior work. Function/content requirements: A home page named “index.html”, which include these contents at least: Description of the center. You may reference the example sites. Latest news: use list tags; make up some...
For this assignment your job is to create a two class application that examines the concept of a numerical palindrome. A numerical palindrome is a non-negative whole number that is the same forwards and backwards, e.g. 2332, 12321, etc. Here's the catch: suppose you do the following. Start with any positive whole number. If it's a palindrome, you're done; if it isn't, reverse the number, add the reversal to the original value, and test this new result. It it's a...
Need this in C++ Goals: Your task is to implement a binary search tree of linked lists of movies. Tree nodes will contain a letter of the alphabet and a linked list. The linked list will be an alphabetically sorted list of movies which start with that letter. MovieTree() ➔ Constructor: Initialize any member variables of the class to default ~MovieTree() ➔ Destructor: Free all memory that was allocated void printMovieInventory() ➔ Print every movie in the data structure in...
TokenisersBackgroundThe primary task of any language translator is to work out how the structure and meaning of an input in a given language so that an appropriate translation can be output in another language. If you think of this in terms of a natural language such as English. When you attempt to read a sentence you do not spend your time worrying about what characters there are, how much space is between the letters or where lines are broken. What...
PROBLEM STATEMENT: Suppose you have a client that has given you the following business rules to form the basis for a database design. The database must enable the manager of a company dinner club to mail invitations to the club’s members, to plan the meals, to keep track of who attends the dinners, and so on. Each dinner serves many members, and each member may attend many dinners. A member receives many invitations, and each invitation is mailed to many...
Game Description: Most of you have played a very interesting game “Snake” on your old Nokia phones (Black & White). Now it is your time to create it with more interesting colors and features. When the game is started a snake is controlled by up, down, left and right keys to eat food which appears on random locations. By eating food snake’s length increases one unit and player’s score increases by 5 points. Food disappears after 15 seconds and appears...
18.1 Lab Lesson 11 (Part 1 of 1) Part of lab lesson 11 There in one part to lab lesson 11. The entire lab will be worth 100 points. Lab lesson 11 part 1 is worth 100 points For part 1 you will have 80 points if you enter the program and successfully run the program tests. An additional 20 points will be based on the style and formatting of your C++ code. Style points The 20 points for coding...