Sponsored Content
Full Discussion: Where am I?
Top Forums Shell Programming and Scripting Where am I? Post 302285638 by quirkasaurus on Monday 9th of February 2009 11:18:22 AM
Old 02-09-2009
Quote:
Originally Posted by ruben.rodrigues
Man, the idea is to not need to enter the directory. Is to write a script that tells me in which directory I am or in which file did I click

Oh. Try this, man.


Code:
#!/bin/sh
 
file=`zenity --list --title="Choose the FILE you wish to view" --column="File" *`
 
zenity --info --title="file, directory..." --text "directory: $PWD\nfile: $file"

 
LIRCMD(8)						  System Administration Utilities						 LIRCMD(8)

NAME
lircmd - LIRC mouse daemon translates infrared signals into mouse events SYNOPSIS
lircmd [options] [config-file] DESCRIPTION
This daemon can simulate a MouseSystems, IntelliMouse or IMPS/2 type mouse. It gets the received buttons from lircd and converts them to mouse events. To make this possible, lircmd needs a config file located in /etc/lircmd.conf. In this file you have to determine which but- ton from which remote causes a mouse move or a mouse button click. You can also specify a special button which activates or deactivates the mouse mode. -h --help display this message -v --version display version -n --nodaemon don't fork to background -u --uinput generate Linux input events OPTIONS
If you provide the --nodaemon option lircmd won't fork to background. On Linux systems the --uinput option will enable automatic generation of Linux input events. lircmd will open /dev/input/uinput and inject the simulated mouse events into the Linux kernel rather than creating the /dev/lircm device. FILES
lircmd will use syslogd to output error messages. It depends on your system configuration where they will show up. DAEMONS
lircd and lircmd are daemons. You should start them in some init script depending on your system. There are some example scripts for dif- ferent distributions in the contrib directory. lircmd has to be started after lircd as it connects to the socket lircd provides. If you start lircd or lircmd from your shell prompt you will usually get back immediately to the prompt. Often people think that the pro- gram has died. But this is not an error. lircd and lircmd are daemons. Daemons always run in background. SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory. lircmd 0.9.0-pre1 October 2010 LIRCMD(8)
All times are GMT -4. The time now is 10:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy