LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-09-2008, 04:41 AM   #1
bt101
Member
 
Registered: Mar 2008
Posts: 31

Rep: Reputation: 15
Software to Display a Large Menu for Remote Control?


Hi - Does anybody know of software that will display a large graphical menu where you can scroll around and make selections?

I just got a remote control working with my linux box. I can grab the keys sent by the remote and do various things, and it works well. I would like to both expand and simplify this system by just displaying a large menu where I can make selections. I'm hoping I don't have to write it from scratch. I'm looking for something that will display a large menu of either text or icons. I would prefer something inside a window rather than a full screen menu. I would imagine that you would edit a config file where you specify the text to be displayed and the corresponding command to run. You would use arrow keys to scroll around.

If anybody has any thought, please let me know.

Thanks
 
Old 03-09-2008, 09:41 AM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
the easiest/quickest way to go about that is to write a web interface for your remote in PHP or perl.

When I do such things, I usually have a C program that actually handles my device interface, and I invoke that C program from PHP to obtain its output and to provide it with necessary inputs. Then I just build an HTML page and pass the information back and forth.

The downside to this is that it is heavy. You need to have apache running and your GUI is a webpage. The upside is that it is quick and easy - a lot quicker than writing a gtk interface, for sure. It is also automatically a remote control; you can call that interface up from any computer that can talk to your apache server.
 
Old 03-09-2008, 12:25 PM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
It's my understanding that bt101 prefers an available solution (which I don't know).

My personal favorite for this type of work is Tcl/Tk.

Code:
#! /usr/bin/wish

# procedure to read IR data from a file and send it over an interface
proc send_cmd cmd {
    tk_messageBox -title "send command" -message $cmd

# todo:
# 1) open,read and close commandfile containing IR data
# 2) open device and write command
# 3) close device
}

# keys
# a list of available keys
# format:
#  category keyname value2display IRdatafile

set keys[list\[list "num" "K1" "1" "cmd_1.dta"] \[list "num" "K2" "2" "cmd_2.dta"] \[list "num" "K3" "3" "cmd_3.dta"] \[list "num" "K4" "4" "cmd_4.dta"] \[list "num" "K5" "5" "cmd_5.dta"] \[list "num" "K6" "6" "cmd_6.dta"] \[list "num" "K7" "7" "cmd_7.dta"] \[list "num" "K8" "8" "cmd_8.dta"] \[list "num" "K9" "9" "cmd_9.dta"] \[list "num" "K0" "0" "cmd_0.dta"] \[list "prog" "Pplus" "P+" "cmd_pplus.dta"] \[list "prog" "Pminus" "P-" "cmd_pminus.dta"] \[list "vol" "Vplus" "V+" "cmd_vplus.dta"] \[list "vol" "Vminus" "V-" "cmd_vminus.dta"] \
]

# main code to draw buttons
# all keys
foreach key $keys {
    if { [winfo exists .f_[lindex $key 0]] == 0 } {
        frame .f_[lindex $key 0] -relief sunken
        pack .f_[lindex $key 0] -in . -fill x -side top
    }
    button .b_[lindex $key 1] -text [lindex $key 2] -command "send_cmd [lindex $key 3]"
    pack .b_[lindex $key 1] -in .f_[lindex $key 0] -side left
}
The above assumes that for each key a datafile is available that defines the data to be transmitted to the IR device for a specific button.
It's reasonable easy to read the list of keys from a file rather then hardcode them.
It's also reasonable easy to read the command file and send the data to a device (the TODO part)


PS I see that in my browser the list of keys is one long line; the code tags don't seem to prevent <backslash><enter> from being removed. Sorry for that. You can quote my message and next copy the code.

Last edited by Wim Sturkenboom; 03-09-2008 at 12:42 PM. Reason: Added PS
 
Old 03-09-2008, 02:12 PM   #4
bt101
Member
 
Registered: Mar 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks for the replies.
Yes, I was considering a web page, but as was mentioned, you need to run a web server etc. I may have to do it if I can't ind another solution.

I hope I didn't complicate the issue when I mentioned that I am using a remote control. I only mentioned that part to give some background to what I'm doing. My remote control generates normal keys as if they came from the keyboard, so you can take the remote completely out of the picture.

The question could be rephrased as.. how can you display a big menu and scroll around it with the arrow keys on the keyboard.

I currently do have a cript which grabs the keys and runs things, but it is all in the background. I would like to display a menu instead.

Thanks
 
Old 03-09-2008, 03:03 PM   #5
bt101
Member
 
Registered: Mar 2008
Posts: 31

Original Poster
Rep: Reputation: 15
I found an example of what I am seeking, but this runs under Windows. This page has some screenshots of menus about half way down the page:

http://forums.sage.tv/forums/showthread.php?t=10715

I don't really need it to be fancy. I would even settle for something that ran in a bash shell if the type was big enough.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote desktop software to control desktop GUI? Phaethar Linux - Software 3 06-27-2008 09:30 AM
SASEM Vacuum Florescent Display + Remote control drivers lucius Linux - Hardware 0 05-20-2004 09:48 AM
Seeking recommendation for remote control software bmcneely0 Linux - Software 2 11-23-2003 07:53 PM
I use a GtkItemFactory to make menu,but I want to use a number key to control menu? jiang10000 Programming 0 08-27-2003 02:40 AM
VNC/Remote Control Software coopergr Linux - General 4 08-17-2001 11:54 PM


All times are GMT -5. The time now is 08:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration