Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

shell

Running GUI application as another (non-root) user

August 9, 2022 by Magenaut

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.

Categories Q&A, Unix & Linux Tags shell, su, x11, xorg Leave a comment

Difference between parentheses and braces in terminal?

August 9, 2022 by Magenaut

( 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

Categories Q&A, Unix & Linux Tags shell Leave a comment

When do you use brace expansion?

August 9, 2022 by Magenaut

I understand what brace expansion is, but I don’t know how best to use it.

Categories Q&A, Unix & Linux Tags bash, brace-expansion, ksh, shell, zsh Leave a comment

Bash: double equals vs -eq

August 9, 2022 by Magenaut

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:

Categories Q&A, Unix & Linux Tags arithmetic, bash, shell Leave a comment

How to delete part of a path in an interactive shell?

August 9, 2022 by Magenaut

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

Categories Q&A, Unix & Linux Tags bash, shell, zsh Leave a comment

How can I play a sound when script execution is ready?

August 9, 2022 by Magenaut

I am executing every now and then some python scripts which take quite long to execute.

Categories Q&A, Unix & Linux Tags audio, shell, ubuntu Leave a comment

Is there a JavaScript shell?

August 9, 2022 by Magenaut

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?

Categories Q&A, Unix & Linux Tags javascript, shell, shell-script Leave a comment

How to make xargs handle spaces and special chars from cat?

August 9, 2022 by Magenaut

I have a file that contains a list of names. i.e.:

Categories Q&A, Unix & Linux Tags shell, whitespace, xargs Leave a comment

Getting relative links between two paths

August 9, 2022 by Magenaut

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.

Categories Q&A, Unix & Linux Tags files, shell, symlink, zsh Leave a comment

How to know the “level” of shells I am in?

August 9, 2022 by Magenaut

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.

Categories Q&A, Unix & Linux Tags shell, terminal Leave a comment
Older posts
Newer posts
← Previous Page1 … Page25 Page26 Page27 … Page46 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress