Skip to main content

All Questions

Tagged with
2 votes
1 answer
168 views

How to run python script on login

I am attempting to load a python script that launches a Firefox Geckodriver under Selenium whenever a specific kiosk user logs in to the GUI. I've tried launching this via .profile, however ...
Firav's user avatar
  • 31
1 vote
1 answer
281 views

How do I move files to new folder based on timestamp dynamically without manually changing the script?

# Create a folder mkdir archived_PA_2022-01_2022-06 # Move files to new folder find ./ -newermt "2021-12-31" ! -newermt '2022-06-28' -exec mv /var/log/pentaho/PA –t archived_PA_2022-01_2022-...
Anna Nguyen's user avatar
2 votes
1 answer
985 views

How to resolve vulnerability CVE-2022-3715 for bash package in Debian 11.7?

I have built a Docker image with Debian 11.7, and I ran the Trivy Docker scanning tool. The report displayed a vulnerability, CVE-2022-3715, for the bash package. As per this page, the issue is fixed ...
noonenine's user avatar
1 vote
1 answer
91 views

Script in /etc/profile.d/ is not being run on X login (debian)

The following script: name='ILITEK ILITEK-TP' echo 'running touchscreens' | systemd-cat ids=$(xinput --list |awk -Fid= "/$name/"'{print $2+0}') echo 'after xinput' | systemd-cat for id in $...
Cheetaiean's user avatar
1 vote
1 answer
50 views

file not found when executed but exec bit set and accessible by other commands

On my system I'm puzzled by a behaviour I cannot understand: Previously I did install an SDK in my user-local binary path and all the files are there. However bash returns "file not found" ...
planetmaker's user avatar
2 votes
1 answer
283 views

Using HOME variable in crontab result in broken jobs

I have this crontab file with a lot (100+) of jobs that execute some commands in the same directory, suppose ~/Documents/. Instead of cd ~/Documents/ && <command> for every jobs, I can ...
LinkOut's user avatar
  • 21
0 votes
2 answers
2k views

How to skip [sudo] password for USER?

I am having a random issue. I am having the same configuration for multiple servers, but only some of them are asking password from an excluded user: Using username "a-u". Authenticating ...
RookieRoo's user avatar
  • 123
0 votes
1 answer
464 views

How can I make the git-prompt.sh's output (branch etc.) bold?

I use git-prompt.sh to customize bash's prompt with Git information, e.g. branch. https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh I want git-prompt.sh's output to be bold, ...
Shuzheng's user avatar
  • 4,871
1 vote
1 answer
363 views

Check whether linux is utilizing service or systemctl with a shell script

friends! I need a mechanism to verify if the linux virtual private server is utilizing systemctl or service. The systemd application is installed on all of them. Current Code. if pgrep systemd-journal;...
wikob41409's user avatar
1 vote
2 answers
3k views

what are tty files for?

Can someone explain me what are the tty files? I can't understand that, using the command : echo 1 > /dev/tty prints to my current terminal the output: 1, but if i try to use echo 1 > /dev/tty0 ...
hamza's user avatar
  • 21
4 votes
1 answer
936 views

How do I use the 'watch' command to enclose multiple commands that also have quotation marks(")? [duplicate]

I'd like to use the watch command to the following chain of commands: journalctl | grep 'UFW BLOCK' | grep 'DST=192.168.0.2' | awk '{printf "%-4s%-3s%-10s%-1s%+16s\n", $1, $2, $3, $7, $11, $...
test user's user avatar
0 votes
1 answer
410 views

EtherCAT not found after full installation

I have been trying for the past few days to get the EtherCAT working with LinuxCNC, but my lack of knowledge about the Linux environment does not allow me to even start the project. I have all the ...
Omid_Mirzaee_Yazdi's user avatar
1 vote
1 answer
396 views

How can I get my script to work exactly like my terminal command?

tl;dr The command git fetch origin [branch-name] is not working when invoked within a script, but works when invoked from shell. Both script and terminal are working just fine on another box. The box ...
SvenTUM's user avatar
  • 111
1 vote
2 answers
96 views

ping: ./ipsweep.sh.105: Name or service not known [closed]

#Code: #!/bin/bash for ip in `seq 100 110`; do ping -c 1 $0.$ip | grep "64 bytes" | cut -d " " -f 4 | tr -d ":" & done #command: ./ipsweep.sh 192.168.0 #Result: ...
Md Rezaul Karim's user avatar
0 votes
2 answers
257 views

How to insert code before matched multi-line of code with sed?

I want to add this code $cfg['Servers'][$i]['hide_db'] = '^(mysql|information_schema|performance_schema|phpmyadmin)$'; into phpMyAdmin's config.inc.php file before the line /** * End of servers ...
vee's user avatar
  • 105

15 30 50 per page