WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Easiest way to make TC non-interactive?  (Read 2655 times)

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Easiest way to make TC non-interactive?
« on: November 13, 2012, 12:10:19 PM »
We are using TC to do an automated recovery of the user's hard drive using the Linux version of Ghost (11.5.1). The only restriction with Ghost is that it requires X to run, which is why I am running it in TC rather than core in a terminal. This works just fine and results in a very small but powerful imaging method. However, the way TC currently looks, the user can fool around in the system since the buttons are all visible and active there and since clicking brings up a menu. So what is the easiest way to make it non-interactive? Basically what would have to be done to make TC a locked down kiosk type of software? Should I use another environment, i.e. openbox?

P.S. Before anyone suggests just running Ghost full screen, I've already tried that and it is never truly "full screen". Also, I understand some keyboard shortcuts like ctrl + alt + del cannot be disabled and that is fine, we are just looking to lock out the user from doing stupid things: browsing around the system, opening apps he/she shouldn't be, shutting down during a restore, etc. Any suggestions would be appreciated. I can come up with some ways to do this but you guys are the experts so I want to evaluate all my options.

EDIT: I should probably mention, we don't require any user interaction to run Ghost, we simply place a shell script in /home/tc/.X.d that gets autostarted on X startup.
« Last Edit: November 13, 2012, 12:16:15 PM by nim108 »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Easiest way to make TC non-interactive?
« Reply #1 on: November 13, 2012, 01:03:24 PM »
Did you try not installing a window manager?

Offline lverns

  • Newbie
  • *
  • Posts: 29
Re: Easiest way to make TC non-interactive?
« Reply #2 on: November 13, 2012, 01:05:20 PM »
1) Do you have to power down manually or does the script in /home/tc/.X.d poweroff the machine when it completes?

If it is the latter, then I would try modifying /home/tc/.xsession from this
Code: (bash) [Select]
Xvesa -br -screen 1024x768x32 -shadow -2button -mouse /dev/input/mice,5 -nolisten -tcp -I >/dev/null 2>&1 &
export XPID=$!
waitforX || ! echo failed in waitforX || exit
"$DESKTOP" 2>/tmp/wm_errors &
export WM_PID=$!
[ -x ./.setbackground ] && ./.setbackground
[ -x ./.mouse_config ] && ./.mouse_config &
[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
[ -d ".X.d" ] && find ".X.d" -type f -print | while read F; do . "$F"; done

to this
Code: (bash) [Select]
Xvesa -br -screen 1024x768x32 -shadow -2button -mouse /dev/input/mice,5 -nolisten -tcp -I >/dev/null 2>&1 &
export XPID=$!
waitforX || ! echo failed in waitforX || exit
#"$DESKTOP" 2>/tmp/wm_errors &
#export WM_PID=$!
[ -x ./.setbackground ] && ./.setbackground
[ -x ./.mouse_config ] && ./.mouse_config &
#[ $(which "$ICONS".sh) ] && ${ICONS}.sh &
[ -d ".X.d" ] && find ".X.d" -type f -print | while read F; do . "$F"; done
(Note how lines 4, 5, and 8 are now preceded by a '#')
That will remove any window decorations, the desktop menu, and the desktop icons. It will also replace the normal cursor with an ugly black X and any windows will be un-resizable.

This is probably not the optimal way to do it since the only way to give any input to the machine would be to drop to the command line which (I assume) would kill Ghost.

P.S.
but you guys are the experts
That definitely doesn't apply to me, so feel free to disregard my opinion.  ;)

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Easiest way to make TC non-interactive?
« Reply #3 on: November 13, 2012, 01:07:12 PM »
Did you try not installing a window manager?
No, I have not. Which extensions are you referring to specifically? Wouldn't a window manager be required to run X programs like Ghost?

lverns, I appreciate the suggestion, but I much rather modify the windows manager (or whatever front-end files need to be updated) to "hide" things vs. hacking TC's built-in scripts (for easier maintainability).
« Last Edit: November 13, 2012, 01:16:35 PM by nim108 »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Easiest way to make TC non-interactive?
« Reply #4 on: November 13, 2012, 01:17:16 PM »
A window manager is managing (multiple) windows.
Simply running exclusively one X app sounds like an obvious approach.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Easiest way to make TC non-interactive?
« Reply #5 on: November 13, 2012, 02:17:45 PM »
A window manager is managing (multiple) windows.
Simply running exclusively one X app sounds like an obvious approach.
I see, so I would just need Xlibs, Xprogs, and Xvesa extensions from TC?

Offline nim108

  • Full Member
  • ***
  • Posts: 107
Re: Easiest way to make TC non-interactive?
« Reply #6 on: November 13, 2012, 04:01:48 PM »
A window manager is managing (multiple) windows.
Simply running exclusively one X app sounds like an obvious approach.
I see, so I would just need Xlibs, Xprogs, and Xvesa extensions from TC?
Thanks guys, this did it, trivial solution :)