Programming :: Detect A Keypress Event In A Console Session?

Oct 27, 2010

Is any way to detect a keypress event in a console session? Preferebly without needing the application to be running in the foreground

View 2 Replies


ADVERTISEMENT

Programming :: Detect Keypress Without Needing Return?

Oct 21, 2010

I'm witting a piece of code that needs to read key presses. However I cannot use them as stream, but rather need discrete reads. The code is to simulate an io board interface. So When I press say "d" I need to read it in instantly, not wait for return. I've tried sdl, but no luck (I'm reading in a thread and it causes some problems) I'm using linux so can't use conio.h functions, I've tired gatch from cureses but this still waits for return.So in C/c++ is there a way I can read instant key presses.

View 1 Replies View Related

Slackware :: ACPI Does Not Detect Power Event?

Jun 5, 2011

Below is a piece of copy from my /etc/acpi_handler.sh

...
case "$1" in
button)

[code]....

View 14 Replies View Related

Programming :: Hashing The Components Of An Tcp Session To Assign/locate The Session In A Hash Table Bucket?

Nov 10, 2010

I have a very bad attempt at hashing the components of an tcp session to assign/locate the session in a hash table bucket. I am pretty sure that it has a very high collision rate and when there are a very large number of tcp sessions my application is having to search a long linked list to find the session within the bucket.

All the hashing functions I have found take a single string input where I need to input several integers and hash them into a single result. My guess is that any real hashing function is going to produce better results than what I am currently doing.

[Code]...

View 2 Replies View Related

Fedora Servers :: RDP As Console Session?

Aug 29, 2011

I have RDP working fine on my machine, however when I am signed in locally to the machine, I get the "console" session, which is fine, but when I want to RDP from another machine, I am put into a separate session, instead of "taking over" the console session.Is there a way to do this, similar to how RDP works on a windows machine?I have tried running the mstsc /console command, but I still get stuck into a non-console session.

View 1 Replies View Related

General :: Remote Console Session Over HTTP?

Jul 11, 2011

I'd like to remotely administer my Linux machine at home whilst I'm at work. Only ports 80 and 443 are avaiable, through an HTTP proxy. I don't want to install tunnelling software.What I really need is something that'll run on my server and display a console inside a web browser.

View 3 Replies View Related

General :: Control Console Session Keyboard Over Ssh?

Aug 13, 2011

I have a logitech wireless keyboard/mouse, but just lost the tiny usb wireless receiver.

I want to use my laptop as the keyboard for the other machine (Ubuntu 10.10) until I replace the keyboard and mouse.

Is it possible to control the console session's keyboard over ssh? I only want keyboard control, I don't want to use something like VNC because the video is too slow.

EDIT: I'd like to be clear that I want to be able to control gui applications running on the console session, so something like unix screen won't

View 3 Replies View Related

General :: How To Display Console Messages In Ssh Session?

Mar 2, 2011

I have logged as e.g. user1 via ssh into my machine. Then I perform `su -` to switch to root user and I don't see debug messages which are normally displayed when I log as root via system console.How to display console messages in ssh session ?

View 1 Replies View Related

Debian :: Console Only Session - Hard Drive Malfunction

Jun 16, 2009

My hard drive's file system has become totally mucked up. I had a few partitions on it, 0 is XP, 1 is vista, 2 is Debian, and 3 is the data. I know that it's this hard drive because when I disconnect it, any liveCD runs ok. After failing to boot puppy linux (liveCD), xp (bootmgr not found), debian (ended in kernal panic), I tried GPARTED. The xp and vista partitions are listed as existing, but they show a problem flag, gparted says they are corrupt, and they are not listed as having a start, end, or any data. However, the main data partition does list a start, end, size, and data space used.

I need to either format those or get into something that will let me access the data partition. Gparted either hangs on boot or doesn't recognise the mouse so I can't reformat the bad partitions. Are there any programs that will ignore the bad partitions and let me access the good ones? Any time I go into a linux distro it either ends up in kernel panic or the mouse doesn't respond. It's hard to explain. With GPARTED, sometimes it hangs at the third line, sometimes it fails at "mounting hard drives", and sometimes it makes it to the GUI but I can't use the mouse. Debian alternates between these as well.

If I keep trying it looks like I can boot, and it will recognise the partitions, but I can't use the mouse. I'm kind of familar with bash, is there a way to start up the terminal with no gui? If I could get a terminal up with a hotkey in the GUI or just start up from a terminal (no gui), I could type mv dev/sda3/ or whatnot. If I could get into a terminal of gparted I could format the bad parts of the drive to see if that would work. Otherwise it looks like I'm going to have to zero out the drive with the WD diag tool. The data isn't life or death, but it would save me some time.

View 3 Replies View Related

Programming :: Mq_notify Not Notifying About An Event

Nov 30, 2010

I'm using mq_notify to be notified about events on a message queue. But my registered notifier function is not being called. I'm pasting my code snippet below:

[Code]....

View 4 Replies View Related

Programming :: Event When Network Interface Goes Down?

Jul 13, 2010

I am trying to write an app that will perform some actions when a network interface is unplugged. Is there a way to get the OS to signal me when a network interface is unplugged. I have looked at DBus but can't figure it out.

View 1 Replies View Related

Slackware :: Telinit 4 - Kdm - Open Console Session Prevents Shutdown - 64 13.37

Jun 4, 2011

I have a question regarding runlevels, shutdown procedure and KDM. I am on a freshly installed Slackware64 13.37 multilib system. The default runlevel in /etc/inittab is set to 3: multiuser w/o X.

Now, I log in as root and issue the command:

Code:

As expected, KDM starts up, and I log in to KDE (or another WM/DE) as a normal users. When I am finished, I either issues

Code:

In Konsole or click on Shutdown in the KDE menu. The shutdown process is initiated, as expected, but then it stops, and a window alerts me, that there is a session open by user 'root'. If I click OK, the machine is finally shut down.

Now, if I interpret this correctly, the behaviour of Slackware64 13.37 has changed here, compared to 13.1. In previous versions, the root seesion was closed, when I changed the runlevel to 4 with the telinit command. Now, the session remains open, obviously.

My question is: Is this the correct behaviour, and isn't this a security whole? An unnoticed (!) open root session while I am surfing the web as an unprivileged user in KDE could be dangerous, I think...

Is it misconfiguration in my system, or is this the way it should be?

View 2 Replies View Related

Programming :: Event Device Nodes And Xorg?

Oct 14, 2010

When i create a new event device (/dev/input/event) it is automatically grabbed by Xorg:

Code:
(II) config/udev: Adding input device Keypad Emulation Driver (/dev/input/event7)
(**) Keypad Emulation Driver: Applying InputClass "evdev keyboard catchall"

[code]....

View 1 Replies View Related

Programming :: Invoke A ButtonPress Event Using XLib?

Nov 17, 2010

I'm working on an application which generates random shapes when clicking on a window. I designed the window using Motif. I want to invoke the ButtonPress Event .

View 1 Replies View Related

Programming :: Add Time Of Occurrence For Mouse Event In Xinput?

Jan 24, 2011

i need to have the time of occurence for mouse event in xinput,right now i run

Code:
xinput test <device_id> >log.txt
(for finding device_id using xinput list)

[code]...

View 4 Replies View Related

Programming :: Java Applets - Mouse Dragging Event

Jan 4, 2010

I know how to deal with a mouse click event like so:

Code:

But was happens when I am dealing with mouse dragging? Will my implementation of mouseDragged() get called for every pixel moved? So I just getX() and getY() like with a mouse click?

Also, in order to know when mouse dragging stops and starts, do I also have to put code in mousePressed and mouseReleased?

View 1 Replies View Related

Programming :: Run A Script On Switch-user Event Ubuntu 9.10?

Feb 18, 2010

How to do so? For starters, I'm not sure there is such an event. Maybe it has something to do with the OS moving through certain run-levels

View 6 Replies View Related

Programming :: Using Perl To Update Mysql Table On Certain Event?

Feb 6, 2011

I'd like to use a perl script to update a fields in mysql database when pianobar (command line pandora radio player) starts a new song. Pianobar has the ability to run a script based on events, I'd like to take advantage of and use perl toparse the artist,song,album and update the corresponding fields. Then later retrieve them and display them with php/html. I am by no means proficient with perl. I started to use bash, but it looks like perl will be much more efficient and and less time consuming.

Code:
#! /usr/bin/perl -wT
use strict;

[code]...

View 2 Replies View Related

Programming :: Python And Curses : Unable To Getch() For A Curses.KEY Event

Nov 8, 2010

When I getch() a key event (UP arrow key), the getch() function return a string of characters that I cannot compare with curses.KEY_UP constant. Here is the code I use :

while True:
w = gb.scrn.getch()
c = chr(w)
otp = 'touche:'+str(w)+' '+str(c)+"

[Code]...

It seems like getch() return three distincts bytes while I would retrieve it with a single ord() instruction in python like describes in curses/python documentation.

View 1 Replies View Related

Ubuntu :: Run Fsck On Keypress During Boot?

Jan 4, 2011

I am wondering if there is a way to manually trigger a file system check during boot by pressing/holding a key. Maybe there is already a keyboard shortcut built in to do this?I know that using tune2fs you can modify the number of boots (mounts) between file system checks, or even use "shutdown -rF" to reboot the system and force a file system checkAlso, I do not want to force the user to choose to run/skip the file system check during boot. For example, prompting the user with, "Do you want to run a file system check [y/n]?" each boot (or even each time the system thinks it should run a file system check),s not desirable

View 1 Replies View Related

Ubuntu :: One Keypress In Multiple Windows?

Mar 27, 2011

I have multiple windows open. I select one window, and press a key. This causes something to occur in said window. This keypress only works for the one window I have selected. I would like this keypress to work for all the windows open on my desktop, which total to 9.

View 4 Replies View Related

Ubuntu :: Executing A Script By Keypress?

Aug 6, 2011

Is there any way to map a shell script to run when you press a certain set of keys? For instance, I may want to execute the following by pressing CTRL+ALT+R (if that key combination is not already taken)

Code:

compiz --replace --loose-binding ccp

Or perhaps I want to open the System Monitor by pressing CTRL+ALT+DEL (a la Windows)

View 2 Replies View Related

Programming :: Programming A Game For Console?

Sep 25, 2010

What I want to do is create a game like an old DOS game, but on the debian linux console. I don't know much about linux yet, but I know C. What would be the best library for doing something like this?

View 8 Replies View Related

Ubuntu :: Simulate Keypress Via Keyboard Shortcut?

Feb 21, 2011

I have a G15v1. After going through hoops and loops to get it working only to discover that you only needed to install g15daemon through the Ubuntu Software Center, I found myself with one big problem. I migrated from windows just now, and there, I had my macro keys(the extra ones) bound to CTRL+W, CTRL+T and to a simulated mouse-wheel scroll so I could navigate the web more easily. How would I go about doing that? I figured, if I used the System->Preferences->Keyboard Shortcuts thingy and bound my key, in my case XF86Launch5, to a command similar to "simulate keypress CTRL+W"(I know it's totally wrong, just to give you an idea), I might be able to get it working again. Only problem is, I can't find anything like that. Any of you has any clue about it? I googled but I only find C++/Java/coding related results, which are not exactly what I need to do.

View 4 Replies View Related

Ubuntu :: Modify The Keypress Return Symbols?

May 8, 2011

When I press the keyboard button: (- _) I would like to see a '_' on the screen instead of a '-'. How can this be done? {Lucid 10.4}

View 2 Replies View Related

Programming :: Php Session Not Working?

Apr 21, 2011

I try to learn using session. I created sess1.php with the following code:

<?php
session_start();
// makes an array

[code]...

View 5 Replies View Related

Ubuntu :: Grub2 Waits For Keypress After Failed Boot?

Jan 6, 2010

Last week I installed minimal Ubuntu Karmic with XBMC live on my HTPC. I'm connecting to my fileserver thru a wireless interface and although that works like a charm most of the time, every once in a while the interface doesn't come up during boot and the PC 'hangs'.

I then press ctrl+alt+del and the pc reboots and the Grub2 boot menu appears, I suppose because the previous boot didn't go well. However, the boot menu doesn't have a timeout, I have to press <enter> to continue booting. My wireless USB-keyboard isn't working at that stage yet, so I'm unable to continue.

This is my /etc/default/grub

Code:
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash xbmc=autostart,nodiskmount,setvolume loglevel=0"
GRUB_CMDLINE_LINUX=""

How can I get it such that Grub always times out, even after a failed boot?

View 7 Replies View Related

Ubuntu Multimedia :: Flash 8 Firefox Keypress Not Working?

Feb 2, 2010

Firefox can't detect any keypresses from the programs I make. I use Macromedia Flash 8. Make a text box and give it the instance name"txt_test" add this actionscript code.

Code:
stop();
KeyListener = new Object();
KeyListener.onKeyDown = function() {
_root.txt_test.text = "OOOOO";
}

[Code]....

I want to either fix my firefox or make my program so that it can take input. Is it because I need to build my program with flash CS3 or 4?

View 2 Replies View Related

CentOS 5 :: Switch Between Full-screen VNC Instances With One Keypress?

Oct 9, 2010

OS: Centos 5.4
VNC Viewer Free Edition 4.1.2 for X

Switching between two instances of VNC viewer in full-screen mode takes three key presses and two mouse clicks. How can the viewer be configured to pass a special key combination to the host operating system instead of the remote OS, so it's possible to switch between full-screen viewers in one key press?

e.g. With the default configuration, if I put the viewers in adjascent workspaces, then the sequence to switch is: F8 MouseClick Ctrl+Alt+Left F8 MouseClick If the key combination Ctrl+Alt+Left was passed to the host then it would be possible to switch workspaces (and therefore viewers) in one key press. When working on multiple remote machines, both physical and virtual, it's often necessary to switch between them frequently. I must switch over 100 times some days. Simplifying the key sequence would be both quicker and more intuitive.

View 4 Replies View Related

General :: Execute A Program Based On A Keypress From A Specific USB Keyboard?

May 4, 2011

I've been given one of these ubiquitous usb-sleep buttons which is basically a supersimple usb-keyboard. It's a big button that sends a SLEEP keypress to the computer when you slam it. But that is pretty boring. I'd love to remap it to do something more fun but I can't figure out how to bind to only the sleep press from the button and not from my ordinary keyboard.

The button identifies as

Bus 001 Device 035: ID 1130:600d Tenx Technology, Inc.

I'd like to know if there's either

a way of mapping a key from a specific keyboard to an action OR a way of remapping the sleep key from a specific keyboard to a new key-code or something like that.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved