There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

linux

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

dlarge6510 , (edited ) in How to make it such that, when running `command`, it automatically does `SOME_ENV_VAR=value command`? (something cleaner than aliases?)

Put your aliases in .bash_aliases

Make sure your .bashrc sources .bash_aliases like this:

if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi

2xsaiko , in Why is copy and paste so difficult for Linux to solve?
@2xsaiko@discuss.tchncs.de avatar

I’ve only ever had this problem for the first few janky years of Wayland. Not anymore.

linuxFan , in Why is copy and paste so difficult for Linux to solve?
@linuxFan@vlemmy.net avatar

Linux has 2 clipboards. You’re mixing the two. askubuntu.com/…/two-clipboards-possible

Fleppensteijn , in Why is copy and paste so difficult for Linux to solve?
@Fleppensteijn@feddit.nl avatar

From what I understood is that the functionality that pastes selected text with middle-click is coded deep in the Linux kernel, so it doesn’t even use a clipboard and it would be hard to get rid of this functionality. As others mentioned, using normal copy-paste commands (ctrl+shift+c) shouldn’t be a problem because it uses a clipboard.

sovietsnake , in Why is copy and paste so difficult for Linux to solve?
@sovietsnake@lemmygrad.ml avatar

As far as I know that happens because in Linux ctrl+v and middle click pastes are stored in different places and are considered different things, in fact there’s a third way to paste which I don’t remember. But basically the middle click paste is used whenever you select a string, there’s no need to copy it, and the ctrl+v paste works when you do ctrl+c.

ik5pvx , in Why is copy and paste so difficult for Linux to solve?

There are two copy/paste buffers. The one you get with just the mouse is not the same as the one you get with ctrl-c ctrl-v. And frankly, once you know this, it’s f*ing awesome. If you really want a single buffer, there are apps that do that.

Nuuskis , in Why is copy and paste so difficult for Linux to solve?

What I’d like to see is a clipboard history which pastes the content into cursor with just mouse click/enter.

animist ,

Clipboard indicator might be what you’re looking for, unless I misunderstood your comment

treadful , in How to make it such that, when running `command`, it automatically does `SOME_ENV_VAR=value command`? (something cleaner than aliases?)
@treadful@lemmy.zip avatar

Is there some reason you just don’t export those env vars in $HOME/.bashrc or $HOME/.bash_profile?

<pre style="background-color:#ffffff;">
<span style="font-weight:bold;color:#a71d5d;">export </span><span style="color:#323232;">SOME_ENV_VAR</span><span style="font-weight:bold;color:#a71d5d;">=</span><span style="color:#183691;">value
</span>

If it’s every time you run the command, seems like it should be set globally.

cyclohexane OP ,

Because it’s not as maintainable as separating them by application or some other separation. Would not want to fill up my bashrc with single-application specific code.

treadful ,
@treadful@lemmy.zip avatar

You could break it out into other files if you really got that much going on. But if you really have hundreds or more env vars, maybe you should re-think using env vars at all.

Hard to give a rec without more detail, so I don’t really get it.

nicoag328 , in How to make it such that, when running `command`, it automatically does `SOME_ENV_VAR=value command`? (something cleaner than aliases?)

You could source an aliases.sh file on your .bashrc where you define your aliases, so that they don’t fill up your bashrc.

For example, in your bashrc:

source ~/.aliases.sh

This way you could also create a file with aliases per program.

treadful ,
@treadful@lemmy.zip avatar

FYI: $HOME/.bash_aliases is standard and most distros’ .bashrc will source that file by default.

oranki ,

Most Debian based distros, actually.

treadful ,
@treadful@lemmy.zip avatar

And at least arch. Probably others.

cyclohexane OP ,

That’s a good idea, but it only makes the problem a little better. I still wouldn’t want one large aliases.sh file with environment variables for every application I customized. Would rather have them separate somehow without gobbling up a file

nicoag328 ,

You can source other files inside aliases.sh or as @treadful noted .bash_aliases

.bash_aliases:

source .aliases/program_x.sh``source .aliases/program_y.sh

This way you can have a file with aliases for each application or group of applications.

But it would be helpful if you provided more information on what you really want to do. Read https://xyproblem.info/

Andy , (edited ) in How to make it such that, when running `command`, it automatically does `SOME_ENV_VAR=value command`? (something cleaner than aliases?)
@Andy@programming.dev avatar

If you were using Zsh, one way you could do this is by autoloading function files from a folder in your fpath.

Let’s say you’re using ~/.local/share/zsh/site-functions for your custom functions. To ensure that folder is an early part of your fpath, put something like this within your .zshrc:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">typeset -U fpath=(~/.local/share/zsh/site-functions $fpath)
</span>

Then let’s say you want to override the uptime command. Add a file ~/.local/share/zsh/site-functions/uptime with content like:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">NO_COLOR=1 =uptime
</span>

Explanation for the second =:=’ expansion If a word begins with an unquoted =’ and the EQUALS option is set, the remainder of the word is taken as the name of a command. If a command ex‐ ists by that name, the word is replaced by the full pathname of the command.

The last thing you need to do is mark it for autoloading, in your .zshrc:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">autoload -Uz uptime
</span>

Instead of listing those functions manually as arguments, you could instead use a glob pattern to collect all those names, excluding any which begin with _ (completion functions):

<pre style="background-color:#ffffff;">
<span style="color:#323232;">autoload -Uz ~/.local/share/zsh/site-functions/[^_]*(:t)
</span>
TrivialBetaState , in Ubuntu trying to install snap AND Firefox even though I have removed them a year back

I moved to Debian and MX Linux because Ubuntu was deviating from the principles that are important to me. Can I ask why you prefer Firefox-ESR? It’s the first thing I remove when I install Debian! And why do you stick with Ubuntu if you don’t like snaps? Do you have any compatibility issues with other deb-based distros?

xavier666 OP ,

The reason is pretty much just laziness. This is actually my work laptop. I told management that I needed Linux. They only know about Ubuntu and their “monitoring” tools have only been tested on that platform. Thus I couldn’t use any other random distro.

I’m also a Firefox supporter (I use Chromium as backup since some company resources work better on that). I found out that the Firefox-ESR was still released as a deb and the installation is without a hassle. I just need stability and no the latest bells and whistles.

s_s , in Why do we need tiling window managers when we have tmux?

while having a full desktop environment for all other applications.

What if I don’t want that?

MoriGM , in which linux podcasts do you listen to?
@MoriGM@feddit.de avatar

For English, I can recommend:
Linux Action News
Linux Unplugged
The Linux Experiment
He has even an lemmy community feddit.de/…/[email protected]

German: TuxRadio

zShxck , in which linux podcasts do you listen to?

I listen to “Linux + Open source news”

aniki , in GNOME 45 Alpha Is Now Available for Public Testing

At first I hated the new Gnome but now that I took a deep dive into Extensions I now have my perfect little Mac clone with Arch.

redw0rm OP ,

Yep. I personally like the approach of having a pretty decent system by default and then install extensions for customizing it, rather than having a bloat load of options.

InFerNo , (edited )

I used to have a bunch of cool little extensions (and a few big ones, like dash to dock), but upgrading to a new version is always a removed. Plugins stop working and then a process starts where you’re looking for updates if or when they’ll be updated, if alternatives exists, etc. The system never feels the same to me.

jimmy90 ,

absolutely, i use Dash to Dock, Just Perfection, Hide Top Bar, Gesture Improvements, Awesome Tiles and Battery Indicator Icon to make it just how I want it

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines