You are not logged in.
I am using Awesome WM. I am forced to use a piece of proprietary software which I don't trust very much. I would like it not to have access to my personal files so I set up another user account (using useradd), switched to that user (using su) and tried to execute the application from the shell. It says it can't connect to the X Server. What are my options?
Last edited by donttrust (2015-08-01 21:55:48)
Offline
Log in as that special user, start X and run the application.
Offline
Log in as that special user, start X and run the application.
Thanks for quick reply, I need to be logged in my main account (for using other things) while I'm working in the proprietary software , are you suggesting running two separate X sessions in different TTYs?
Last edited by donttrust (2015-08-01 22:01:02)
Offline
are you suggesting running two separate X sessions in different TTYs?
Yup.
Let's see if this works.
Offline
You could also use a VM or a LXC container which would be even more secure than just a separate user - and either of these could run right next to your other programs so you wouldn't need to change back and forth between vts.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
donttrust wrote:are you suggesting running two separate X sessions in different TTYs?
Yup.
Let's see if this works.
It works, thanks.
It's not very comfortable though. For example, I'll miss my new email notifications in my main X session while I'm working in the second one. Can anybody suggest other options? Like running the application in some kind of chroot/jail/cgroups/container? And I don't want to run a VM, it'll be an overkill.
P.S.
I'm new to Linux, please forgive me if I've written something silly.
---
Edit:
@Trilby
You posted while I was writing my post. LXC containers? Thanks, it sounds like it's what I need. Is it being used for security isolation? Can you point me to some tutorial where they tell how to run a GUI application in LXC container?
---
Edit 2:
Well, it seems the mighty Arch Wiki covers this:
https://wiki.archlinux.org/index.php/Li … g_programs
Last edited by donttrust (2015-08-01 22:37:40)
Offline
You can temporarily disable your X server's access controls with the xhost command:
https://wiki.archlinux.org/index.php/Xhost
Then su to your second user and run the proprietary software.
EDIT:
Use "su -" instead of "su" so that the second user logs into his own home and his own environment.
[user1 ~]$ xhost +
[user1 ~]$ su - user2
[user2 ~]$ <run proprietary program>
[user2 ~]$ exit
[user1 ~}$ xhost -Last edited by sonoran (2015-08-02 12:42:10)
Offline