LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-02-2014, 02:40 AM   #1
gauravpathak129
LQ Newbie
 
Registered: Jan 2014
Location: Pune, Maharashtra
Distribution: Fedora 17, Ubuntu 12.04
Posts: 18

Rep: Reputation: Disabled
Controlling Access to Workspaces


Hello,
I am using Debian 7.0 GNU/Linux distro on armv7l processor. There are four Workspaces on Xfce4 desktop. I want to keep active Workspace 2 while denying access of all user to it.
Is it possible to do so?
 
Old 01-02-2014, 07:38 PM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
I don't believe so. What are you trying to guard against ?
 
Old 01-03-2014, 12:08 AM   #3
gauravpathak129
LQ Newbie
 
Registered: Jan 2014
Location: Pune, Maharashtra
Distribution: Fedora 17, Ubuntu 12.04
Posts: 18

Original Poster
Rep: Reputation: Disabled
Actucally I have to start a java application on startup which must be run into a terminal. So if any user accidently kills terminal then java application also gets killed, I don't want so. Currently what I have done is, I started the applicaton in terminal on startup and shifted the terminal on Workspace 2 while keeping the main Java Application GUI on Workspace 1. So I want to deny access to currently running terminal from being killed.
 
Old 01-04-2014, 12:08 AM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Sounds like you want to just lock the screen, or do other users need to be able to log in? If the latter, look into something like nohup to run your program in the background so you can log off and let other users login.

Letting other users have access to your account is not a good idea!
 
Old 01-04-2014, 12:24 AM   #5
gauravpathak129
LQ Newbie
 
Registered: Jan 2014
Location: Pune, Maharashtra
Distribution: Fedora 17, Ubuntu 12.04
Posts: 18

Original Poster
Rep: Reputation: Disabled
No there are no any other users. Only one user at a time. So if i will do something like this in my shell script to start the application then will it work
Quote:
cd /path/to/my/xyz.jar
nohup xfce4-terminal -e "java -jar xyz.jar"

Last edited by gauravpathak129; 01-04-2014 at 12:27 AM.
 
Old 01-04-2014, 12:30 AM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
It depends, does the application need access to your graphical desktop or a command line terminal the whole time it is running, or is is strictly a background process?
 
Old 01-04-2014, 12:38 AM   #7
gauravpathak129
LQ Newbie
 
Registered: Jan 2014
Location: Pune, Maharashtra
Distribution: Fedora 17, Ubuntu 12.04
Posts: 18

Original Poster
Rep: Reputation: Disabled
The Java Application is based on GUI but it also requires terminal to run, I have tried to run the application without terminal also but when the Application was started it was becoming unresponsive so I ran the application in terminal, in current scenario terminal starts on system start-up and starts the Java Application with GUI. So if any person kills the terminal Java Application also gets killed. I want that if any user clicks on "cross" of terminal it should not get killed whereas the application should be terminated to end the process not the terminal.
 
Old 01-04-2014, 06:29 PM   #8
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
I can't think of a really obvious way to do what you want to do, unfortunately. What does this Java program do? Could it be made to run as a background process?
 
Old 01-04-2014, 09:13 PM   #9
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,346
Blog Entries: 12

Rep: Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731Reputation: 2731
Is it possible to write a script as root that opens a terminal, then starts the java application, then put that script in the XFCE start-up programs? Then user should not be able to stop it.

This is just a wild guess--I've never tried anything like that.

Last edited by frankbell; 01-04-2014 at 09:14 PM.
 
Old 01-04-2014, 09:49 PM   #10
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Of course then you would have some piece of java code running as root, which sounds like a bad idea from a security perspective.

The real problem seems to be that the OP wants to leave his account open while other users walk up and use it.
 
Old 01-05-2014, 01:59 AM   #11
gauravpathak129
LQ Newbie
 
Registered: Jan 2014
Location: Pune, Maharashtra
Distribution: Fedora 17, Ubuntu 12.04
Posts: 18

Original Poster
Rep: Reputation: Disabled
Yes Mr. btmiller you are right I want to do the same thing because this Java Application displays the current running status of a loom machine.
Mr. frankbell it is possible because the Debian Image that I am using has default root account and no any other account is there. I am using A20-Olinuxino-Micro board from Olimex.
 
Old 01-05-2014, 02:46 PM   #12
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Ah, you didn't give this context before; what you're trying to do makes a bit more sense now.

Let me ask, does the Java app only display the status of the machine, or do users need to interact with it to control the machine? If it only displays status, you could lock the machine away and just have the display in a publicly accessible place (or use something like an X-terminal that only displays but does not accept input).

If users need to interact with this, though, maybe a technical solution is not the right way to go. If this is in a professional work environment that only trusted people can access, you could just post a sign that says "please don't close the loom control application" and people should accept it. If they try to get cute and do it anyone, sounds like their supervisor needs to have a chat with them.
 
Old 01-05-2014, 11:38 PM   #13
gauravpathak129
LQ Newbie
 
Registered: Jan 2014
Location: Pune, Maharashtra
Distribution: Fedora 17, Ubuntu 12.04
Posts: 18

Original Poster
Rep: Reputation: Disabled
Yes sometimes users need to interact with the Loom during certain situations e.g. when the threads are being changed (during alteration), when any sudden stoppage occours (Knock Off Input is detected from Loom) etc.
The Loom operators i.e. weavers are not that intelligent, they don't care about any messages being displayed.

In current sitiation the Java Application requires terminal to be run without which it gets hang and becomes unresponsive and requires whole system reboot.
If accidently someone closes the terminal the Java Application also get closed as it is dependent on terminal.
What I want is that user can only be able to close the Java Application from its close button and not from terminal means if someone clicks on close button of termianl then it should not get killed.
So for that I have created a shell script which I added in system startup options, this shell script starts the Java Application with terminal and after 2 seconds shifts the terminal on Workspace 2 so only Java Application is visible to users on workspace 1.

Last edited by gauravpathak129; 01-05-2014 at 11:42 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
Controlling user access on Redhat Enterprise. idny Linux - Security 6 03-15-2011 07:11 PM
Controlling external network access per processes. Neon20_180 Linux - Security 1 08-14-2010 11:17 AM
controlling access lomaree Linux - Security 2 07-16-2003 10:51 AM
Controlling port access? ugenn Linux - Security 3 05-13-2002 02:39 AM
Controlling port access? ugenn Linux - Networking 1 05-02-2002 10:13 AM


All times are GMT -5. The time now is 07:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration