LinuxQuestions.org
Visit Jeremy's Blog.
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 12-15-2004, 11:55 AM   #1
YBA^[x]
Member
 
Registered: Apr 2004
Location: Denmark
Distribution: Slackware 10.2
Posts: 121

Rep: Reputation: 15
xdialog/fluxbox issue


Hey.

Based on code from another thread I've made this:

Code:
#!/bin/sh
DIALOG=Xdialog
 
$DIALOG --title "Logout options" \
        --menu "choose:" 0 0 3\
        "reboot" "Reboot the box" \
        "poweroff" "Shut down the box" 2>/tmp/logoutbox.tmp.$$
 
retval=$?
choice=`cat /tmp/logoutbox.tmp.$$`
rm -f /tmp/logoutbox.tmp.$$
 
case $retval in
  0)
    $choice ;;
  1)
    echo "Cancel pressed.";;
  255)
    echo "Box closed.";;
esac
When running it from xterm it works just fine, reboot and poweroff is all dandy, but not when running it from the fluxbox menu. I get a dialog box, but for some reason it doesn't poweroff or reboot. The menu entry is like this:

Code:
[exec] (Logout) {./logoutbox.sh}
When exiting X I can see an error message close to this; reboot: command not found
Same with poweroff. I am certain that they exist since I can issue them from xterm. Any ideas?
Btw, Im using Fluxbox 0.9.10 on Slackware 10.

Regards.

Last edited by YBA^[x]; 12-15-2004 at 12:25 PM.
 
Old 12-15-2004, 01:15 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 47
Use the full paths to reboot and poweroff
 
Old 12-15-2004, 01:44 PM   #3
YBA^[x]
Member
 
Registered: Apr 2004
Location: Denmark
Distribution: Slackware 10.2
Posts: 121

Original Poster
Rep: Reputation: 15
Thanks. As in /sbin/reboot? If so, it doesn't really change much. I get a "no such file or folder" error. Issueing /sbin/reboot from xterm works fine, though....

EDIT:

My bad. Is was caused by a typo. Thanks a lot.

Last edited by YBA^[x]; 12-15-2004 at 01:56 PM.
 
  


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
Fluxbox 0.9.14 theme issue npc Linux - Software 0 09-23-2005 09:12 PM
fluxbox / aterm display issue dasein Linux - Software 6 02-07-2005 10:58 PM
OpenBSD: exiting fluxbox issue sptchamp *BSD 2 01-07-2005 11:59 AM
FluxBox size issue AMMullan Fedora 3 07-19-2004 08:53 PM
Fluxbox installation issue mr_spooky Linux - Software 2 02-06-2004 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration