• 0 Posts
  • 219 Comments
Joined 1 year ago
cake
Cake day: June 10th, 2023

help-circle





  • Personally I have a USB drive with Ventou and have been using that for a long time.

    But before that I just did a dd. Although I seem to remember someone doing a benchmark and realizing that piping the file was faster. Here’s what I mean by that:

    In bash you have the echo command which prints text:

    echo "Hello"
    

    Will print Hello.

    In bash you can send the output of a command to a file, so:

    echo "Hello" > hello.txt
    

    Will write Hello in the hello.txt file.

    In bash you can use the cat command to read files:

    cat hello.txt
    

    Will print the Hello we wrote in that file earlier.

    In Linux drives are files, so if your USB drive is in /dev/sdb (DON’T JUST BLINDLY COPY THIS) you can create an image of it like so:

    cat /dev/sdb > usb.iso
    

    But also the devices are writable, so you can flash an image to a disk by doing it the other way around:

    cat image.iso > /dev/sdb 
    


  • Not exactly what you’re asking but it could help.

    Say you want to always use your desktop as the main device. You would plug everything onto the desktop, and have the laptop only plugged into the monitor (this is easier if you have two monitors so you can make one of them be forever desktop and the other forever laptop, so you don’t have to keep switching the monitor inputs).

    You will install Barrier on both of them, then configure your desktop to be the server and the laptop to connect to it. So for example suppose you keep your laptop to the right of the main screen, if you configure this properly you will be able to move your mouse from your monitor (desktop) to the laptop screen and click and write there even though the mouse and keyboard are plugged onto the desktop.

    From there it’s a quick jump to having both plugged onto the same monitor and switching the input and moving the mouse right until it shows up.

    Now this is not perfect, but it lets you use both PCs without a KVM. But just so you know I used this for a couple of years and bought a KVM and have never looked back, so since you’re already using a KVM this might feel janky or slow, but give it a try.



    1. What do you recommend I do about disk partitions?

    The basic is /home split from / that way you don’t lose your data should you need to reinstall.

    I’m keeping a Windows install for the few things that demand it, does Windows still occasionally destroy Linux partitions?

    Not asuch as before, but I think it still sometimes it does. I think the recommendation is to use UEFI and have a /boot sp ok it from the Windows EFI one, but I haven’t used Windows in a long time so better check this

    Do I need separate partitions for data and OS?

    You don’t need to, but it’s better for you if you do, since that allows you to not lose data should you want to switch distros or reinstall the system.

    Is it straightforward to add additional distros as new partitions or is that asking for trouble?

    Only time I tried that (many years ago) I fucked up everything, but in theory it should be doable.

    1. Is disk encryption straightforward? And is that likely to upset the Windows partition?

    It’s straightforward (a checkbox on most distros installer) and Windows won’t care about it.

    1. Is cloud storage sync straightforward? It’s my off-site backup solution on Android and Windows (using Cryptomator with Dropbox, Google Drive, etc) but I don’t think that many providers have Linux clients. Is something like rclone recommended?

    Drive doesn’t provide Linux client, Dropbox does. Like you mentioned there are other tools, such as rclone, for accessing drive if you want to.

    1. Should I just use apt to install software? I know there’s some kind of graphical package manager (synaptic?), does that use apt under the covers or is it separate? Is it recommended to install something like Flathub too?

    The GUI (like usually on Linux) just uses the CLI tools, so yeah, the graphical package manager just uses apt under the hood. However it also uses snap/flathub as well. Should you care about those? Maybe, some software is only available there because the devs don’t want to maintain multiple distro packages. But I wouldn’t use snap/flathub as my default (especially not at the beginning) even if they are theoretically more secure (especially because they are more secure, meaning they need control access to other stuff, e.g. zoom unable to detect you have a camera, or Firefox not able to download things to the download folder because of bad permission configurations)

    1. Any other pearls of wisdom? How do I keep everything tidy? Any warnings about what not to do? Should I use a particular terminal emulator or Firefox fork?

    Just a note on hardware compatibility, some cards are not very compatible. If you like to game (you did mention a steam deck) and you have an Nvidia you MUST use the proprietary driver. However the proprietary driver SUCKS on Wayland, so you’re stuck on X11 for the time being.

    Besides that some wireless cards are not properly recognized, you will realize this quickly when you boot the live iso if that’s your case.

    Finally I would recommend Mint instead of Ubuntu, they’re still on X11 and are not forcing Snaps down everyone’s throats.


  • Ok, so I’m assuming you have never installed Windows before. It’s not that complicated (especially nowadays that Windows finally learned how to automatically search for drivers, that used to be the most annoying part). First of all make a note of your current Windows CD Key, you will need it to reinstall and not every computer can retrieve it if you uninstall windows.

    After that, you need a windows USB drive, just like the Linux one you’ll use to install Linux. You can get it from Microsoft website, but again I advise you to get it while on Windows (Microsoft hides the way to download the iso on Linux).

    Finally I strongly recommend you DON’T uninstall windows, instead keep it and install Linus side by side. This is called dual booting, every time you turn on your computer it will ask you where to boot.


  • Not really, the issue is that C/C++ is not memory safe, i.e. it allows you to access memory that has already been freed. Consider the following C++ code:

    int* wrong() {
      int data  = 10;
      return &data;
    }
    

    If you try to use it it looks correct:

    int* ptr = wrong();
    std::cout << *ptr << std::endl;
    

    That will print 10, but the memory where data was defined has been freed, and is no longer in control of the program. Meaning that if something else allocated that memory they can control what my program does.

    Consider that on that example above later in the program we do:

    user.access_level = *ptr;
    

    If someone manages to get control of that memory between when we freed it and we used it they can make the access_level of the user be whatever they want.

    This is a problem with C/C++ allowing you to access memory that has been freed, which is why C/C++ programmers need to be extra careful.



  • I don’t use Logseq, I use Silverbullet, and yes, it helps A LOT. I have lots of random notes on random pages on how to do things at work, or on my personal servers or whatever. You know that feeling of “I’ve already had to deal with this, how the hell did I do it?” It’s completely gone.

    If you use a good organization system with a hierarchy that makes sense and tags you can easily find stuff, so you can turn off your brain from having to remember all of that and it can focus on the thing you need to actually solve now. Don’t know if you’re old enough to remember a time before cellphones, we had to remember our friends number, nowadays this is not a concern, because your phone will remember the number for you, it’s like that but for everything, very liberating.



  • First of all you should have asked what he wanted to do with the laptop, the moment he replied playing games that are not on Steam you should have let him use Windows. Secondly, a laptop with 256GB of disk is likely going to have very low amounts of RAM and an onboard GPU, performance is going to be shit on Windows as well, you should have let him use that before, I think it’s highly likely that Windows itself would run like shit on it, so after a year or two putting Linux on that laptop would have blown his socks off. But the problem is that he didn’t get to experience any of that before you touched the computer, now he will claim it’s your fault that games don’t run or Windows is slow. I’ve been there, a friend had issues with the laptop, I said I didn’t understand Windows and would only help if I could put Linux, at first everything worked great, but then the friend needed special software that wasn’t available so I had to reinstall Windows for them (and btw, you OBVIOUSLY should reinstall Windows for your friend), and then everything on that laptop was my fault, even the problems the person was having before were somewhat my fault because I had put Linux there.