Recent Questions - Unix & Linux Stack Exchange |
- Need Help Running Process at Bootup
- Simple script to add directories
- How does tcpdump choose the default NIC to listen on?
- I can't automatically connect to bluetooth device from the command line in Lubuntu
- How to set a system-level proxy independent of the desktop?
- What happens if I close terminal running go-mtpfs without unmounting?
- Permission denied to create files on Samba shared folder mounted using CIFS
- Extract multiple files at once in the terminal
- 'find -empty -delete' deletes non-empty directories
- How to check if more than an instance of file exists and remove it
- Why do you have to downgrade foreign packages before upgrading Linux Mint?
- How to install motif package on a remote server account
- How to install flash player for firefox on Ubuntu 20.10
- lspci LnkCap speed is system speed or device speed?
- Who is responsible for providing `set -o pipefail`
- `stat` output format: truncate a time field
- Which software can I use to develop the GUI (Graphical User Interfaces) on UNIX / Linux?
- How to reset screen
- Systemd automount with custom command
- How to make multiple parallel calls to function which makes post request in unix?
- How to stop autocomplete on remote ssh server
- 4.19 kernel does not enter suspend/sleep and freezes system, but 4.9 works fine
- bruteforcing keepassxc with bash
- Why does trap not get triggered when sourcing a file that does not exist?
- What causes Make to delete intermediate files?
- Have to restart network service after reboot (centos 7)
- How to read iw allowed interface lists?
- How to set up an encrypted directory to be mounted only during samba access?
Need Help Running Process at Bootup Posted: 19 Jun 2021 09:07 AM PDT Tried guide from here. Edited this file with nano: /etc/systemd/system/myservice.service. .service file is: I get this output in the console: |
Simple script to add directories Posted: 19 Jun 2021 09:32 AM PDT I was trying to create a script that monitors the /media/user directory. When a new USB is plugged in the script would run and add the new directory to a program that now uses the new USB drive. For example: currently that script just literally adds The command Thanks I'm obviously new! |
How does tcpdump choose the default NIC to listen on? Posted: 19 Jun 2021 08:39 AM PDT From
In |
I can't automatically connect to bluetooth device from the command line in Lubuntu Posted: 19 Jun 2021 08:18 AM PDT I recently changed OS on an old laptop from Ubuntu to Lubuntu for better performance. On Ubuntu, I had a script that ran on startup to automatically connect to my electric drumkit for bluetooth audio. This was my script. However, it doesn't work on Lubuntu. Lubuntu has bluetooth disabled on startup, and the Bluetooth Device Wizard shows this like so: When I run As you can see, I have this new barrier that I didn't have with Ubuntu. I can't use bluetoothctl at this point to connect to the device like I did in Ubuntu, and if I try, I get So far, I can't find a command which does the same as clicking the 'make pairable' button. If I click 'enable bluetooth' or 'make pairable' from the Bluetooth Device Wizard, I am able to connect ok using the command line, so the problem isn't with anything to do with bluetoothctl or the device not being trusted or paired correctly. I am able to connect with the GUI, but the point is, I need it to connect automatically on startup without the GUI. Does anyone know how I can properly enable bluetooth from the command line in Lubuntu? How can I 'make pairable' from the command line? And help would be greatly appreciated. There isn't a lot of info online about Lubuntu unfortunately. |
How to set a system-level proxy independent of the desktop? Posted: 19 Jun 2021 08:11 AM PDT Using shell env. vars like Is there a way to force a proxy on all apps on the system with these requirements?
I'm using Xubuntu 18.04 (with i3wm) but I'm looking for a method as general as possible. |
What happens if I close terminal running go-mtpfs without unmounting? Posted: 19 Jun 2021 07:47 AM PDT In order to solve several related problems (How to access/mount Android drive in Kubuntu 20.04 with other file manager than Dolphin? - Mount Android media folder in Kubuntu (open file directly instead of copying to cache in Dolphin) I have found the simple solution of using The idea would be to run But Instead of bothering with permissions, I have tried to mount in a "normal" folder inside user directory. Creating a folder called The effect was that MyAndroid folder dissapeared but couldn't be recreated (in the same location with the same name). What does that mean? How severe are the underlying errors? I have noticed that running But how come it gets invisible at first? |
Permission denied to create files on Samba shared folder mounted using CIFS Posted: 19 Jun 2021 07:43 AM PDT I have two ubuntu (lubuntu 20.10) machines. On one of the machines, I created a folder and shared it using samba. My entry in /etc/samba/smb.conf looks like this For the folder From the second machine, I mounted the shared folder using cifs, using the below command (user1-pc is the hostname of the first machine.) Now, I am able to The command I used was, I am new to working with permissions in linux. Kindly help me with overcoming the issue. |
Extract multiple files at once in the terminal Posted: 19 Jun 2021 07:56 AM PDT I have a directory containing hundreds of zip files. I want to be able to select about fifty files and extract them all at once using As a simplified example, I have the following three files: and I want to extract only two of them without entering the file names manually. I could print the file names using |
'find -empty -delete' deletes non-empty directories Posted: 19 Jun 2021 06:29 AM PDT If I create the following directory structure: then I run If I run showing that only dir4 is empty. However, if I run I would expect only dir4 to be deleted, then the next time I ran the command, only dir3 would be deleted, and so on. Why does this happen, and how can I delete only dir4 using |
How to check if more than an instance of file exists and remove it Posted: 19 Jun 2021 06:33 AM PDT I have written a very simple script to make backup of my files and databases daily. This is my script: It makes two What I want is, suppose the below output of What I want is: And the result of What function or commands should I use in my bash script? I think it's better to use this function at the end of my bash script after making backup is done, but if there are better approaches and solutions, I'm eager to hear. |
Why do you have to downgrade foreign packages before upgrading Linux Mint? Posted: 19 Jun 2021 06:00 AM PDT Just curious, when upgrading from Linux Mint 19 to 20, why is it necessary to downgrade foreign packages? Why can't the upgrade utility simply ignore them? (note: this may be applicable to many Linux disttos, but I only have Mint so that's the only one I can speak to). |
How to install motif package on a remote server account Posted: 19 Jun 2021 06:07 AM PDT I want to use a software on a remote server account, I need to install the motif package (e.g.libmotif4_2.3.4-1_amd64.deb) first. I do not have access to the root. How can I install the motif manually in my account on the server. PS: I use PUTTY to join the server account. |
How to install flash player for firefox on Ubuntu 20.10 Posted: 19 Jun 2021 06:28 AM PDT I have tried to follow the steps recommended in https://linuxconfig.org/enable-adobe-flash-for-firefox-on-ubuntu-20-04-focal-fossa-linux But when I enter sudo apt install flashplugin-installer into my shell, it tells me the package flushplugin-installer could not be found. REMARK: I know flash is an old software virtually no one uses anymore, but I need it in order to view content embedded in newspaper articles that were published ten years ago. |
lspci LnkCap speed is system speed or device speed? Posted: 19 Jun 2021 07:25 AM PDT When using lspci: The Speed 8GT/s is device's max speed? or system's max speed? or it is a negotiated max speed between system and device? When a gen4 device plug in to a gen3 system, what will be the speed in LnkCap? |
Who is responsible for providing `set -o pipefail` Posted: 19 Jun 2021 09:13 AM PDT I want strict mode in my scripts. I would also appreciate portability. set -o pipefail seems compulsory. Yet Is it correct? If so, is this a |
`stat` output format: truncate a time field Posted: 19 Jun 2021 06:38 AM PDT Ref:`stat` output format: truncate a date field The way they have extracted date from stat command by using: My final command looks something like this: I want to modify '%y' such that I only get the time. Instead of '.11' I want to define a range from 12 to 20. Is there a way to do it, and what is this type of formatting called ? by default the time is: but I want: Final output: |
Which software can I use to develop the GUI (Graphical User Interfaces) on UNIX / Linux? Posted: 19 Jun 2021 09:46 AM PDT Many years ago, I used to work for about 10 years with UIMX to develop the GUI (Graphical User Interfaces) for applications running on UNIX. Nowadays, it seems that UIMX software no longer exists. The wiki page for UIMX is here : https://en.wikipedia.org/wiki/UIMX . But, on that page, all the links to UIMX websites and references seem to be broken as I can't access those links. Does anyone knows if UIMX still exists today ? If yes, how can we access their website ? (Also, can anyone recommend other softwares that can be used to create the GUI on UNIX and Linux ?) |
Posted: 19 Jun 2021 09:26 AM PDT I have an issue with suspend: when I resume my laptop (sometimes) the screen stays off. Question is: how can I reset the screen? Because the system works itself i.e. I can switch TTY and PS: as suggested here, the kernel already has EDIT: lspci output, |
Systemd automount with custom command Posted: 19 Jun 2021 07:59 AM PDT I use tomb to store some files. I want to use a systemd Is there any way to specify a custom command for systemd |
How to make multiple parallel calls to function which makes post request in unix? Posted: 19 Jun 2021 07:29 AM PDT I am having a function A, which takes an argument fileName and then makes a curl post call with that file to employment Server.The function pseudocode will look as :
Now if i want to run in parallel I will use : I have concerns in highlighted part, how can I gather details of filename,response code,since there is no hashmap/dictionary type of support in unix easily available. Also if I print the data in A, then if I keep two lines one to print filename and one to print response code then two lines may not be sequential because of parallel nature. Although I can print both in one line,but I will like to capture results to do some processing later.Is there a easy way around? |
How to stop autocomplete on remote ssh server Posted: 19 Jun 2021 09:48 AM PDT When I ssh into a remote server (macOS) from a Linux (Mint) laptop, the remote autocomplete engages and completes upon each keystroke. This started fairly recently, but I can't pinpoint exactly when. Once I'm successfully logged in, when I attempt to list the contents of the current directory, once I press 'l', 'ls' appears on the screen. When I type 's' to complete the list command, it now appears as 'lss' (but still executes as 'ls'). Longer commands get very weird, very fast. Typing 'exit' appears as 'exitxititt'. Again, the command still executes, but the command line is a mess. I have no idea what's happening here--I don't even know how to ask a concise or coherent question about it. It only happens when I log into macOS from a Linux client; Linux-Linux connections are fine (all using same basic shell config; zsh using Oh-My-Zsh). Any idea what's going on? Better yet, how do I make it stop? |
4.19 kernel does not enter suspend/sleep and freezes system, but 4.9 works fine Posted: 19 Jun 2021 07:08 AM PDT The 4.9 kernel will be EOL in just a few years and Debian 9 (stretch) just next year. So, I'd like to move on. Everything works perfectly on the 4.9 kernel, including sleep/suspend. However, each time I try the 4.19 kernel, the one used by Debian 10 by default, it never suspends correctly. When I close the lid, the screen goes black/blank, but it doesn't suspend. What's more, I cannot do anything from this "resumed" empty screen; even ALT-CTL-F1 does not work. Only the power button is an option to reboot/restart the system. (I'm not sure how I'd do the ALT-PrtScr-REISUB on the macbook.) Whereas my macbook consistently has this problem, I also occasionally (randomly) experience this same problem on my Dell laptop. On my macbook, I looked in I'm running 1.4.1 of pm-utils. I have not tried the 5.x series of kernels, but I can only assume that they would have the same problem as 4.19. I'd be willing to run 4.9 indefinitely, even after EOL, with all possible security holes and all, just to keep the suspend functionality, but I'd prefer not to. Regardless, my question is: how can I get my laptops to suspend and resume using the 4.19 kernel? Update: it turns out that running |
bruteforcing keepassxc with bash Posted: 19 Jun 2021 09:16 AM PDT I have forgotten part of my password to Keepassxc database (.kdbx with keyfile). The password consists of 20 symbols, 17 of which are known. I have generated the list of all possible combinations using the characters I believe to be used in the unknown part of the password (they are put into charlist.txt) and following small one-liner: Keepassxc allows me to read a password from stdin (either with How can I pass either the contents of the output.txt or the one-liner output to the keepassxc? |
Why does trap not get triggered when sourcing a file that does not exist? Posted: 19 Jun 2021 05:45 AM PDT Outputs: Is If I remove the |
What causes Make to delete intermediate files? Posted: 19 Jun 2021 09:16 AM PDT I wrote a Makefile and found out that when executing Output of running Notice the trailing Under what circumstance will the automatic |
Have to restart network service after reboot (centos 7) Posted: 19 Jun 2021 07:06 AM PDT I am setting up a server which has a 4 ports (em1 to em4) QLogic network interface. It is connected though em3 and the IP address is automatically given by DHCP based on the mac address. I do not have access to the network after booting.So, I have to use After booting, Clearly, the network is not activated. But sometimes (apparently randomly), I can also have after a boot: but although the connection seems activated I have to restart to access the network. Let me add that /etc/sysconfig/network-scripts/ifcfg-em3 contains : As ONBOOT is set to yes, I do not know how to fix this issue. PS : when looking in /var/log/message (only the lines including networkManager), I have on booting time : First, there seems to have interactions between em3 and em4 and at no point I have thing such as the following that happened when |
How to read iw allowed interface lists? Posted: 19 Jun 2021 08:06 AM PDT I wanted to set up promiscuous Wi-Fi monitoring into Wireshark. Tried to do it like I used to with iwconfig, but this system sets me back to managed as soon as I bring the interface back up. I see online posts saying iw can add a monitor interface alongside the managed connection, so you can keep your internet alive while monitoring. Would be great, but: (That's Antergos 4.19.8-arch1-1-ARCH, if it matters.) So I dug deeper, including Deciphering the output of iw list valid interface combinations here. But I'm still not sure if this means there is no hope of adding the monitor interface. Here are excerpts from my "iw phy" command response: Looks like I can have one monitor for sure. [And after the suggestion here to add sudo to my interface add command, I actually added the monitor interface successfully alongside my managed interface.] But I'm still curious about: Why isn't "add interface" listed as a supported command? I've seen it work... What is the "software interface" monitor that can "always" be added? Isn't my "interface add" connection just software? Maybe those two questions answer each other? If so, what is a "non-software interface"? Can I magically add actual hardware to my system by typing commands? Why doesn't "valid interface combinations" list "monitor" at all? I have it working combined with "managed". Maybe the response to "iw phy" is created by the people who made my Chinese hardware? And, why in the wiki at https://wireless.wiki.kernel.org/en/users/documentation/iw do only
and
show the use of sudo? None of the "add" commands show it:
But this is intellectual curiosity. I'm happy to have a working monitor and get on with the real project. |
How to set up an encrypted directory to be mounted only during samba access? Posted: 19 Jun 2021 09:06 AM PDT (This is not about restricting client access, for which ext3 permissions do the trick) I'd like to encrypt the data on my NAS drive (Buffalo LinkStation Pro with SSH access enabled, if that matters) in a user-friendly way. Currently, a truecrypt container has to be manually mounted via SSH and also unmounted again (unless you solve my timeout question). Using a passwordless (but EFS encrypted) SSH key this is reduced to two PuTTY desktop shortcuts and entering the truecrypt password (until simplified further) for mounting. However, the ideal solution would be transparent. I first thought about trying to somehow have the share allow for EFS encryption, but that would probably involve more work and EFS for multiple users without an Active Directory server seems to be troublesome. But now my idea is an automated mount of e.g. an EncFS encrypted directory triggered automatically by a samba access from authorized users (using Windows clients). How can that be achieved? (Bonus points for displaying a honeypot share for unauthorized users...) |
You are subscribed to email updates from Recent Questions - Unix & Linux Stack Exchange. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment