disable right click on panel

Discussion on LXDE releases and Development. This forum is not the best way to contact the developers, please use the Development mailing list and Sourceforge to interact with them.
Locked
Gustavo
Posts: 3
Joined: Wed Nov 25, 2009 1:37 pm

disable right click on panel

Post by Gustavo »

I need a desktop where users cant change the stuffs ! a panel for example
I like LXDE !
is it possible to disable right click on lxpanel ?

i´ ve change permission and owner in .config/lxpanel...
but users can change it temporarly ! changes not affect after a reboot session !

any other idea ?

thanks any help
chrisssteeven
Posts: 4
Joined: Thu Feb 11, 2010 7:15 am

Re: disable right click on panel

Post by chrisssteeven »

Hi,
I have a solution for you that you can show message on right click of page instead of opening menu.
When someone right clicks on your page they will get a pop-up message telling them whatever you
want to tell them. They will not be able to download your pictures.
The Code is :-
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
function right(mousebutton)
{
var msg1 = "Hey!! Look but don't touch!!";
var msg2 = "Isn't this the most annoying script since BLINK?!";

if (navigator.appName == 'Netscape' && mousebutton.which==3)
{
alert(msg1);
return false;
}
else

if (navigator.appName == 'Netscape' && mousebutton.which==1)
{
alert(msg2);
return false;
}
else

if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2)
{
alert(msg1);
return false;
}
else

if (navigator.appName == 'Microsoft Internet Explorer' && event.button == 2)
{
alert(msg2);
return false;
}
return true;
}
document.onmousedown = right;
// -->
</SCRIPT>
maces
Posts: 503
Joined: Sat Oct 25, 2008 6:04 pm
Contact:

Re: disable right click on panel

Post by maces »

@chrisssteeven: javascript is working in LXPanel?! Since when?
@Gustavo: I think it's hardcoded, you have to change the sourcecode for that.

maces
Locked