WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Few questions for pseudo Kiosk mode.  (Read 4909 times)

Offline binarydemon

  • Newbie
  • *
  • Posts: 35
Few questions for pseudo Kiosk mode.
« on: April 21, 2018, 07:31:04 PM »
Tinycore 9.0

1) Is there any reason why -nozap would be ignored on the Xvesa line?   I've added it to the .xsession and it doesn't seem to be preventing Control-Alt-Delete.

Xvesa -br -screen 1024x768x32 -shadow -2button -mouse /dev/input/mice,5 -nolisten tcp -I -nozap >/dev/null 2>&1 &

My other questions are about disabling VLC right click menu and the tactics I've tried and what you would recommend.

1) VLC --no-mouse-events  seems to be ignored.  My other command line settings like --fullscreen are working. Anyone else have this experience?

2) I'm willing to take this as far as temporarily stopping mouse input but I've failed at that too.  Googling seems to recommend using xinput for disabling mouse, but Tinycore reports: X Input extension is not available.  What tcz would this be part of?

3) Attempts to remap mouse keys with xmodmap are also failing.  I've tried  xmodmap -e 'pointer = 0 0 0 0 0'  and xmodmap -pp confirms that all the mouse buttons are mapped to 0. but the mouse continues to operate normally. Does Xvesa need to be restarted for this to work?

Any other suggestions for temporarily disabling mouse? I dont think I'm willing to use rmmod. Any tcz's that might add this functionality?

Check out DOSBox Distro - https://sites.google.com/site/dosboxdistro/

A tinycore LIVEUSB that makes playing your dos games anywhere very simple.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Few questions for pseudo Kiosk mode.
« Reply #1 on: April 21, 2018, 08:34:01 PM »
Hi binarydemon
Quote
I've added it to the .xsession and it doesn't seem to be preventing Control-Alt-Delete.
We recently had another forum member who wanted to prevent virtual console switching under Xvesa, see here:
http://forum.tinycorelinux.net/index.php/topic,18785.msg136726.html#msg136726
You could try remapping  Ctrl-Alt-Del  so it outputs  Ctrl-Alt-F2  instead like this:
Code: [Select]
xmodmap -e "keycode  107 = F2 F12"
Quote
Googling seems to recommend using xinput for disabling mouse, but Tinycore reports: X Input extension is not available.  What tcz would this be part of?
Xorg-7.7-bin.tcz

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Few questions for pseudo Kiosk mode.
« Reply #2 on: April 22, 2018, 01:16:55 AM »
Nozap is for preventing ctrl-alt-backspace. Ctrl-alt-del is a reboot combination, grabbed by init; look into /etc/inittab for configuring that. Inittab changes require a remaster.
The only barriers that can stop you are the ones you create yourself.

Offline binarydemon

  • Newbie
  • *
  • Posts: 35
Re: Few questions for pseudo Kiosk mode.
« Reply #3 on: April 22, 2018, 05:28:42 AM »
I've added it to the .xsession and it doesn't seem to be preventing Control-Alt-Delete.
We recently had another forum member who wanted to prevent virtual console switching under Xvesa, see here:
http://forum.tinycorelinux.net/index.php/topic,18785.msg136726.html#msg136726
You could try remapping  Ctrl-Alt-Del  so it outputs  Ctrl-Alt-F2  instead like this:
Code: [Select]
xmodmap -e "keycode  107 = F2 F12"
Not sure I can go with this solution... There is no keycode that represents CTRL-ALT-DEL right?  I would have to lock out the individual keys separately (or at least one of them) and not sure that's feasible for my purposes since those keys are usually important for other programs.

If that's not an option, is there a way to have TinyCore shutdown completely when  CTRL-ALT-DEL is pressed instead of closing Xvesa and dumping user to terminal.  Any thoughts on if  adding && sudo poweroff to the XVesa line  would work? (I will test, I just need to backup first since I have a feeling that might create a startup/shutdown loop) It appears that my other scripts launched by .x.d. are terminated when CTRL-ALT-DEL is pressed.
Check out DOSBox Distro - https://sites.google.com/site/dosboxdistro/

A tinycore LIVEUSB that makes playing your dos games anywhere very simple.

Offline binarydemon

  • Newbie
  • *
  • Posts: 35
Re: Few questions for pseudo Kiosk mode.
« Reply #4 on: April 22, 2018, 08:14:50 AM »
No luck with adding a && sudo reboot into .xsession - it almost worked when I put it at the end of the 1st line, but then it also didnt complete loading the desktop. (X cursor, no menu, ect) 

My attempts to add it anywhere else in .xsession results in the startup - reboot loop.
Check out DOSBox Distro - https://sites.google.com/site/dosboxdistro/

A tinycore LIVEUSB that makes playing your dos games anywhere very simple.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Few questions for pseudo Kiosk mode.
« Reply #5 on: April 22, 2018, 09:26:41 AM »
I just noticed an issue in your Xvesa line - the -I option means "ignore anything after me"!
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Few questions for pseudo Kiosk mode.
« Reply #6 on: April 22, 2018, 10:13:37 AM »
Hi curaga
I just noticed an issue in your Xvesa line - the -I option means "ignore anything after me"!
Next time warn me before saying something that funny. I nearly choked on my coffee. :)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Few questions for pseudo Kiosk mode.
« Reply #7 on: April 22, 2018, 10:30:34 AM »
Quote
No luck with adding a && sudo reboot into .xsession [...]
Maybe something like this:
Code: [Select]
{ /usr/local/bin/Xvesa -br -screen 1024x600x24 -shadow -mouse /dev/input/mice,5 -nolisten tcp -I >/dev/null 2>&1 ; sudo reboot ; } &
Download a copy and keep it handy: Core book ;)

Offline binarydemon

  • Newbie
  • *
  • Posts: 35
Re: Few questions for pseudo Kiosk mode.
« Reply #8 on: April 22, 2018, 10:52:51 AM »
Quote
No luck with adding a && sudo reboot into .xsession [...]
Maybe something like this:
Code: [Select]
{ /usr/local/bin/Xvesa -br -screen 1024x600x24 -shadow -mouse /dev/input/mice,5 -nolisten tcp -I >/dev/null 2>&1 ; sudo reboot ; } &

I'll give this a shot later, thanks. 

I just noticed an issue in your Xvesa line - the -I option means "ignore anything after me"!

Ah, what a silly parameter. I'll move the -nozap and try again.


Thanks guys.
Check out DOSBox Distro - https://sites.google.com/site/dosboxdistro/

A tinycore LIVEUSB that makes playing your dos games anywhere very simple.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Few questions for pseudo Kiosk mode.
« Reply #9 on: April 22, 2018, 11:52:46 AM »
Hi binarydemon
... Ah, what a silly parameter. I'll move the -nozap and try again. ...
Why not just remove the  -I ?

Offline binarydemon

  • Newbie
  • *
  • Posts: 35
Re: Few questions for pseudo Kiosk mode.
« Reply #10 on: April 22, 2018, 01:38:43 PM »
Why not just remove the  -I ?

Or that. I'm sure you guys know this but to be clear, I didn't add the -I. :)
Check out DOSBox Distro - https://sites.google.com/site/dosboxdistro/

A tinycore LIVEUSB that makes playing your dos games anywhere very simple.

Offline binarydemon

  • Newbie
  • *
  • Posts: 35
Re: Few questions for pseudo Kiosk mode.
« Reply #11 on: April 23, 2018, 06:45:10 AM »
Ok confirmed two things.

1) -nozap does block CTRL-ALT-DEL on its own.

2) Mizalf's solution also works perfectly.

Honestly I think I like Mizalf's solution better since my project is related to adding onto the DOSBox environment and a CTRL-ALT-DEL reboot is realistic.

About Blocking Mouse Input-

Xorg-7.7-bin.tcz -  Stupid question, but do I have to be running Xorg instead of Xvesa to have Xinput work correctly? 

I probably should try Xorg just to see if DosBox benefits from the 2D hardware acceleration, but I was under the impression Xvesa has better compatibility and the reduced size footprint is nice.

I tried just loading the tcz, running tce-load -i Xorg-7.7-bin.tcz twice confirms its loaded but I still get the same terminal response - X Input extension not available.

« Last Edit: April 23, 2018, 06:47:32 AM by binarydemon »
Check out DOSBox Distro - https://sites.google.com/site/dosboxdistro/

A tinycore LIVEUSB that makes playing your dos games anywhere very simple.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Few questions for pseudo Kiosk mode.
« Reply #12 on: April 23, 2018, 07:18:39 AM »
Hi binarydemon
To the best of my knowledge, the utilities in  Xorg-7.7-bin.tcz  do not require  Xorg  in order to run.

Quote
I tried just loading the tcz, running tce-load -i Xorg-7.7-bin.tcz twice confirms its loaded but I still get the same terminal response - X Input extension not available.
So if you enter  xinput  you don't get a usage message similar to this:
Code: [Select]
tc@box:~$ xinput
usage :
        xinput get-feedbacks <device name>
        xinput set-ptr-feedback <device name> <threshold> <num> <denom>
        xinput set-integer-feedback <device name> <feedback id> <value>
        xinput get-button-map <device name>
        xinput set-button-map <device name> <map button 1> [<map button 2> [...]]
        xinput set-pointer <device name> [<x index> <y index>]
        xinput set-mode <device name> ABSOLUTE|RELATIVE
        xinput list [--short || --long] [<device name>...]
        xinput query-state <device name>
        xinput test [-proximity] <device name>
        xinput create-master <id> [<sendCore (dflt:1)>] [<enable (dflt:1)>]
        xinput remove-master <id> [Floating|AttachToMaster (dflt:Floating)] [<returnPointer>] [<returnKeyboard>]
        xinput reattach <id> <master>
        xinput float <id>
        xinput set-cp <window> <device>
        xinput test-xi2 <device>
        xinput list-props <device> [<device> ...]
        xinput set-int-prop <device> <property> <format (8, 16, 32)> <val> [<val> ...]
        xinput set-float-prop <device> <property> <val> [<val> ...]
        xinput set-atom-prop <device> <property> <val> [<val> ...]
        xinput watch-props <device>
        xinput delete-prop <device> <property>
        xinput set-prop <device> [--type=atom|float|int] [--format=8|16|32] <property> <val> [<val> ...]
tc@box:~$

Offline binarydemon

  • Newbie
  • *
  • Posts: 35
Re: Few questions for pseudo Kiosk mode.
« Reply #13 on: April 23, 2018, 07:30:22 AM »
No, I see:

Code: [Select]
tc@box:~$  xinput
X Input extension is not available.

Might I need the Xorg-7.7-lib or another tcz?
Check out DOSBox Distro - https://sites.google.com/site/dosboxdistro/

A tinycore LIVEUSB that makes playing your dos games anywhere very simple.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: Few questions for pseudo Kiosk mode.
« Reply #14 on: April 23, 2018, 07:52:20 AM »
Hi binarydemon
This is the  tree  file that lists all the dependencies for  Xorg-7.7-bin.tcz:
http://tinycorelinux.net/9.x/x86/tcz/Xorg-7.7-bin.tcz.tree