WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Edit TC-Exit Options  (Read 18871 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Edit TC-Exit Options
« Reply #15 on: February 07, 2019, 09:05:30 PM »
Hi TomyTurbos
... Also, the explicit path to the tar.bz2 was required.  (in my case it was my tce dir.) . ...

Sorry, don't put the  .bz2  file in your  tce  directory. Place it in your  /home/tc/  directory.

... That last step either has me confused and I did it wrong or some combination of the above.  In either event it did not work.  You said, "Finally enter './exittc'".  I tried that in aterm.  I tried it as sudo.  I added it to the .profile file.  Net result is no change, even after reboot.
A couple of things. Don't add  ./exittc  to your  .profile  file, enter it in the terminal.  All the steps should be performed from the
same terminal.


Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: Edit TC-Exit Options
« Reply #16 on: February 07, 2019, 09:58:52 PM »
Well, we're not quite there yet.

First off, the tce-load -w 'etc.' command d/l'ed a LOT of stuff, some of which was already in my tce directory.  I realize this is probably a deficiency in tce-load; only mentioning it to bring it to your attention.

Next, would it not have been more efficient to use '-wi' as the switch rather than doing it separately?  Not that big a deal but I'm a simple guy here...

Also, the explicit path to the tar.bz2 was required.  (in my case it was my tce dir.)

That last step either has me confused and I did it wrong or some combination of the above.  In either event it did not work.  You said, "Finally enter './exittc'".  I tried that in aterm.  I tried it as sudo.  I added it to the .profile file.  Net result is no change, even after reboot.
Hello Tommy,
Next time try using the --help menu,   most if not all programs have a --help (or -h) menu to help with syntax and usage

example
Code: [Select]
tc@box:~$ tce-load --help
Illegal option --
Version 10.0
Usage: tce-load [ -i -w -wi -wo -wil -ic -wic -wicl]{s} extensions
  -i   Loads local extension
  -w   Download extension only
  -wi  Download and install extension
  -wo  Download and create an ondemand item
  Adding -c to any -i option will force a one time copy to file system
  Adding -l to any -i option indicates load only - do not update onboot or ondemand
  Adding -s to any option will suppress OK message used by apps GUI

Example usage:
 Load local extension:
   tce-load -i /mnt/hda1/tce/optional/nano.tcz
 Download into tce/optional directory, updates OnBoot and installs:
   tce-load -w -i nano.tcz
 Download only into tce/optional directory:
   tce-load -w nano.tcz
tc@box:~$

Am fairly sure you'd of figured out what you were not doing right after reading this and tce-load  downloads and install's, it doesn't delete stuff..

:)

I did know it didn't delete anything.  The point is that it re-downloaded stuff I already have.

But really all that is of concern here is that it still doesn't work as per your instructions in Post #9 when we get to the last statement.  I did that in aterm.  I did it again with sudo.  It still doesn't work for me.
 

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Edit TC-Exit Options
« Reply #17 on: February 07, 2019, 10:57:22 PM »
Hi TomyTurbos
Quote
But really all that is of concern here is that it still doesn't work as per your instructions in Post #9 when we get to the last statement.  I did that in aterm.  I did it again with sudo.  It still doesn't work for me.
Assuming you still have the extensions for compiling downloaded run:
Code: [Select]
tce-load -i compiletc fltk-1.3-dev sstripHere are the remaining commands and expected results:
Code: [Select]
tc@box:~$ tar xjvf exittc.tar.bz2
exittc/
exittc/exittc.h
exittc/CompileExittc
exittc/exittc.patch
exittc/exittc.cxx.old
exittc/exittc.cxx
exittc/exittc.fl
tc@box:~$ cd exittc
tc@box:~/exittc$ ./CompileExittc
tc@box:~/exittc$ cp exittc ~/.local/bin/
tc@box:~/exittc$ export EXITPROMPT="reboot"
tc@box:~/exittc$ ./exittc
tc@box:~/exittc$

Here is a screenshot:




Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: Edit TC-Exit Options
« Reply #18 on: February 08, 2019, 12:05:40 AM »
That worked, but not on reboot.


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Edit TC-Exit Options
« Reply #19 on: February 08, 2019, 12:17:36 AM »
Hi TomyTurbos
That worked, but not on reboot.
You need to provide more information. When you click on the exit icon, it doesn't default to reboot? Did you remember to
add this line to your  .profile  file:
Code: [Select]
export EXITPROMPT="reboot"If you didn't, you need to add it and reboot for it to take effect.

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: Edit TC-Exit Options
« Reply #20 on: February 08, 2019, 05:15:24 PM »
Hi TomyTurbos
That worked, but not on reboot.
You need to provide more information. When you click on the exit icon, it doesn't default to reboot? Did you remember to
add this line to your  .profile  file:
Code: [Select]
export EXITPROMPT="reboot"If you didn't, you need to add it and reboot for it to take effect.

That is correct, Sir.  It still defaults to 'Shutdown' after rebooting.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Edit TC-Exit Options
« Reply #21 on: February 08, 2019, 07:56:04 PM »
Hi TomyTurbos
Run the following commands:
Code: [Select]
ls -l ~/.local/bin/ > system.txt
cat .profile >> system.txt
env >> system.txt
showbootcodes >> system.txt
cat /opt/.filetool.lst >> system.txt
and attach the  system.txt  file to your next post.

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: Edit TC-Exit Options
« Reply #22 on: February 08, 2019, 11:13:23 PM »
Hi TomyTurbos
Run the following commands:
Code: [Select]
ls -l ~/.local/bin/ > system.txt
cat .profile >> system.txt
env >> system.txt
showbootcodes >> system.txt
cat /opt/.filetool.lst >> system.txt
and attach the  system.txt  file to your next post.

Hmm...  That's harder than it looks (because I'm not using the same machine to post here)


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Edit TC-Exit Options
« Reply #23 on: February 08, 2019, 11:29:14 PM »
Hi TomyTurbos
Download the attached file. Copy it to the  /home/tc/  directory of the machine in question. Make it executable like this:
Code: [Select]
chmod 774 systemstats.shNow run it like this:
Code: [Select]
./systemstats.shUse a thumb drive to transfer the  system.txt  file and attach it to your next post.

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: Edit TC-Exit Options
« Reply #24 on: February 09, 2019, 12:07:00 AM »
Hi TomyTurbos
Download the attached file. Copy it to the  /home/tc/  directory of the machine in question. Make it executable like this:
Code: [Select]
chmod 774 systemstats.shNow run it like this:
Code: [Select]
./systemstats.shUse a thumb drive to transfer the  system.txt  file and attach it to your next post.

I did it the other way while you wrote that script.

Here's what I got:

Code: [Select]
total 24
-rwxr-xr-x 1 tc staff 20912 Feb  7 23:37 exittc
  # ~/.profile: Executed by Bourne-compatible login SHells.
#
# Path to personal scripts and executables (~/.local/bin).
[ -d "$HOME/.local/bin" ] || mkdir -p "$HOME/.local/bin"
export PATH=$HOME/.local/bin:$PATH

ONDEMAND=/etc/sysconfig/tcedir/ondemand
[ -d "$ONDEMAND" ] && export PATH=$PATH:"$ONDEMAND"

# Environment variables and prompt for Ash SHell
# or Bash. Default is a classic prompt.
#
PS1='\u@\h:\w\$ '
PAGER='less -EM'
MANPAGER='less -isR'

EDITOR=vi

export PS1 PAGER FILEMGR EDITOR MANPAGER

export BACKUP=1
[ "`id -un`" = "`cat /etc/sysconfig/tcuser`" ] && echo "$BACKUP" | sudo tee /etc/sysconfig/backup >/dev/null 2>&1
export FLWM_TITLEBAR_COLOR="58:7D:AA"

if [ -f "$HOME/.ashrc" ]; then
   export ENV="$HOME/.ashrc"
   . "$HOME/.ashrc"
fi

TERMTYPE=`/usr/bin/tty`
[ ${TERMTYPE:5:3} == "tty" ] && (
[ ! -f /etc/sysconfig/Xserver ] ||
[ -f /etc/sysconfig/text ] ||
[ -e /tmp/.X11-unix/X0 ] ||
startx
)

export EXITPROMPT="reboot"WM_PID=3929
XPID=3923
USER=tc
SHLVL=6
HOME=/home/tc
OLDPWD=/home/tc
PAGER=less -EM
PS1=\u@\h:\w\$
ENV=/home/tc/.ashrc
BACKUP=1
COLORTERM=rxvt
LOGNAME=tc
WINDOWID=8388610
COLORFGBG=15;0
TERM=rxvt
PATH=/home/tc/.local/bin:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc/sysconfig/tcedir/ondemand
G_FILENAME_ENCODING=iso8859-1
DISPLAY=:0.0
LANG=C
MANPAGER=less -isR
XAUTHORITY=/home/tc/.Xauthority
SHELL=/bin/sh
ICONS=wbar
DESKTOP=flwm_topside
FLWM_TITLEBAR_COLOR=58:7D:AA
PWD=/home/tc
EDITOR=editor
BOOT_IMAGE=/boot/vmlinuz quiet loglevel=0 waitusb=2:UUID=F885-DB9E showapps desktop=flwm_topside blacklist=bcma,ssb,b43  initrd=/boot/core.gz
opt
home
etc/lighttpd

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Edit TC-Exit Options
« Reply #25 on: February 09, 2019, 12:28:11 AM »
Hi TomyTurbos
It looks like you added  export EXITPROMPT="reboot"  to the end of your  .profile  file but didn't add a carriage return to the end
of the line.

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: Edit TC-Exit Options
« Reply #26 on: February 09, 2019, 12:36:00 PM »
Hi TomyTurbos
It looks like you added  export EXITPROMPT="reboot"  to the end of your  .profile  file but didn't add a carriage return to the end
of the line.

Well, I fixed that.  But still no joy.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Edit TC-Exit Options
« Reply #27 on: February 09, 2019, 12:40:19 PM »
Hi TomyTurbos
Did you reboot?

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: Edit TC-Exit Options
« Reply #28 on: February 09, 2019, 12:55:39 PM »
Yes.  Several times since then. (For different reasons, of course).

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Edit TC-Exit Options
« Reply #29 on: February 09, 2019, 01:04:19 PM »
Hi TomyTurbos
Try moving the  export EXITPROMPT="reboot"  line so it's just below the  export BACKUP=1  line, save and reboot. If that
doesn't fix it, use the  systemstats.sh  script I attached in a previous post to get me a fresh  system.txt  file.