Running GUI application as another (non-root) user
Let’s say I have 2 user accounts user1 and user2. When I login as user1, and then switch to user2 using su, I can execute command-line programs, but GUI programs fail.
Let’s say I have 2 user accounts user1 and user2. When I login as user1, and then switch to user2 using su, I can execute command-line programs, but GUI programs fail.
( du /etc; du /var; ) > tmp.txt { du /etc; du /var; } > tmp.txt Is there a difference between the () and {}? The output of tmp.txt seems exactly the same, and I was wondering whether i’m missing something here. Answers: Thank you for visiting the Q&A section on Magenaut. Please note that … Read more
I understand what brace expansion is, but I don’t know how best to use it.
I am doing integer comparison in bash (trying to see if the user is running as root), and I found two different ways of doing it:
Is there a shortcut in bash and zsh to delete one component of a path? For example, if I type ls ~/local/color/, and the cursor is at the end of line, is there a shortcut to delete the color/ at the end? Ideally I want solutions in both vi-mode and emacs-mode
I am executing every now and then some python scripts which take quite long to execute.
Recently I’ve been working with JS and I’m very enthusiastic about this language. I know that there is node.js for running JS at server side, but is there a shell that uses JS as a scripting language? If such thing exists, how usable & stable is it?
I have a file that contains a list of names. i.e.:
Say I have two paths: <source_path> and <target_path>. I would like my shell (zsh) to automatically find out if there is a way to represent <target_path> from <source_path> as a relative path.
If I open a terminal like xterm I will have a shell. Then if I use ssh or zsh I will have another “level” of shell. Is there a way to know how many times I have to Ctrl+D or type exit to exit all of them? My real intention is to exit everything except the “root” shell.