• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "linux". Back to normal view
    1. How do I sync my dotfiles between PC and laptop?

      I've been struggling with this for a long time. I want to keep my workflow consistent independent of my "workstation", and have identical dotfiles (like .bashrc, .vimrc etc.) on different devices....

      I've been struggling with this for a long time. I want to keep my workflow consistent independent of my "workstation", and have identical dotfiles (like .bashrc, .vimrc etc.) on different devices.

      So... How you personally deal with this issue, and what should I do?

      Thanks!

      12 votes
    2. Share your personal dotfile treats and Unix tool recommendations

      I am currently preparing for a new job and cleaning up my dotfile repository. During the process, I had the idea that it would be nice to create a list of amazing tools, aliases, functions, and...

      I am currently preparing for a new job and cleaning up my dotfile repository. During the process, I had the idea that it would be nice to create a list of amazing tools, aliases, functions, and recommendations together.

      I will start.

      First, here is a list of nice tools to apt-get install or brew install that I can wholeheartedly recommend:

      • nvim is just an amazing text editor.
      • fzf is a very good fuzzy finder util. For example, you can quickly find files with it.
      • eza is a good ls replacement (and the successor of exa).
      • bat is a great replacement for cat with nice integrations and many options.
      • stow is great for managing your dotfiles. Thanks to @TangibleLight for telling me about it some while ago. I really love it.
      • tmux is a terminal multiplexer, i.e. you can have many sessions in one single terminal window. It's easy to use and super helpful. (When on a mac, I prefer iTerm tabs, though.)
      • nvm is practically a must if you are working with Node.
      • glow is an excellent markdown reader.
      • tldr is a nice man replacement. (You must run tldr -u after installing it to update available texts.)
      • z, an amazing tool for switching directories quickly.

      Also, I can recommend Oh My ZSH! which I have been using for years.

      Here is a small list of aliases I enjoy (I have 100+ aliases and I tried to pick some others may enjoy as well):

      # Serve current dir
      alias serve="npx serve ."
      
      # What's my IP?
      alias ip="curl --silent --compressed --max-time 5 --url 'https://ipinfo.io/ip' && echo ''"
      
      # This should be the default
      alias mkdir="mkdir -p"
      
      # Nice git helpers
      alias amend="git add . && git commit --amend --no-edit"
      alias nuke="git clean -df && git reset --hard"
      
      # Make which more powerful
      which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
      
      # This saves so many keystrokes, honestly
      alias -- +x="chmod +x"
      
      # Turns your path into a nice list and prints it
      alias path='echo -e ${PATH//:/\\n}'
      
      # Map over arguments and run a command
      # Usage: map <command>
      # Example: ls | map cat
      alias map="xargs -n1"
      

      And, finally, here are some fun functions:

      # Get cheat sheets for almost anything!
      # https://github.com/chubin/cheat.sh
      cheat() {
          WITH_PLUS=$(echo $@ | sed 's/ /+/g')
          CAT_TOOL=$(command -v batcat || command -v bat || command -v cat)
          curl "cheat.sh/$WITH_PLUS" | $CAT_TOOL
      }
      
      # Send everything to /dev/null
      nullify() {
        "$@" >/dev/null 2>&1
      }
      
      # Create a new dir and enter it
      mk() {
        mkdir -p "$@" && cd "$_"
      }
      
      # Create a data URL from a file
      # Source: https://github.com/mathiasbynens/dotfiles/blob/master/.functions
      data-url() {
      	local mimeType=$(file -b --mime-type "$1");
      	if [[ $mimeType == text/* ]]; then
      		mimeType="${mimeType};charset=utf-8";
      	fi
      	echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')";
      }
      
      74 votes
    3. best way to go about with a script that seems to need both bash and python functionality

      Gonna try and put this into words. I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them. My issue is I often do a thing where if I want to...

      Gonna try and put this into words.

      I am pretty familiar with bash and python. used both quite a bit and feel more or less comfortable with them.

      My issue is I often do a thing where if I want to accomplish a task that is maybe a bit complex, I feel like I have to wind up making a script, let's call it hello_word.sh but then I also make a script called .hello_world.py

      and basically what I do is almost the first line of the bash script, I call the python script like ./hello_world.py $@ and take advtange of the argparse library in python to determine what the user wants to do amongst other tasks that are easier to do in python like for loops and etc.

      I try to do the meat of the logic in the python scripts before I write to an .env file from it and then in the bash script, I will do

      set -o allexport
      source "${DIR}"/"${ENV_FILE}"
      set +o allexport
      

      and then use the variable from that env file to do the rest of the logic in bash.

      why do I do anything in bash?

      cause I very much prefer being able to see a terminal command being executed in real-time and see what it does and be able to Ctrl+c if I see the command go awry.

      in python, you can run a command with subprocess or other similar system libraries but you can't get the output in real-time or terminate a command preemptively and I really hate that. you have to wait for the command to end to see what happened.

      But I feel like there is something obvious I am missing (like maybe bash has an argparse library I don't know about and there is some way to inject the concept of types into it) or if there is another language entirely that fits my needs?

      6 votes
    4. Do you just leave apps open in Gnome?

      I use keepassxc as my password manager and it sits in the system tray quietly until it is requisited by a login form in firefox. Gnome does not have a system tray, so you just open keepassxc on...

      I use keepassxc as my password manager and it sits in the system tray quietly until it is requisited by a login form in firefox.

      Gnome does not have a system tray, so you just open keepassxc on startup and it just stays there floating in the background?

      It's been months since I last used Gnome. Did anything change or it's still like this?

      10 votes
    5. What advantages does Linux have over other operating systems?

      When people talk about switching to Linux from Windows/macOS, especially for those inexperienced with Linux, the conversation often becomes mostly about drawbacks: all the things you'll have to...

      When people talk about switching to Linux from Windows/macOS, especially for those inexperienced with Linux, the conversation often becomes mostly about drawbacks: all the things you'll have to sacrifice, that don't work outright, or that aren't as smooth.

      On the other hand, if you had to highlight the advantages of Linux to a newcomer, what would you say?

      What might someone gain by switching to Linux, rather than lose?

      What are some of the drawbacks people are currently living with on other OSes that they might not be aware of simply because they're used to them?

      50 votes
    6. FUEL: I shouldn't be able to play this game

      I recently had a hankering to return to one of my all-time favorite games: FUEL. I couldn't stop thinking: how cool would it be if I could revisit the game from the comfort of my Steam Deck? That...

      I recently had a hankering to return to one of my all-time favorite games: FUEL. I couldn't stop thinking: how cool would it be if I could revisit the game from the comfort of my Steam Deck?

      That was my dream, but a few problems stood in the way:

      1. FUEL was released in 2009 and was delisted from Steam in 2013. (Thankfully, I have a copy of it in my library, but we're talking about an installation build that is over a decade out-of-date at this point.)

      2. FUEL still has Securom DRM.

      3. FUEL still requires Games for Windows Live, which was also shut down in 2013.

      4. FUEL is pretty mediocre unless you install the REFUELED mod.

      So, I sat down with my Steam Deck and a hope and a prayer that maybe, somehow, I could get this game working?

      Hurdle 1 wasn't even a hurdle. Proton is so damn good now. The game installed and ran flawlessly. I honestly never should have second-guessed it in the first place!

      Hurdle 2 was also, surprisingly, a non-issue. Either the Securom servers are somehow still live and actually checked my CD key, or the dialog box lied to me as part of an offline fallback and told me I was cleared anyway (I'm thinking this is more likely?). Either way, I was happy.

      Hurdle 3 was the first actual block. The game crashes when trying to pull up GFWL, which is pretty much what I expected -- the service has been down for over a decade now. Thankfully, there's an unexpectedly easy fix. Xliveless is a DLL that bypasses GFWL and lets the game boot (and save) without it.

      Hurdle 4 isn't really a hurdle per se, but that's only because the Steam Deck lets you boot into Desktop Mode and get fully under the hood. I downloaded the mod, dumped the files in the installation folder, ran the mod manager through Protontricks, and then set up all of my mod choices. I then jumped back into game mode, and the game is flawlessly running -- mods and all.

      I should also mention that I did all of this on-device. I didn't need to break out a mouse and a keyboard or transfer files from my desktop or anything. From the first install of the game to running it fully modded took me maybe ten minutes total? It was amazingly quick, and most of that time was me searching up information or waiting for the Deck to boot over and back between Desktop and Game Mode.


      I realize that, in the grand scheme of game tinkering, this doesn't sound like a whole lot, but that's honestly the point. The fact that this comes across as sort of mundane and uneventful is, paradoxically, what makes it noteworthy. If we're keeping score here, I am:

      • playing a 2009 Windows game,
      • that was delisted in 2013,
      • on a Linux handheld device in 2024.

      I also:

      • somehow passed the game's decade-old DRM check,
      • bypassed the game's second DRM system that has been officially shut down for over a decade,
      • modded the game in literal seconds,
      • and did all that using only a controller -- while lying on my couch.

      From a zoomed out perspective, I shouldn't be able to play this game. FUEL should be dead and buried -- nothing more than a fond memory for me. Even if I turn the dial a little more towards optimism, it really shouldn't be this easy to get up and running. I thought I was going to spend hours trying to get it going, with no guarantee that it ever would. Instead I was driving around its world in mere minutes.

      I'm literally holding FUEL and its massive open-world in my hands, fifteen years after its release, on an operating system it's not supposed to run on, and on a device nobody could have even imagined was possible when the game released.

      We really are living in the future. I remain in absolute awe of and incredibly grateful for all the work that people do to make stuff like this possible.

      38 votes
    7. Is it possible to sharpen this video with tools freely available on Linux?

      I really like this instructional video. I even downloaded a copy. The copy I downloaded is as blurry as the copy on YouTube. Is it possible to possible to sharpen my copy of that video? If it is...

      I really like this instructional video. I even downloaded a copy. The copy I downloaded is as blurry as the copy on YouTube.

      Is it possible to possible to sharpen my copy of that video?

      If it is possible, can it be done with freely available software on Linux?

      Thanks either way.

      11 votes
    8. Framework 16: Additional hardware questions

      I'm looking to buy a Framework 16 in its most powerful Ryzen config. I'm looking at this being the last laptop I need to buy because of its modular design, so I don't mind the heavy initial...

      I'm looking to buy a Framework 16 in its most powerful Ryzen config. I'm looking at this being the last laptop I need to buy because of its modular design, so I don't mind the heavy initial investment.

      I'm looking to shave of $400-500 by buying parts externally, however. I wanted it to be 64GB RAM, with a 4TB OS drive to run Aurora on, and later on a second drive for another non-immutable LTS distro (probably Debian?).

      If I can source the same RAM/Storage, is there any reason to actually buy them from Framework? I'm a bit confused by the huge price difference, since I can get the same memory and storage hardware from Microcenter for about $400 less total.

      And if anybody has any experience with the Framework 16 as a daily driver, I'd be interested to hear any stories. I'm not getting the graphics module yet, but may down the road to see if it can replace my desktop fully. Drivers should not be an issue as Aurora has a Framework image that contains everything I'll need.

      10 votes
    9. 3840x2160 120 Hz KVM

      Can someone recommend a KVM that works? I've been looking for a couple of years now. Requirements: 2-port, 1-monitor, DisplayPort 1.4 KVM Has a wired push button switch (and cable can be extended...

      Can someone recommend a KVM that works? I've been looking for a couple of years now.

      Requirements:

      • 2-port, 1-monitor, DisplayPort 1.4 KVM
      • Has a wired push button switch (and cable can be extended if needed)
      • Runs at 3840x2160 @ 120 Hz (or 60 Hz)
      • Works with HP docking station (HP USB-C Dock G5 for business)
      • Works with Classic 101 Black Buckling Spring USB keyboard
      • Works with Logitech TrackMan Marble Trackball
      • Works with HP laptop and custom desktop build (NVIDIA T1000 GPU)

      Anti-requirements:

      • Does not intercept keystrokes (or can be disabled)
      • Does not intercept mouse scrolling (or can be disabled)
      • Does not randomly repeat keys
      • Does not block certain keystrokes (e.g., ctrl+shift+t)
      • Does not let Windows laptop go to sleep
      • Does not require manually re-waking Windows laptop by pushing power button
      • Does not require switching back-and-forth to re-establish connectivity to both computers
      • Does not take more than 3 seconds to switch between computers
      • Does not randomly blank the screen for 1 second
      • Does not require unplugging and re-plugging the USB keyboard

      Here's the setup showing both computers and the push button switch:

      I have tried:

      • IOGEAR GCS62DP (almost perfect; kills keyboard after 60 swaps; RMA'd)
      • DiamondTiger KVM Switch EDID 8K@60Hz, 4K@144Hz, DP 1.4 (repeats keys, blanks screen, has screen tearing, and many other issues)
      • CanadaComputers iCAN HDMI USB KVM Switch 2x1 with Switch Extension 4K 60Hz (completely blocks certain keystrokes)

      Wendell's Level1Techs Store offers a highly recommended KVM, yet lacks a wired toggle button.

      What other KVM switches are available that "just work" and have a wired push button for switching?

      The next KVM I'm thinking about trying:

      ATEN also has a switch, which is on par with the IOGEAR (4K @ 60 Hz, no EDID):

      6 votes
    10. Linux gaming and the Steam Summer Sale: What are your favorites?

      I've gamed my entire life on Windows until about a month ago, when I switched due to my dissatisfaction with it as an operating system (another thread, another time). After years of hearing that...

      I've gamed my entire life on Windows until about a month ago, when I switched due to my dissatisfaction with it as an operating system (another thread, another time). After years of hearing that gaming on Linux was improving thanks to Steam Deck and Proton, I took the plunge and installed Pop!_OS on my desktop and loaded my favorite games. Holy smokes, it's amazing. I haven't found a game yet that's required any custom tweaking; download the game through Steam, let it install whatever it needs to on first run, and away they go. I'm blown away.

      However, I want to start exploring Linux-native titles in a more deliberate manner. Do many others here game on Linux, and if so what are some of your favorites that you would recommend now that the Steam Summer Sale is on? I mostly gravitate towards builders and colony simulators, RPGs, and 4X games, but I'll take any recommendations that people are excited to share.

      [Edit to add:] Thanks for your recommendations everyone! I'll definitely check out several of these.

      37 votes
    11. What are some great time savers on CLI that you would recommend?

      I use these right now on Debian: ncdu ncdu (NCurses Disk Usage): A disk usage analyzer with an ncurses interface, providing a fast and easy-to-use overview of disk space utilization. Ideal for...

      I use these right now on Debian:

      ncdu

      ncdu (NCurses Disk Usage): A disk usage analyzer with an ncurses interface, providing a fast and easy-to-use overview of disk space utilization. Ideal for identifying large directories and files in a user-friendly terminal interface.

      duf

      duf (Disk Usage/Free): A modern disk usage/free utility with a beautiful interface written in Go. It provides a quick and easy way to check disk usage across various file systems with color-coded output.

      tldr

      tldr (Too Long; Didn't Read): Simplified and community-driven man pages. Provides practical examples for commands, making it easier to understand and use without wading through lengthy and detailed man pages.

      nala

      nala (Next-Generation APT Frontend): A modern frontend for the APT package manager, designed to provide a more readable and user-friendly output for package management tasks.

      Speedtest-cli

      Speedtest-cli: A command-line interface for testing internet bandwidth using speedtest.net. Allows you to quickly check your upload and download speeds directly from the terminal.

      htop

      htop: An interactive process viewer for Unix systems. It provides a real-time, color-coded display of system processes, making it easier to monitor and manage system resources.

      powertop

      powertop: A tool for diagnosing issues with power consumption and power management on Linux systems. It provides detailed information on power usage by various system components and applications.

      thinkfan

      thinkfan: A simple fan control program for ThinkPads. It helps manage the system's fan speed to balance cooling and noise levels based on the temperature sensors.

      tlp

      tlp (Linux Advanced Power Management): A power management tool for Linux. It provides various configurations and options to optimize battery life on laptops without requiring manual tweaks.

      flatpak

      Flatpak: A system for building, distributing, and running sandboxed desktop applications on Linux. It provides a universal app distribution system that works across various Linux distributions.

      neofetch

      Neofetch: A command-line system information tool written in bash. It displays an aesthetically pleasing summary of system information alongside your terminal prompt.

      iftop

      iftop: A real-time console-based network bandwidth monitoring tool. It shows a list of network connections from/to your system and the bandwidth usage for each connection.

      nano

      nano: A simple, user-friendly text editor for the command line. Known for its straightforward and easy-to-use interface, making it a go-to for quick text editing tasks.

      Edit
      Oh wow! Thank you all for your suggestions!

      I was looking around and found cheat; it's defined as a cheat that allows you to create and view interactive cheatsheets on the command line. Hopefully, someone else might find it helpful as well.

      38 votes
    12. How bad are Nvidia GPUs for Linux really?

      I've been interested in switching to Linux, or at least dual booting, for some time now as Windows has kept getting worse and Proton for Steam has been getting better. I'm particularly interested...

      I've been interested in switching to Linux, or at least dual booting, for some time now as Windows has kept getting worse and Proton for Steam has been getting better. I'm particularly interested in trying Mint Cinnamon.

      In every Linux thread on here or Lemmy, I always hear people complaining about Nvidia drivers for Linux or other hardware problems that they avoid by having AMD.

      I have an Intel CPU and Nvidia GPU. How big of a problem is that, really? Does it make it an unbearable experience? Does it make it a lot more work to get things working? Does it make certain things impossible to get working? What's your experience?

      Also for dual booting, I hear people have problems with Windows messing up their Linux install. Is that a common problem, or a few people having bad luck? Is that avoidable?

      30 votes
    13. “It can’t be that easy, right?” (a Linux desktop environment appreciation post)

      I daily drive Pop!_OS, which uses the GNOME desktop environment. I know that DEs are a hotly contested space among Linux users, and my use of GNOME wasn’t so much a choice as it was a default:...

      I daily drive Pop!_OS, which uses the GNOME desktop environment. I know that DEs are a hotly contested space among Linux users, and my use of GNOME wasn’t so much a choice as it was a default: it’s what came with my distro.

      I like GNOME. I don’t really understand the hate it often gets, but I also don’t really have the legacy understanding of Linux that a lot of people do, and it seems like a lot of distaste lies there. I’m as casual a user as they come — Linux for me is like a Chromebook: it “just works” in that I pretty much need it to get me online and manage some documents. (I do also play games on it, for which Steam and Proton have been a huge boon.)

      I also have a Steam Deck, and it uses KDE’s Plasma on the desktop side, so I got to see what that was like. I also like KDE. It’s very different from GNOME, but I can see the appeal. It feels more like Windows but also has a lot of little nice touches and additions. Also, no ads.

      This got me thinking: what if I tried using KDE instead of GNOME on my laptop?

      I assumed that this would be a big deal. Like, I would have to completely gut my distribution, or reinstall it fresh. Multiple hours of work. Lots of preparation. Looking up myriad terminal commands I don’t understand and hoping they do what they’re supposed to, because if they don’t I’m really screwed — as soon as something goes wrong “under the hood” I’m dead in the water when it comes to fixing it.

      But I was looking on System76’s support site and they made it seem super simple. A single terminal command to install the whole DE?

      It can’t be that easy, right?

      I am astonished to say that it WAS.

      I ran the command, had to select between gdm3 and sddm (a choice which I didn’t understand at all so I searched around a bit before just going with the default: gdm3), and then rebooted.

      I can now select between GNOME and KDE on the login screen, and both work flawlessly. It was so easy.

      I don’t know who to credit for this. Did System76 do a great job of making this easy on their distro? Did the KDE team work hard to make their DE effortlessly plug-and-play? Is this just a general product of the way Linux handles its different components?

      I don’t know but I’m willing to spread the love around to anyone and everyone who contributes to Linux and all of its facets. It’s wild to me that I can so easily reskin my entire operating system in the same way that I used to do with Winamp back in the day. I keep waiting for something to go wrong, but after a few days of this, I’ve realized that everything still “just works,” automagically.

      A big thanks here to anyone who has a hand in open-source software and making computing better for people like me, who have (mostly) no idea what they’re doing.

      56 votes