Just commenting 2 years later to report after updating a Ubuntu with an Nvidia card, my machine wouldn’t post. Only the red VGA led on my board would light up. Pulling the DisplayPort and using HDMI instead made it boot immediately. Ended up reproducing the same problem after an install and update of Nobara a few days later. I wouldn’t have ever thought to change out the DP connection for HDMI.
The terminal supports control characters that allow you to move the cursor back to the beginning of the line, or anywhere in the terminal for that matter.
From shell scripts you can use something like tput to position the cursor and then print over the existing output, and then it just looks like an update.
For a starting point to the concepts check out the Wikipedia article for the POSIX terminal interface
All languages should have some kind of library available, sometimes hundreds.
Timeshift uses hardlinks from previous backups for files that haven't changed. But using "rsync -a" the hardlinks are not maintained and you end up with multiple copies of the same data.
I believe you would need to "rsync -aH" to maintain the hardlinks too.
If mlocate is installed, and the cache has been built that would be fastest. But on an SSD I haven’t found find to be “slow”. Additionally it is very versatile.
Specifically though you probably want to look at the -type f -iname *.md parameters instead. It will only look at files and only compare the file name instead of the entire path.
This is also where GUI search tools bundled with Gnome and KDE are suppose to come in. They prebuilt a cache that is supposed to be fast to search through. But I’ve always enjoyed the ubiquity of find.
You’ll likely be fine. My pseudo understand of the LVM Mount process is to basically scan the devices for volume groups and logical volumes, which then show up in /dev/mapper. It is agnostic of the physical connections. I’ve moved disks from machine to machine, or from SATA to USB-SATA enclosures and not had an issue with them showing up.
It doesn’t really help you now, but take a look at stow. If you’re compiling something that uses autoconf you can change the prefix where it gets installed. Then stow can be used to symlink everything to the correct /usr directories. When you want to remove it you unstow and delete one directory.
I don’t think you can do standard output redirection that way in a systemd unit. One of systemd’s major features is to capture the output of services in a central place.
There are other methods for that depending on the version. Look at the Exec docs
Also if you provide a file name as the last argument to Sox, won’t it use that as the output file? No redirection needed?
Like others have said mouse selection, copy and paste should be a function of your terminal emulator. Not the shell.
If you are looking for more flexible navigation and control over what you can do to edit your command, Bash has a vim mode and an emacs mode. set -o vi will let you hit escape and use Vim shortcuts to navigate and modify the command.
As everyone says, tmux. But specifically if you’re using the Java Minecraft server look over at the MC wiki because there are better options for managing it so it starts at boot as a daemon, but still be able to send commands. They’re a better long term solution.
By leveraging data_get() the rules can support dot notation to validate complex objects. But then you have an issue where what should data_get() return if the key doesn't exist? In PHP common ones are false, null, 0, throw an exception. But all values are equally possible to store in an array, and throwing an exception for each one would be silly.
So you generate some sufficiently random bit of data, pass that in as the default. If you get that default back out you know the value doesn't exist.
It’s beating a dead horse, and while I don’t agree VSCode is a as bad as all that, if you’re worried about RAM, generally stay clear of electron apps. Look at SublimeText for a similarly configurable editor, with much better ram usage, especially in very large files.
If you changed SOMETHING, don’t ignore that. No matter how unlikely, it is at least a starting point.
Run the following and look for clues around 8pm
docker logs <container> : for each container review the logs and check for events.
systemctl list-timers —all : this will show you when scheduled jobs ran last or next.
journalctl -x: this is gonna print the system log, scroll through looking for stuff around or before 8pm.
If there is nothing to go on there, then I might try spoofing the MAC address. My thinking here is a “parental control” feature or something along those lines. If it is only one device then often this means it is limiting by mac or IP. So try both.
A more advanced info collection method would be to run wireshark on the server and a separate machine. Generate some traffic, see what comes up in both. Nmap the server externally, see if you get SOMETHING. You’ll have to Google these things, a bit beyond a Reddit comment.
You said it is a static IP, I’d make sure you aren’t assigning a static IP that overlaps with your DHCP range. It would be odd to have such regular outage, but this will definitely cause issues sooner or later.
Does the machine fully shut off or just the network?
Wired or wireless? (I know, server but gotta ask)
How do you restore the connection?
If it sits idle will it restore on its own?
Physical setup of the device and networking equipment, living situation (apartment, owned house renting a room, dorm, moms basement, etc), connected to an outlet with other devices, etc?
What are the upstream devices? Switch, router, modem, etc. and do you control any of those?
Do you lose network access on any other devices on the network?
Have you looked through system messages, dmesg, journalctl for things that happen at that time?
What time zone are you in?
Do you lose all network access or just internet?(you can hit local network fine?)
Have you tried spoofing the MAC address on the server, so it appears as a totally different physical device?
Have you tried assigning it a different IP address?
When did this start? Or has it always been an issue?
Ah yes. Right. They're different Profiles on the same device. That is trickier. I think that means you're going to need to build your own audio profile. You might still end up not being able to do what you want if there is an actual hardware limitation on the number of output streams.
The easiest way to accomplish this, but possibly more overkill than you’re looking for us to install PulseAudio Preferences (paprefs) and in the “Simultaneous Output” tab enabling “Add virtual output device ...”
Then you’ll have a new output device that plays to everything. But you can mute the individual output devices you don’t want with something like PulseAudio Volume Control
It is an incredibly difficult problem to solve. Every platform has their own issues if you start digging in.
For Linux, in the instance you describe the best option I’ve come across is the previously mentioned stow command. Most software I’ve compiled has provided an easy way to change the prefix, which makes since because this is necessary to package the software.
Another handy tip is once you know how stow works, you can exploit it to handle making dotfiles easily available for versioning. Loads of people have home spun solutions for it.
And not trying to pretend like it isn’t a usability issue, but what you’re seeing in windows isn’t a holistic solution like a package manager should be. Most of those downloaded exes are just unzippers that put files where they need to go and also register themselves in a known location for uninstall. But the uninstaller is generally provided by the originally programmer (or tool they used). They often miss files, or back in the day they’d remove extra files they weren’t suppose to.
Honestly there isn’t anything preventing Linux developers from doing the same thing, drop a script in the sbin folder called “uninstall_xyz”. But I think the reason why they don’t is simply that a supported package is better in the long run. Then you’ve got your Snaps, flatpaks, AppImages that all solve similar issues in different ways. Actually one of the most elegant solutions I’ve found for non-repo software is AppImages when paired with appimaged but a non-graphical app image is super rare.
I don’t have a fix for you, but whenever this has happened to me in the past, it is an issue with pulse audio. Try doing pulseaudio —kill and then pulseaudio —start, then try playing a second video. If it fixed the issue then it might be an issue with an audio sink. Then it’s looking at logs, adjust settings, etc.
I think the correct approach is to just capture the output and operate on it twice like a previous comment said. But you could, in limited scenarios accomplish what you wanted to do with a combo of tee and process substitution >()
fortune | tee >(espeak) | cowsay
I haven’t tried it, and cowsay will also receive any output from espeak so you may want to redirect its output.
Just use OBS. That is literally what it was designed for. And the default config already has two audio inputs, Desktop Audio and Mic/Input. You just have to add a scene to capture the screen or window. Then it is saved and reusable. Pop open OBS and hit record and you’re off to the races.
Plus when you decide later you want to do anything else remotely related you’ll already have experience in the basics.
Their whole thing seemed to be isolated / reusable components that could be combined without a thought to their dependencies. So if you had a weather widget and you wanted to embed it on the home page you just create the object and on render it will pull all of the dependencies and source. It is a great concept and I'm sure I just implemented it poorly. But if you really commit to it, you'll have a page object for each page, layout object for each page type (2-col, 3-col, blog, splash, etc), you end up making objects to define internal layouts (I need the weather and news to stack vertically, the sports is in a tabbed view with the stocks, etc).
I think it could really help if there was a solid base on which to build and you have multiple devs across different departments all contributing to a single product. Like I said, overkill for most.
Buuuut, I think it is the most evolved version I've seen of what you were talking about. It has helped informed how I think about building single page apps in a large scale enterprise app, and boy do you need a good OOP base to make it work. I would re-read the book if I was doing a large scale PHP-based app where UI was generated on the back end. But I'd probably end up extracting the actual HTML into twig templates, and using the objects as a way to give the app insight into the needs of the HTML from a JS/CSS perspective.
Gotta the make believe internet points now before Reddit takes them away!
Just commenting 2 years later to report after updating a Ubuntu with an Nvidia card, my machine wouldn’t post. Only the red VGA led on my board would light up. Pulling the DisplayPort and using HDMI instead made it boot immediately. Ended up reproducing the same problem after an install and update of Nobara a few days later. I wouldn’t have ever thought to change out the DP connection for HDMI.
The terminal supports control characters that allow you to move the cursor back to the beginning of the line, or anywhere in the terminal for that matter.
From shell scripts you can use something like tput to position the cursor and then print over the existing output, and then it just looks like an update.
For a starting point to the concepts check out the Wikipedia article for the POSIX terminal interface
All languages should have some kind of library available, sometimes hundreds.
Timeshift uses hardlinks from previous backups for files that haven't changed. But using "rsync -a" the hardlinks are not maintained and you end up with multiple copies of the same data.
I believe you would need to "rsync -aH" to maintain the hardlinks too.
If mlocate is installed, and the cache has been built that would be fastest. But on an SSD I haven’t found find to be “slow”. Additionally it is very versatile.
Specifically though you probably want to look at the
-type f -iname *.mdparameters instead. It will only look at files and only compare the file name instead of the entire path.This is also where GUI search tools bundled with Gnome and KDE are suppose to come in. They prebuilt a cache that is supposed to be fast to search through. But I’ve always enjoyed the ubiquity of find.
You’ll likely be fine. My pseudo understand of the LVM Mount process is to basically scan the devices for volume groups and logical volumes, which then show up in /dev/mapper. It is agnostic of the physical connections. I’ve moved disks from machine to machine, or from SATA to USB-SATA enclosures and not had an issue with them showing up.
It doesn’t really help you now, but take a look at stow. If you’re compiling something that uses autoconf you can change the prefix where it gets installed. Then stow can be used to symlink everything to the correct /usr directories. When you want to remove it you unstow and delete one directory.
I don’t think you can do standard output redirection that way in a systemd unit. One of systemd’s major features is to capture the output of services in a central place.
There are other methods for that depending on the version. Look at the Exec docs
Also if you provide a file name as the last argument to Sox, won’t it use that as the output file? No redirection needed?
Like others have said mouse selection, copy and paste should be a function of your terminal emulator. Not the shell.
If you are looking for more flexible navigation and control over what you can do to edit your command, Bash has a vim mode and an emacs mode. set -o vi will let you hit escape and use Vim shortcuts to navigate and modify the command.
As everyone says, tmux. But specifically if you’re using the Java Minecraft server look over at the MC wiki because there are better options for managing it so it starts at boot as a daemon, but still be able to send commands. They’re a better long term solution.
By leveraging
data_get()the rules can support dot notation to validate complex objects. But then you have an issue where what shoulddata_get()return if the key doesn't exist? In PHP common ones arefalse,null,0, throw an exception. But all values are equally possible to store in an array, and throwing an exception for each one would be silly.So you generate some sufficiently random bit of data, pass that in as the default. If you get that default back out you know the value doesn't exist.
At least that is my guess.
It’s beating a dead horse, and while I don’t agree VSCode is a as bad as all that, if you’re worried about RAM, generally stay clear of electron apps. Look at SublimeText for a similarly configurable editor, with much better ram usage, especially in very large files.
So anything change?
If you changed SOMETHING, don’t ignore that. No matter how unlikely, it is at least a starting point.
Run the following and look for clues around 8pm
If there is nothing to go on there, then I might try spoofing the MAC address. My thinking here is a “parental control” feature or something along those lines. If it is only one device then often this means it is limiting by mac or IP. So try both.
A more advanced info collection method would be to run wireshark on the server and a separate machine. Generate some traffic, see what comes up in both. Nmap the server externally, see if you get SOMETHING. You’ll have to Google these things, a bit beyond a Reddit comment.
You said it is a static IP, I’d make sure you aren’t assigning a static IP that overlaps with your DHCP range. It would be odd to have such regular outage, but this will definitely cause issues sooner or later.
I have many many questions:
Ah yes. Right. They're different Profiles on the same device. That is trickier. I think that means you're going to need to build your own audio profile. You might still end up not being able to do what you want if there is an actual hardware limitation on the number of output streams.
Check out the relevant part of ArchWiki : https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Simultaneous_output_to_multiple_sinks_on_the_same_sound_card_not_working
Good luck!
The easiest way to accomplish this, but possibly more overkill than you’re looking for us to install PulseAudio Preferences (paprefs) and in the “Simultaneous Output” tab enabling “Add virtual output device ...”
Then you’ll have a new output device that plays to everything. But you can mute the individual output devices you don’t want with something like PulseAudio Volume Control
It is an incredibly difficult problem to solve. Every platform has their own issues if you start digging in.
For Linux, in the instance you describe the best option I’ve come across is the previously mentioned stow command. Most software I’ve compiled has provided an easy way to change the prefix, which makes since because this is necessary to package the software.
Another handy tip is once you know how stow works, you can exploit it to handle making dotfiles easily available for versioning. Loads of people have home spun solutions for it.
And not trying to pretend like it isn’t a usability issue, but what you’re seeing in windows isn’t a holistic solution like a package manager should be. Most of those downloaded exes are just unzippers that put files where they need to go and also register themselves in a known location for uninstall. But the uninstaller is generally provided by the originally programmer (or tool they used). They often miss files, or back in the day they’d remove extra files they weren’t suppose to.
Honestly there isn’t anything preventing Linux developers from doing the same thing, drop a script in the sbin folder called “uninstall_xyz”. But I think the reason why they don’t is simply that a supported package is better in the long run. Then you’ve got your Snaps, flatpaks, AppImages that all solve similar issues in different ways. Actually one of the most elegant solutions I’ve found for non-repo software is AppImages when paired with appimaged but a non-graphical app image is super rare.
I don’t have a fix for you, but whenever this has happened to me in the past, it is an issue with pulse audio. Try doing
pulseaudio —killand thenpulseaudio —start, then try playing a second video. If it fixed the issue then it might be an issue with an audio sink. Then it’s looking at logs, adjust settings, etc.Yeah I tried it later and you’re right.
I think the correct approach is to just capture the output and operate on it twice like a previous comment said. But you could, in limited scenarios accomplish what you wanted to do with a combo of
teeand process substitution>()fortune | tee >(espeak) | cowsayI haven’t tried it, and cowsay will also receive any output from espeak so you may want to redirect its output.
You may want to try the GameMode instead. It will set the governor and a few other things to optimize performance.
Just use OBS. That is literally what it was designed for. And the default config already has two audio inputs, Desktop Audio and Mic/Input. You just have to add a scene to capture the screen or window. Then it is saved and reusable. Pop open OBS and hit record and you’re off to the races.
Plus when you decide later you want to do anything else remotely related you’ll already have experience in the basics.
Yeah but in that case you the infer the programmer is a royal asshole.
But I take your point.
Their whole thing seemed to be isolated / reusable components that could be combined without a thought to their dependencies. So if you had a weather widget and you wanted to embed it on the home page you just create the object and on render it will pull all of the dependencies and source. It is a great concept and I'm sure I just implemented it poorly. But if you really commit to it, you'll have a page object for each page, layout object for each page type (2-col, 3-col, blog, splash, etc), you end up making objects to define internal layouts (I need the weather and news to stack vertically, the sports is in a tabbed view with the stocks, etc).
I think it could really help if there was a solid base on which to build and you have multiple devs across different departments all contributing to a single product. Like I said, overkill for most.
Buuuut, I think it is the most evolved version I've seen of what you were talking about. It has helped informed how I think about building single page apps in a large scale enterprise app, and boy do you need a good OOP base to make it work. I would re-read the book if I was doing a large scale PHP-based app where UI was generated on the back end. But I'd probably end up extracting the actual HTML into twig templates, and using the objects as a way to give the app insight into the needs of the HTML from a JS/CSS perspective.