Showing posts with label modes. Show all posts
Showing posts with label modes. Show all posts

Friday, August 9, 2013

Run-levels in Linux



A run level is a state of init and the whole system that defines what system services are operating. Run levels are identified by numbers. Some system administrators use run levels to define which subsystems are working, e.g., whether X is running, whether the network is operational, and so on. Others have all subsystems always running or start and stop them individually, without changing run levels, since run levels are too coarse for controlling their systems. You need to decide for yourself, but it might be easiest to follow the way your Linux distribution does things. The following table defines how most Linux Distributions define the different run levels. However, run-levels 2 through 5 can be modified to suit your own tastes. 

0
Halt the system.
1
Single-user mode (for special administration).
2
Local Multiuser with Networking but without network service (like NFS)
3
Full Multiuser with Networking
4
Not Used
5
Full Multiuser with Networking and X Windows(GUI)
6
Reboot.
Table: Run-Levels in Linux

When a Linux system boots, it enters its default run level and runs the startup scripts associated with that run level. You can also switch between run levels – for example, there’s a run level designed for recovery and maintenance operations.


Fig1: Readme File

Traditionally, Linux used System V-style init scripts – while new init systems will eventually obsolete traditional run levels, they haven’t yet. For example, Ubuntu’s Upstart system still uses traditional System V-style scripts. "Runlevel" defines the state of the machine after boot. Different runlevels are typically assigned to:
  • Single-user mode
  • Multi-user mode without network services started
  • Multi-user mode with network services started
  • System shutdown
  • System reboot

 What is a Run level?

When a Linux system boots, it launches the init processes. init is responsible for launching the other processes on the system. For example, when you start your Linux computer, the kernel starts init, and init executes the startup scripts to initialize your hardware, bring up networking, and start your graphical desktop.
However, there isn’t just one single set of startup scripts init executes. There are multiple run levels with their own startup scripts – for example, one run level may bring up networking and launch the graphical desktop, while another run level may leave networking disabled and skip the graphical desktop. This means you can drop from “graphical desktop mode” to “text console mode without networking” with a single command, without manually starting and stopping different services.
More specifically, init runs the scripts located in a specific directory that corresponds to the run level. For example, when you enter run level 3 on Ubuntu, init runs the scripts located in the /etc/rc3.d directory.


Fig2:rc3d File

At least, this is how it works with a traditional System V init system – Linux distributions are beginning to replace the old System V init system. While Ubuntu’s Upstart currently maintains compatibility with SysV init scripts, this is likely to change in the future.

Run levels:

Some run levels are standard between Linux distributions, while some runlevels vary from distribution to distribution.
The following runlevels are standard:
  • 0 – Halt (Shuts down the system.)
  • 1 – Single User Mode (The system boots into super user mode without starting      daemons or networking. Ideal for booting into a recovery or diagnostics environment.)
  • 6 – Reboot
Run levels 2-5 vary depending on distribution. For example, on Ubuntu and Debian, run levels 2-5 are the same and provide a full multi-user mode with networking and graphical login. On Fedora and Red Hat, runlevel 2 provides multi-user mode without networking (console login only), runlevel 3 provides multi-user mode with networking (console login only), runlevel 4 is unused, and runlevel 5 provides multi-user mode with networking and graphical login.

Switching to a Different Runlevel:

To switch to a different runlevel while the system is already running, use the following command:

            sudo telinit #

Replace # with the number of the runlevel you want to switch to. Omit sudo and run the command as root if you’re running a distribution that doesn’t use sudo.

 Fig3:Terminal window

Booting Directly to a Specific Runlevel:

You can select a runlevel to boot into from the boot loader – Grub, for example. At the start of the boot process, press a key to access Grub, select your boot entry, and press e to edit it.
 

Fig4:Login window

You can add single to the end of the Linux line to enter the single-user runlevel (runlevel 1). (Press Ctrl+x to boot after.) This is the same as the recovery mode option in Grub.

 Fig5:Mode verify

Traditionally, you could specify a number as a kernel parameter and you’d boot to that runlevel – for example, using 3 instead of single to boot to runlevel 3. However, this doesn’t appear to work on the latest versions of Ubuntu – Upstart doesn’t seem to allow it. Similarly, how you change the default runlevel will depend on your distribution.
While Ubuntu’s Upstart daemon still emulates the SystemV init system, much of this information will change in the future. For example, Upstart is event-based – it can stop and start services when events occur (for example, a service could start when a hardware device is connected to the system and stop when the device is removed.) Fedora also has its own successor to init, systemd.

Thursday, July 4, 2013

Monect: Controller of your PC



In today’s era most of world’s population uses Smart phones. Using your Android to control your computer is a great way to interact with programs. Your phone can be used a track pad, or could be used to use a media player using custom controls. Monect lets you take things further by turning your Android device into all manner of peripherals.


 


Fig1: Monect

What Are the Options?

There are plenty of apps available in Google Player that let you use your phone or tablet as a wireless keyboard or mouse for a computer. Monect can be used in this way, but it also boasts a number of other options that cater to a variety of scenarios.




Fig2: Description of Monect

This free app can transform your phone into not only a mouse or keyboard, but also a joystick, gamepad, media controller and much more. It’s great for gamers, but options such as text transfer and presentation mode open up additional opportunities. There are two components to the tool, the Android app and the desktop server. A package containing both pieces of software can be downloaded from its Hotfile hosting page.





Fig3: Downloading Zip file

There’s no need to sign up for an account, just click the Regular Download button, wait for the timer to count down and then click the download link. You may see a warning from your browser or AV tool that the file is potentially harmful, but this is simply a case of over-zealousness in detecting a tool that is used for remote access.




Fig4:

You’ll need to extract the contents of the zip file and then launch the file named Monect-Host. You’ll probably find that your firewall kicks in and you’ll need to allow the program to make use of your network in order to continue.




Fig5: Security Alert Window

Getting Connected:

Assuming your phone and computer are connected to the same wireless network, it will take a matter of seconds to establish a connection.
On your phone or tablet, install a copy of Monect from Google Play, launch the app and then either type in the IP address of your computer and tap Connect, or tap ‘Search host’ to scan for and connect to your machine.  If you find that you are unable to connect, trying restarting Windows to ensure that the installation is complete.


Fig6:

Once connected, you’ll see that are no less than 12 different modes to choose from; in most cases it is fairly obvious what each one does, and each can be used in different ways.




Fig7: Modes

Controller Modes:

Touchpad mode turns your phone into a laptop-style track pad complete with a scroll bar to the right. In this mode you can also access 3D Mouse mode which enables you to move the cursor around by using your phone as a laser pointer.





Fig8: Touch Area

Typewriter keys, Function keys and Numeric keypad are all modes in which you can use your phone as a keyboard. This can be handy if your keyboard is broken and you need a temporary replacement, or you are using a laptop or keyboard without a number pad.





Fig9: Options(1)

In Text Transfer mode it is possible to type and prepare text on your phone and then send it to whatever application currently has focus on your computer.



Fig10: Options(2)

Switch to My Computer mode and you can browse the contents of your hard drive from your Android device. Folders can be easily navigated, and files can be opened remotely, or downloaded to your phone – just tap and hold to bring up the option menu.




Fig11: My Computer Mode

Things start to get particularly interesting for gamers in Race, Joystick and Shooter modes. The app takes advantage of your device’s built in gyroscope so that it can be used as a steering wheel, a more traditional joystick/gamepad or as a crosshair control for FPS games.


 


Fig12: Gaming Options

The remaining three modes, PowerPoint, Browser and Media mode are ideal for when your computer is connected to a larger screen, projector, or a TV. Each mode features the touchpad area and mouse buttons.
In each case there are task specific buttons at the top of the screen. So whether you are looking to control video playback from the comfort of your sofa, or you want to be able to browse the web on your TV without having to battle with a regular keyboard and mouse, Monect makes it easy.




Fig13: Other Options



Monect is a free app that allows you to control the PC over Wi-Fi or Bluetooth,
Here are features:

• Race Mode - Play PC driving game by your phone over Wi-Fi or Bluetooth using   G-Sensor.

• Touchpad - Simulate touch pad on your phone with many gestures supporting, just like Apple's track pad! 

• My Computer - Exploring PC files on your phone.

• Joystick - Simulate joystick so you can play street fighter or dmc etc.

• FPS mode - Using gyroscope to aim the target just like a real gun in your hand, perfect support COD serial.

• Keyboards - Simulate typewriter keyboard, function keyboard, numeric keyboards.

• Text transfer - Type text on your phone and then transfer text to PC directly with one hit.

• PPT mode - When you need to have a lecture or a meeting, use this to make it easy.

• Browser, Media Control- Easily control all kinds of web browser & media player!


Thus using this app. Wish You Best Luck!!!