executable

Change behavior of bash script if executed from another script

Change behavior of bash script if executed from another script I have a script (say Task.sh) (with executable permission): Pseducode: if [[ Not called from inside a script ]]; then echo ‘Not called from inside a script’ else echo ‘Called from a script’ fi I have a script say Main.sh (with executable permission): Value=$(Task.sh) echo …

Total answers: 2

cant run executable (application/x-executable)

cant run executable (application/x-executable) I am a new Ubuntu user and I want to stream my system sound on my phone via usb. I downloaded soundwire which is a program that allows us to do this. I tested it on my other linux distro and was able to run it. But I can’t run it …

Total answers: 1

Self build executable can only be executed via context menu "run as a program"

Self build executable can only be executed via context menu "run as a program" I am using Ubuntu 22.04.2 LTS I have created an executable using pyinstaller and copied it to the desktop. The problem is that it does not open when double-clicked. However, if you open the desktop as a folder, it will double-click …

Total answers: 1

Is `command -v program` always executable?

Is `command -v program` always executable? I am using the command -v "program" >/dev/null 2>&1 construct if I need to POSIX-ly find out if such program is installed in an if-statement. From its help page is not clear, whether it checks only for path or also for the executable bit? $ command –help command: command …

Total answers: 1

How to make my script stay executable on different devices?

How to make my script stay executable on different devices? I’ve made a script that would work on rhel distros and forks. It’s for personal use to automatically download repositories and software that I use. When I make the script executable on the host machine I can right click on the script and choose run …

Total answers: 2

Does a user need executable permissions to be able to run du (disk usage)?

Does a user need executable permissions to be able to run du (disk usage)? I am observing the following behaviour, and want to know if it is expected. I am trying to run disk usage ( du ) as user2 on a directory test_directory which is owned by user1. If I change the permissions to …

Total answers: 1

Can process execute new program without the kernel knowing?

Can process execute new program without the kernel knowing? Can process execute new program without the kernel knowing? Usually, when the program is executing kernel gives to it its own process after receiving the syscall (such as exec() or fork()). In this case, everything goes through the kernel, which finally starts the program with, for …

Total answers: 2

Executable vs Library in Bash Script

Executable vs Library in Bash Script When reading over Google’s shell style guide, I found the following line that confused me a little: "Executables should have no extension (strongly preferred) or a .sh extension. Libraries must have a .sh extension and should not be executable."link At least when it comes to bash scripts, what exactly …

Total answers: 4

ssh to execute remote command under interactive shell

ssh to execute remote command under interactive shell Very similar with Run a command in an interactive shell with ssh after sourcing .bashrc, yet the answer there doesn’t work for me. I want to to execute remote command via ssh under the full interactive shell. I.e., run a remote command under the login shell, with …

Total answers: 1

Creating a systemd service in ubuntu that can be started/stopped

Creating a systemd service in ubuntu that can be started/stopped I have build a server that ships in executable format, and I want to register it as a service that I can start/stop/restart. I have read the following questions and many others like it > How can I make an executable run as a service? …

Total answers: 2

Files get executable when copied

Files get executable when copied So I just bought a new Samsung T7 Portable SSD. I initially intended to format it to exFAT, for use with both Windows, MacOS and Linux, but upon inspection, the disk comes with a default file system of HPFS/NTFS/exFAT. I didn’t know that was a thing, but I decided to …

Total answers: 1

How to install JetBrains ToolBox in Ubuntu 22.04 LTS?

How to install JetBrains ToolBox in Ubuntu 22.04 LTS? I downloaded the zipped folder for the ToolBox app from JetBrains’ official site. After extracting the folder, I clicked multiple times on the ToolBox executable app, but nothing happened on the screen. On searching a bit more deeply, I found that no app supported running such …

Total answers: 3

bash: ./*.exe: No such file or directory with executables named *.exe

bash: ./*.exe: No such file or directory with executables named *.exe Looks like I cannot run any normal linux binaries if their name ends with .exe, any idea why? $ cp /bin/pwd pwd $ ./pwd /home/premek This is ok. But… $ cp /bin/pwd pwd.exe $ ./pwd.exe bash: ./pwd.exe: No such file or directory $ ls …

Total answers: 2

Executable common files (*.pdf, etc.)

Executable common files (*.pdf, etc.) I have a number of files showing up green when I run ls. I understand these are executables, and I understand that one can make a file executable with chmod. But they are .csv and .pdf files. I don’t understand how one could ‘execute’ a comma-separated text file or a …

Total answers: 3

How are users able to execute a file without permission?

How are users able to execute a file without permission? I created a Bash script which echoes “Hello World”. I also created a test user, bob, using adduser. Nobody has permission to execute that file as denoted by ls: $ ls -l hello.sh -rw-r–r– 1 george george 19 Mai 29 13:06 hello.sh As we can …

Total answers: 3

Is there any way to stop a user from creating executables and running them?

Is there any way to stop a user from creating executables and running them? Ransomware attacks could use zero-day exploits, but often an attacker will just fool a gullible user into running an executable by downloading and clicking. Suppose we have a naive user and want to restrict them to the normal path. Is there …

Total answers: 2

Different methods to run a non-nixos executable on Nixos

Different methods to run a non-nixos executable on Nixos What are the different methods to run a non-nixos executable on NixOs? (For instance proprietary binaries.) I’d like to see also the manual methods. Asked By: tobiasBora || Source Related answers If you plan to package a binary and not just run it, you might like …

Total answers: 1