#unix
1 messages · Page 64 of 1
I did not realize before 😅
hmm
can someone tell me why this happens:
according to google and stackoverflow, bash aliases can not have command line arguments
however
alias img='python3 /home/user/my_file.py "$@"'
works as an alias and copies all command line args
alias video='ffmpeg -i "$2" -vf scale=-1:"$1" "$3"' does not work
I know the function workaround, but I am asking why this happens
because aliases don't take arguments
the $@ version's probably also not working
i'm saying that the first one i posted works
all evidence i read suggests it should not
is it because it's calling python or something which can interpret command line args itself?
i thought they would still have to be passed through
when I echo them and && my actual command, nothing shows but the command works
so python can interpret the command line args.
that first one probably "works" because it'd behave the same way as it would if you removed the $@ part
let me confirm
you're correct
it does work
so i guess that solves that. no command lines args in aliases.
@gritty grail in here instead, which distro and version are you running?
I never never use aliases. Shell functions only.
i tried cropping the resolution of my 1 min 15 second video by deducting only 30 pixels in height at the top
the final video is also 1 min 15 seconds at close to full hd
yet the size is only 1.5 MB
from 20 to 1.5mb
is this normal
it plays well
Using ffmpeg
when you crop the video it will re-encode it so you'll get worse quality even if it would be encoded with the original settings, each round of re-encoding will do this
and with such a dramatic size difference I would guess you are either using another codec and/or encoding it in a lesser quantity
But it’s barely noticeable to my eyes
When I watch it
How such a big change in size
oh
@trail sapphire
yeah it was bitrate
from 2k to 163
is it possible to create a .app file for a CLI application on mac?
@real vapor was just replying to @digital prawn that was the one with the problem
Hi, I'm trying to add SSH in Ubuntu to my GitLab account, I generated a new one with the command
ssh-keygen -t rsa
and save it in the directory
/home/mohamedhamza/.ssh/gitlab_ssh
cat /home/mohamedhamza/.ssh/gitlab_ssh.pub
and added it to GitLab, but this doesn't work, I think this is because I'm not using the default location to save the SSH which is /home/mohamedhamza/.ssh/id_rsa
so, any help?
eval $(ssh-agent) then ssh-add /home/mohamedhamza/.ssh/gitlab_ssh
i.e., your suspicion is correct: ssh doesn't "know" that your key is there, so it's not offering it to gitlab
another idea is to put something like this into ~/.ssh/config:
Host gitlab
User mohamedhamza
Hostname gitlab.com
IdentityFile /home/mohamedhamza/.ssh/gitlab_ssh
then ensure your git remotes all refer to the host gitlab
already did all of this and facing the same problem and can't figure out what's wrong :((
try ssh -v git@gitlab.com
paste the output
both github and gitlab have pages for debugging ssh trouble:
Similar question there: Problem configuring Gitlab CI -> ssh: handshake failed Here is debug process for this situation. Verify you can logging to remote ssh server manually using same local user and same key file than gitlab-runner sudo su - USER eval ssh-agent -s ssh-add YOUR_SSH_KEY_FILE ssh REMOTEU_SER@REMOTE_SERVER You should solve an...
can't find any info that could help me to solve the problem, sorry I'm not an expert in OS at all
yes
so why not paste the output, so I can take a look? i might be able to figure out the problem
it's not related to your problem but i would recommend using ed25519 instead of rsa when generating your ssh key
Hey @dull vigil!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
gimme a minute
I'll, thx
shouldn't it be just ssh -v gitlab.com (so not to override whats configured) if @dull vigil has a matching host entry in ~/.ssh/config?
ok that succeeded -- Welcome to GitLab, @mohammedalihamza!
so if your actual git operations are failing, it's because they're somehow different than what you just typed on the command line
no, this is another account, there is another account with another SSH I'm working on
ok that's confusing
when you say "this doesn't work", what exactly are you doing, and what exactly are you seeing from your computer in response?
what was the exact command you ran when you got this output?
git clone git@gitlab.com:.......
Cloning into 'konan-backend'...
remote:
remote: ========================================================================
remote:
remote: ERROR: The project you were looking for could not be found or you don't have permission to view it.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
this is the project URL, I just made a ... to be for example
you still haven't told me exactly what you typed
I can't help if you don't give me the information I need
was it simply git clone git@gitlab.com:synapse-analytic?
solved, thank you appreciate that
wow, what was the problem?
i'm also interested in knowing what the problem was
Your mystery is intriguing to me, and I wish to subscribe to your newsletter.
In ~/.ssh/config file I set
Host test_gitlab.com
User git
Hostname gitlab.com
IdentityFile /home/mohamedhamza/.ssh/synapse_gitlab_ssh
PreferredAuthentications publickey
so when I was trying to fetch the project
git clone git@gitlab.com:HamzaSynapse/testproject.git
but in ~/.ssh/config the host is test_gitlab.com not gitlab.com
so I have to fetch it via
git clone git@test_gitlab.com:HamzaSynapse/testproject.git
I spend almost two days trying to solve it and my team lead solved it in 1 min 😅
yes, you must use the name of the "host" that you specify for the entry in the ~/.ssh/config file, not necessarily a real/existing hostname
and as you have User git in there you don't need to use git@test_gitlab.com, test_gitlab.com should be sufficient
yeah, thank you guys
if you have several accounts you can also model your ~/.ssh/config file like this:
Host *_gitlab.com
User git
Hostname gitlab.com
PreferredAuthentications publickey
Host synapse_gitlab.com
IdentityFile /home/mohamedhamza/.ssh/synapse_gitlab_ssh
Host neuron_gitlab.com
IdentityFile /home/mohamedhamza/.ssh/neuron_gitlab_ssh
```you can match many entries using wildcards, and if you want to override something you can do so in a later match as it just reads them all in order from the top down trying to match the different `Host` entries in the file to the "hostname" (which doesn't need to exist in reality other then in the configuration file) specified on the command line
why the underscore? 
any name can be used, but a underscore doesn't usually exist in real hostnames so it's a pretty good choice here i think
one could even just leave out the .com part in the Host entry name as long as it's there in the Hostname directive where we need a real hostname
nvm. I thought it was some wildcard that I didn't know. the actual hostname contains _
I do have an SSH config with dashes in the name
oh, underscore is just a literal character in the name and has no special meaning here (same with dash)
it's just the * asterisk that hold special meaning here and can match zero or more characters
you can also use ? to match exactly one [of any] character
but i think that is all the wildcards that can be used for a pattern for the Host label
I keep getting this error when I try to run my code and I'm not sure why as I have asyncpg installed and I've tried re-installing it to fix this error
2022-06-18T13:09:25: Traceback (most recent call last):
2022-06-18T13:09:25: File "/home/shared/main.py", line 12, in <module>
2022-06-18T13:09:25:
2022-06-18T13:09:25: from classes.bot import ModMail
2022-06-18T13:09:25:
2022-06-18T13:09:25: File "/home/shared/classes/bot.py", line 8, in <module>
2022-06-18T13:09:25: import asyncpg
2022-06-18T13:09:25: File "/usr/local/lib/python3.10/dist-packages/asyncpg/__init__.py", line 8, in <module>
2022-06-18T13:09:25: from .connection import connect, Connection # NOQA
2022-06-18T13:09:25: File "/usr/local/lib/python3.10/dist-packages/asyncpg/connection.py", line 19, in <module>
2022-06-18T13:09:25: from . import connect_utils
2022-06-18T13:09:25: File "/usr/local/lib/python3.10/dist-packages/asyncpg/connect_utils.py", line 28, in <module>
2022-06-18T13:09:25: from . import protocol
2022-06-18T13:09:25: File "/usr/local/lib/python3.10/dist-packages/asyncpg/protocol/__init__.py", line 8, in <module>
2022-06-18T13:09:25: from .protocol import Protocol, Record, NO_TIMEOUT # NOQA
2022-06-18T13:09:25: ImportError: /usr/local/lib/python3.10/dist-packages/asyncpg/protocol/protocol.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
2022-06-18T13:09:25: Traceback (most recent call last):
2022-06-18T13:09:25: File "/home/shared/main.py", line 12, in <module>
2022-06-18T13:09:25: from classes.bot import ModMail
2022-06-18T13:09:25: File "/home/shared/classes/bot.py", line 8, in <module>
2022-06-18T13:09:25: import asyncpg
2022-06-18T13:09:25: File "/usr/local/lib/python3.10/dist-packages/asyncpg/__init__.py", line 8, in <module>
2022-06-18T13:09:25: from .connection import connect, Connection # NOQA
2022-06-18T13:09:25: File "/usr/local/lib/python3.10/dist-packages/asyncpg/connection.py", line 19, in <module>
2022-06-18T13:09:25: from . import connect_utils
2022-06-18T13:09:25: File "/usr/local/lib/python3.10/dist-packages/asyncpg/connect_utils.py", line 28, in <module>
2022-06-18T13:09:25: from . import protocol
2022-06-18T13:09:25: File "/usr/local/lib/python3.10/dist-packages/asyncpg/protocol/__init__.py", line 8, in <module>
2022-06-18T13:09:25: from .protocol import Protocol, Record, NO_TIMEOUT # NOQA
2022-06-18T13:09:25: ImportError: /usr/local/lib/python3.10/dist-packages/asyncpg/protocol/protocol.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
which dist and version are you using?
what exact version of python and asyncpg do you have installed?
Ubuntu 22.04, Python 3.10.4 and asyncpg 0.21.0
Asyncpg is installed how exactly?
I have asyncpg in a requiremnts.txt file (The other packages in the file appear to work) and I did pip install -r requirements.txt and I also tried pip install -U -r requirements.txt
I did have one but it was throwing the same error (running pip list it appeared that the venv was dragging all of the global packages in as well) so I deleted it and now I'm just running it globally
pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10)
have you tried updating pip or building asyncpg from source?
you have stuff installed under /usr/local so you have used elevated priviliges to install it
do you have postgresql? @grizzled bay
nope neither of those, I've never built anything from source so I'm not sure how I would; does asyncpg provide a howto in their repo? and no I haven't tried updating pip, yes I have postgressql installed
the docs: https://magicstack.github.io/asyncpg/current/installation.html They have building instrcutions
But you also need postgresql for the tests and building to work
when they say cloned the repo with recurse-submodules wht do they mean? I'm not greatly familiar with git in command line
I think you can have one git repo "include" another, but by default, when you clone that top one, it doesn't also clone the included one
but if you ask it to include it, that's called 'with recuse-submodules'
thank you
try using pip to build and install the package for you by not using the available wheels
you do this by running pip install asyncpg --no-binary :all:
but you will need to have all the build dependencies installed on your system for that to work
Hey guys
Hey @wet folio!
You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.
Could someone help me with this issue as seen in the attached video? On the left is gnome-terminal and on the right is konsole, the colors you see in the terminal are ANSI colors codes with a space as character. The ANSI color code is set to the foreground, not the background. This means normally, the image is invisible since the characters are spaces. When you highlight them image, it inverts it so that you can see the background colors. The ANSI escape codes are 24 bit RGB codes, not codes within user defined color space. So why in konsole, is it behaving like this? It works as expected in gnome-terminal.
I cannot view the video but it looks like the right window simply has set an opacity value less than 100%
If that's the problem you're describing
hmm
so you didn't see the video? at all?
or just the thumbnail
in the video, i disable the transparency
to check that as well
I can see a thumbnail
ah
it shouldn't effect it based on the way it shows in the video anyway
some colors work
download the video
some just show grey
It might be the console window application does not support those colors
thats so strange.
it's just rgb
24-bit RGB ansi codes
it accepts some of them
clearly, why not all? lol
¯\_(ツ)_/¯
You can try any RGB value with \033[38;2;r;g;bm (the m is not a typo) where r;g;b are integers in range(256) if you know what I mean (\033[0m to reset)
Use 48 instead of 38 for background color mode I think
Roie
not quite sure what you mean try any value. and what you posted is accurate, and is how the program works
but it takes images as input
and converts them to the output
I don't know what the output is
output is what you see in the video in the terminal
the ANSI string
the input is an image
I can't view the video
It just doesn't load
I assumed you mean virtual terminal sequences for console colors
by the way
I should mention
you said use 48 instead of 38 for background
this is correct
and it works 100%
all colors show in konsole
in any image
as soon as the 48 is 38 foreground not background
only some colors work
and the rest are grey
You can try use background color codes and use a virtual terminal sequence to invert the color mode of the console
I don't remember its code
i think thats a windows thing?
the video will give more context, maybe you can view it locally and then delete it? but you will see what the use case and purpose is
it has to be foreground color
I'll open up my computer and try to
cool
In the meantime type or link the message where you explained what it does
this?
basically
takes an image as input
takes rgb pixel values
build an string with ANSI color codes using the same rgb values
sets the foreground instead of background
requiring you to highlight the image with your cursor to view it
otherwise it's invisible
which is the whole goal
having it invisible, and view when the cursor highlights
which works in gnome
not in konsole
I suspect it's a problem of adjusting to the buffer resolution
Meaning maybe you print to few or too many pixel values in a single line on konsole than you do on gnome
the output is identical on gnome and konsole
as in the ANSI string
not what it renders
Just to make sure, are you using os.get_terminal_size to adjust?
It tells how you how many rows and columns the console window currently has
no. The only thing I use os.get_terminal_size for is --autosize feature which isn't used in this video
there is no adjusting to size
the height is specified in the command
--height 35
in both terminals
Have you tried looking at konsole in different window sizes
The width of a line matters just as much as the height
when i say width I mean number of spaces, and height, number of spaces
the font only changes the size of the chars
so it would make smaller output
I just checked because some fonts on Command Prompt change the line and column widths in pixels
yes
that's what I mean by size of chars
the block is smaller
itself
not the gap
it makes no difference
Maybe your program optimizes out characters/pixels?
there's more than enough space
it does
--opt in the command
in both
create the SAME
optimization
which is what sets height*2
instead of --opt
its height=height
not height=height*2
i don't know what else you mean by optimize
that is my implementation
Try printing the line and column values of each character drawn
I mean maybe it skips certain pixels to print
Just to make sure each pixel is drawn sequentially
you got me thinking
so actually
i added a feature that
saves like 25-75% of ram and disk space if you store it
by eliminating repeating ansi codes
so it works like this:
if the next pixel to the right is the same color as the last pixel
dont write an ansi code just draw a space
since the ansi color is already set
but this should have no effect in konsole different than gnome
because i'm not resetting the color
Are you resetting the color still though
Or maybe konsole auto resets colors
weird
Maybe it's like a harsh setting
Have you tried writing a long line of characters starting the string with one color code
If they're the same
it made no difference keeping the ansi codes instead of having them account for repeating colors
not sure what you mean exactly
For example
print('\033[48;2;255;0;0m' + ' ' * 20 + '\033[0m')
Since this seems to be a static image shower thing, you can fill a buffer like this and print it
You can build up a string
it's one string printed.
with 38 not 48
foreground
background works 100%
foreground some colors work
the output is appended and printed at once
and also, it has gif and mp4 support. but that's not within scope of this issue
Oh so it really is just a problem of color support then?
i guess so.. it's weird
you'd expect that in konsole rgb foreground would have all colors like rgb background
I found the virtual terminal sequence for inverting foreground and background: \033[7m
There is a virtual terminal sequence to revert this operation other than \033[0m apparently, and it's \033[27m
i have a feeling results will be the same if its supported at all
will take a bit to implement this in the app, might give it a try though
docs.microsoft.com has this in their documentation page about virtual terminal sequences
do you know if this is widely supported by linux terminals or just windows console?
i'll test it
in a python term
As far as I know, from my own experience with my Command Prompt console and from websites documenting this online, virtual terminal sequences are not enabled by default
But that's just for Command Prompt. I haven't checked this on PowerShell
Virtual terminal sequences are supposed to be supported on Linux too
Here is a link to the page so you can read for yourself https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
so if we did something like:
print("\033[48;2;255;0;0m\033[38;2;0;255;0m \033[7m \033[27m \033[0m")
it works in konsole
but i still don't think it will solve the issue
one sec
yea it doesnt solve the issue
just using 48 and inverting it
Are you using this https://konsole.kde.org/changelog.html
Maybe they really are only starting to support colors
konsole --version
konsole 21.12.3
changelog not showing that
ohh
hold on
i got to scroll down
nah, still don't see it
Color support seems to be documented on the last entry in their changelog page so maybe it is still something that is worked on and not fully implemented yet
I think you're looking at the KDE section?
^
I'm looking at the page link I sent
Yee
I'm actually using i3 + konsole
not kde, not sure if thats applicable but also
my konsole version is 21+
so idk
also
I don't think color tabs is ANSI related
and those escape codes are not related
Ye I don't know
@untold socket
from time import sleep
min = 0
max = 255
selection = "48" # 38 for foreground
for r in range(min, max + 1):
for g in range(min, max + 1):
for b in range(min, max + 1):
print(f"\033[{selection};2;{r};{g};{b}m \033[0m", end="")
sleep(0.0000000001)
this generates every possible rgb color
all of them work in background
like half of them work in foreground when I hold my cursor and select it
blues and greens work, yellows dont show
so strange
Does anyone have an idea on why I can connect to my server when we're in the same LAN through SSH and IPv6, but it doesn't work when I turn on mobile data?
does your server have a public ip?
and are you using that IP address, and does your NAT setup allow the ssh port through
the address needs to be resolvable in order to be found. when you're connected to data, you're in a completely different network and your traffic needs to be routed, but it can only be routed if the route is known, which requires it to be a public ip. if not an ip of its own, then a tunneled or NAT'ed one, or something of the like
I get the IP with curl icanhazip.com from the server
It's a website that tells you your IPv6 address, which has to be public if they know it, right? SSH-ing into it on the same network works, but as soon as it's from a different network the connection instantly fails (It doesn't even try, the error comes instantly)
It's not a fe80 address.
The error is:
ssh: connect to host 2a00:---:e356 port 22: Network is unreachable
especially for this, some sort of port forwarding is needed. i'm not sure you'll be getting it to work
the ip you get is the one that your ISP translates to give you access to the internet from inside your private network, but it doesn't work in the opposite direction
I set up port forwarding in my router, from port 22 to port 22... I remember trying to get this to work a long time ago, but I just didn't work. We don't get a public IPv4 from our ISP, which is why I've been using a VPS, but they get quite expensive and I've got a few Rpis lying around.
having an ip be publicly visible on the internet is in general a paid service
weirdly in my experience if you're already paying for (say) an ec2 instance, the public IP is free
it's weird because I'd have thought the supply of public IP addresses was more constrained than the supply of ec2 instances
thanks to ipv6, not really
My server has a IPv6 address labeled "IP Address in the internet" in the router configuration page, but ssh-ing into it doesn't work at all.
I guess there's just some problems with ipv6 still. Hopefully they will work everywhere someday just like ipv4 addresses work now. It's really frustrating.
they both work more or less the same way
*should
your ISP is masking your IP somehow, making it impossible to be reached from the internet in general
if you can't ping your router from outside, nothing to do
no matter what settings you change on your router
Ok, thanks, at least I know that there is no stupid simple mistake from my side. I tried calling the ISP support, but they weren't really helpful lol
Thanks again
ISP support never is
you'd probably have to pay extra for that
Have you tried turning it off and on again - IT Crowd
there is, to the best of my knowledge, no free way to do this
even if you get an ipv6 ip of your own, which iirc were still free up til recently (might still be), you'd need some sort of server to do tunneling for you
They offer a static IPv4 for 10€ a month. No thanks, Digital Ocean VPS' are cheaper. Guess I'll just move back to my old ISP and suffer with 200mbits.
Oh, my condolences, I just got used to my Gigabit access so moving back is kinda hard. But that's a real zeroth-world-problem lol. I really shouldn't be complaining...
are you trying to troll the unix/linux people in here with the statement about windows? 😉
It’s always a good feeling when the first install works
and screenshoting tool doesn't?
on a VirtualBox? 😂
How to use linux in windows?I want to start with linux and i downloaded ubuntu virtual box and the linux iso file but it shows error while installing so any other way to use linux in windows?
you might be able to use "WSL"
but if you already have virtualbox and an ISO, you should just solve the problem
here's the docs for WSL https://docs.microsoft.com/en-us/windows/wsl/install
thanks
How do I set up a python virtual environment on Ubuntu 22.04? I know there's packages like pipenv and venv and I'm wondering if there's any others; If anyone is particular better than the other for ubuntu use
Gentoo is a bugger to install, haven't been bothered trying
i would say those two are good choices, pipenv don't have it's own virtual environment, it utilizes venv under the hood but gives you another interface to venv and pip and provides other features as well
and i can't imagine that the linux distribution you run would impact the choice here
After I complete my make.conf and ensure everything works on the vbox, i wanna try installing it on the physical machine itself >:)
To be fair, I don’t think gentoo is as hard as anyone who haven’t tried to install it makes it seem. Most of the docs are well written and there’s plenty of resources explaining every little bit
Granted im not using my own custom kernel (im using genkernel) I will get there eventually!
Okay thanks, that's all good to know. Guess I'll use one of those. venv is built into python right? So I might need to install Ubuntu 'drivers' but the underlying environment creation package won't need to be installed?
venv is a part of standard python, but if you use the python interpreter that comes with your linux distribution they may have split it out to a separate package anyways (ubuntu does this, just fired one up with docker to check)
you would need to install that package too if you don't already have it installed to have access to venv, the same goes for pip
Okay thanks for all the help 👍
guys i have a sad news...i mean i guess its a sad news
im going to start using haiku os
im no longer a unix/linux fanboy
damn
good continuation for u
got the below error
Traceback (most recent call last):
File "/home/sipl/PycharmProjects/pyScr/venv/ymlscr_1.py", line 27, in <module>
if 'dns' in data['network']['ethernets']:
TypeError: string indices must be integers```
can you add a print(data['network']) to see what you have in there?
thx for replying, but I sorted out the error
I have seen that many companies want their employees to have linux experience why is that...I have read that its fast and secured and updates are easily done in linux?? I dont get it windows also provide these facelities right? like security and updates,I read somewhere it was written that updates are easily done in linux what does that mean I mean in windows we just need to go to the settings and update whats so time consuming in that?Just to make it clear I want to know any practical examples from experiences on why linux is asked in jobs
linux drives most of the internet on the server side, connected devices and cloud services, that is why companies sees it as essential knowledge, also licensing is much simpler which is most important in ephemeral/dynamic environments like containers and other cloud computing many times are today
when it comes to updates, imagine that the same process updated almost all software installed on the server at the same time as it updates windows (not only a few othere microsoft components) and that the updates were also much much faster to install
Cloud apps mostly run on linux distros
Since everything's transitioning to the cloud these days I guess it makes sense to want employees to know at least how to navigate around directories, create files and stuff in linux.
It also really depends on the position
Sysadmin, devops, infra admins and such aklimust know linyx nowadays
Developers not sure
it's getting more and more common that all the developers are part of devops teams and are managing there own slice of the cloud deployments that there applications run on, within the confines that has been setup for them
Is there a way to require confirmation when using the redirect command in bash? > to prevent overwriting files in the case that you meant to append? currently can only find noclobber but that's not exactly what i want
i don't think you can do exactly what you want, noclobber is probably the closest you'll get
Need some help... This happened after I ran fsck on /dev/sda2
It's stuck on that screen rn... No further logs
Do you have a previous update to rollback to?
If not, you should be able to boot a live disk and fix the issue. Gnome display manager seems to be hanging but I couldn’t tell you why unless we see more logs
Network is failing too, but that shouldn’t be causing the display manager to be failing
Can you try and hop into another tty?
I can barely read the logs, it looks like systemd is shitting itself
i think that should work
what is your environment (bash on linux)?
how and from where are you sending SIGUSR1 to the script?
and is the script still running at that point or has it exited?
i don't know anything about SLURM and how things are being run by it
but if you were to do this in the shell and try to get it to work there i might be able to help with that at least
add the variables to the echo too, so that you'll know if they are accessible, like:
_copy() {
echo this runs with ${GAUSS_SCRDIR} and ${INPUT_DIR} >> message.output
cp -r "${GAUSS_SCRDIR}"/* "${INPUT_DIR}"
}
trap _copy SIGUSR1
```and don't forget the `""` around the variables in your commands when working with arguments to commands like that (or you'll have problems if anything contains space or other special characters)
so, have you had time to test it out yet and how is it turning out for you?
What's that supposed to mean?
you could use something called a "here document" which will make your script that generates the script a lot more readable and easier to edit
within a here document you only have to excape \, $ and ' with \ if you don't want the variable to be expanded by the script that generates the other file
here's an example (and __END_OF_SCRIPT__ is just a delimiter, could just as well be EOF or something else) that uses both expansion and not for different variables:
#!/usr/bin/bash
SLURM_FILE="slurm.sh"
PWD=$(pwd)
cat > "$SLURM_FILE" << __END_OF_SCRIPT__
# This is the script ${SLURM_FILE}
export INPUT_DIR="$PWD"
export GAUSS_SCRDIR=/mnt/storage_2/scratch/gaussian/\${SLURM_JOBID}
_copy() {
echo Safety copy — this runs with \$GAUSS_SCRDIR and \$INPUT_DIR >> "\${GAUSS_SCRDIR}/safety.message"
cp -r "\${GAUSS_SCRDIR}"/* "\${INPUT_DIR}"
}
trap _copy SIGUSR1
__END_OF_SCRIPT__
yeah, this was just a suggestion for improvement for how you generate the script, but you'll still need & and wait
Has anyone experienced this? Running a project in pycharm using the venv python interpreter and trying to activate my venv simultaneously in the terminal so i can run certain commands, however whenever i activate it it seems to break the terminal, any command i type in is not found and with every command i enter it also posts grep and sed not found
using git bash on windows
my guess is that the activate file is messed up
it's modifying PATH in a way that omits the directories you need, like /usr/bin and stuff
type echo $PATH to see what it is
here's what mine looks like learning-grosbeak% . ./venv/bin/activate (venv) learning-grosbeak% echo $PATH /home/ubuntu/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin (venv) learning-grosbeak%
I'm guessing yours is pretty different
Does Git Bash even have ls, grep and sed?
ye, it's pretty good
it will be quite different for you since your on windows even if you are running git bash in windows it will be quite far from a real unix or gnu environment
Idk if I'd suggest using git bash
it's the standard thing; visual studio code recommends it
It's been perfectly fine for java development
what would you suggest instead? just cmd/ps?
(venv) ~/Documents/python/Django/Website $ echo $PATH
bash: grep: command not found
bash: sed: command not found
wsl2 is just dumb slow to load though isn't it
Not really
After a reboot, the first load can take a few seconds
idk i used to use on previous pc and if it hadn't been opened recently it could easily take 10s to load
but it stays running in the background
ik a lot of people that have had issues with wsl tbh
this is the only issue i've ever had w git bash
I don't think I know anyone
maybe unlucky
That is a mess. There shouldn't be backslashes in there, I don't think
Well, they're Windows paths
I would think it's a git bash thing
that's WIndows
that looks like WSL, though
might give wsl2 another try
oh, you're right; it is
Anyways, I've heard of fewer people having issues with WSL than git bash
and I feel like more people use WSL than git bash (here, I mean)
I guess it's a small sample size, but I know 3 people personally that had wsl issues and none w git bash, though it is likely more simple than wsl
nice username and hostname
What were their issues?
I don't remember tbh, I didn't really probe as I didn't anything about it at the time
Well, I think it's worth a shot anyways. Pretty easy to install, now
I wouldn't try to use windows python with git bash; the activate script probably isn't doing the right thing
just like wsl --install -d Ubuntu
meeeee@mememeeeeee MINGW32 ~
$ py -3 -m venv venv
meeeee@mememeeeeee MINGW32 ~
$ . venv/Scripts/activate
(venv)
meeeee@mememeeeeee MINGW32 ~
$ echo $PATH
C:\Users\meeeee\venv/Scripts:/c/Users/meeeee/bin:/mingw32/bin:/usr/local/bin:/usr/bin:/bin:/mingw32/bin:/usr/bin:/c/Users/meeeee/bin:/c/Python310/Scripts:/c/Python310:/c/Program Files/Parallels/Parallels Tools/Applications:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/ProgramData/chocolatey/bin:/c/Program Files/PowerShell/7:/cmd:/c/Users/meeeee/AppData/Local/Microsoft/WindowsApps:/c/Users/meeeee/AppData/Local/Programs/Microsoft VS Code/bin:/usr/bin/vendor_perl:/usr/bin/core_perl
(venv)
meeeee@mememeeeeee MINGW32 ~
$
that's git bash this time 🙂
Yeah it'd be nicer to have wsl it definitely has some advantages
yeah that's messed up somehow. You should have mostly forward slashes in there
😄
Exactly lol, you can get this with any init system
Idk if the guy fixed the problem, but could always just reinstall from a live image but make a backup and copy to another storage or something
Just gotta mount the drive and you’re good
guys, any idea why i can't install wine32 ?
libwine:i386 : Depends: libvkd3d1:i386 (>= 1.2) but it is not going to be installed
I googled it for you: https://askubuntu.com/questions/1275983/unable-to-install-wine32-due-to-broken-packages
gecko linux + python = win win
arch linux >
arch is cool and all but gecko is perfect for both newbie and advanced users
I hope by "gecko" you mean openSUSE \😩
Oh, what the heck... "gecko linux" is a thing
and it's based on openSUSE
oh, it actually looks incredibly useless .-. it's literally just openSUSE but with some stuff pre-installed
well, if it brings what you want 😛
in that sense, all distros are useless. you could just hand-pick what you want to sit on top of the linux kernel yourself
Well, I mean compared to openSUSE
I'm not exaggerating when I say it's literally just a few packages
which is simple stuff like a NVIDIA driver, packman... and that's all I can honestly remember from what I've read
i'd say nvidia drivers and a different package manager are already pretty good things
packman isn't a package manager
not to be confused with pacman
ah, i thought you meant pacman and miswrote it, that was my bad
and the NVIDIA drivers on openSUSE are as simple as sudo zypper in nvidia-glG06
ah, it's a repo
yeah maybe not that good a deal then
but you also have to add in the nvidia repo first, don't you?
Not on openSUSE, no
i see. i haven't used it in a long time, i'm out of touch
Well, maybe I lied actually
It's been a while since I installed NVIDIA drivers that way
For some reason those drivers are usually borked so you have to install manually via the .run
it's not that much of a process regardless, especially with YaST
yeah, my experience is that there's usually some reason or another that makes nvidia drivers at least not immediate on most package managers. i would say if one is just starting out, that could be something useful to have taken care of for you
like with pop os (though that one brings a bunch of other stuff too)
Well, Pop!_OS has definitely lost its charm
With Ubuntu, you can have the drivers installed if you pick the option during the installer
so really if you use Pop!_OS, you're probably picking it because of the DE
hmm yeah, that's true. i forgot 22.04 gives that option
Even 20.04 did
oh, that i didn't know at all
Idk if the name of the option has changed recently, but it was something like "Install additional software"
which was the option for proprietary software
aha, yeah, i didn't know that included nvidia drivers
nah openSuse is bad
what
i kinda like gecko having minimalism look and feel
like it has vlc and firefox installed out of the box and not some weird video player
Firefox is installed by default on openSUSE
also no games preinstalled 
You get to choose which packages are installed during openSUSE' install process
if you don't want the games, uncheck the games pattern
wait for real?
Yes
damn
That's one of my favorite features of openSUSE
how come installers dont have that
No clue
arch also has that option but im not really a fan of rolling release lol
I like rolling release in the way that openSUSE does it with openSUSE Tumbleweed
No, it's pretty different
Updates are rolled out in the form of snapshots
That way, if something breaks, you can just rollback to a previous snapshot
It's not like Arch where everything is updated instantly
you have to wait for a snapshot to be released
I've had a lot more stable of an experience on openSUSE Tumbleweed compared to Arch
I'm not totally sure, honestly, I've never used timeshift
same lmao
but its kinda painful to have snapshots like they take a huge amount of space
it's a bit hard to explain, I've never even had to use them
but they're not those kinds of snapshots
never tried arch but I know I have never had any issues with Void which I am using and is rolling
What is it about Void that compels you to keep using it?
It's bare bones and has a very large repository that is frequently updated
the xbps package manager is so nice too
I assume by "depository" you mean "repository"
yeah mb
but also Void is notorious for supporting significantly less packages than other distros
is it?
I guess that's just what I hear from the Void dissenters
the only package I have struggled to get which was recently added was libgccjit which is a very obscure package because really the only people using are native comp emacs uses which is a minor group of emacs uses who alone are a minor group of programmers
We don't have it just quite as good as the AUR but in terms of other distros it's very good
I'm not sure, I just never thought of Void as really having anything going for it
For the most part, I only ever see people using Void because they have a strong dislike towards systemd
usually completely unfounded in that regard, though
If you're looking for a barebones distro it sits between Gentoo and Arch
I'm not sure I agree with "barebones," though
why?
For the most part, it ends up being people obsessing over disk space that would hardly affect them otherwise
I would understand caring about like CPU and RAM usage
but that's pretty consistent across distros, mainly because it's the DE that becomes hungry for those
but when you can use any WM on any distro, does "barebones" really mean as much as you think it does?
I prefer a tiling window manager because it's more ergonomic
because to me it's usually just a psychological thing, not a practical thing
you're right tbh
if I were to be using the gnome image this would be a different conversation
I used to fall into the whole minimalism religion, but I guess I've since discovered that I really don't need to care about it
I suppose it's kind of a rabbit hole at first
You want to see how far you can push it once you kind of move away from like Windows and macOS
imo gentoo is just way too far
and I don't think anyone can really disagree
there is no need to build everything from source
but IMO Gentoo at least has something you can't beat for those who know what they're looking for
like with Gentoo, it at least deserves some respect in my book
Installing Gentoo does sound like an adventure and a half
It's definitely not everyone's cup of tea but at least it's good at what it does
I have too many headaches right now like setting up this tcp server in clojure
I've felt that way about a lot of things
I cannot be an enthusiast, I don't like putting too much thought in what I'm using
I am a rust and emacs cultist enthusiast
Maybe I'm just depressed \🤔 I can't really be enthusiastic about anything, huh
anyways, this is why I happen to like openSUSE \😩 I don't need to put in much effort to have a system that I can trust won't break spontaneously
Even something as simple as being able to pick my packages during install
love that, need more of that everywhere
some people just want a distro that's ready to go so they can get to work, and don't want to fiddle with things, and that's perfectly fine
suse, rhel, ubuntu, whichever
You can install gentoo without needing the gentoo live ISO meaning you can load up your favorite distro and install gentoo through a GUI. It also make’s typing commands easier because you can simply copy and paste what you need specifically
So things like WiFi can be setup easier if you’re installing on physical hardware
That’s supposed to be one of the better ways of installing (which I’ve never tried) but it makes sense. You can even easily download the tarball without having to use links / lynx as well
I use arch btw
you might want to read the topic of the channel
Tooling, setup and configuration related to Python development on unix or unix-like systems such as Linux or MacOS.
Is there a channel like that for windows as well? Would make sense as Windows is a top platform according to PSF survey
you can ask about windows stuff in any channel
this one is for more nitty gritty stuff, but you can also ask about linux stuff in other channels. i guess what you said is the reason itself, many people are already working on windows by default, so it doesn't need a dedicated space
i think many of the problem areas when working with python on windows is many times related to and solved in #editors-ides
but i might be wrong and maybe it's just my inexperience with working on windows as a development platform for python
It's mostly PATH stuff lol
yeah, mostly, but i'm also very used to be able to run pyenv without a problem for my environments, that can be a bit more challenging to get running on windows (there is such a project, but...) 😄
depends on if you require windows specific APIs in your code
you might be developing some python code that is specific to the native windows python interpreter
then you can't go with WSL as far as i know
Hello!
Please, is it okay to share a project here?
Why not?
what’s unix
tbf this channel would be better named "#unix-like"
are you just writing something in all the channels to get voice verified?
They've already met that requirement
what
i can get voice verified that way?
i don’t even want it
You need like 50 messages, which you're already way past
Hello!
I've just released a new version of term-image. It's a Python package including a library, a CLI and a TUI for displaying and viewing/browsing images within a terminal.
It currently supports a whole lot of features including:
- Extensive API
- Kitty graphics support
- iTerm2 inline image support
- Support for PIL images, file paths, URLS
- Animations (even transparent ones)
- Browsing image directories recursively
- Automatic terminal support detection
Displaying an image can be as simple as
from term_image.image import from_file
image = from_file("path/to/image")
image.draw()
# OR
print(image)
with python, or
$ term-image path/to/image
from a shell, and as extensive as possible...
Links:
The project is open to contributions and I welcome everyone with knowledge and/or experience that could benefit the project.
Thank you very much!
Does it support path-like objects? Well, I suppose you could use pathlib and call str on the path object yourself as a user
It's one of the planned features but like you said, str(obj) will work for now :).
I know implementing this is actually trivial but if I think like that about every other trivial feature, I'll end up not releasing any version of the project till everything is done :)
is there some strong boy from debian?
Wow, this is some shit
I can't figure out if this is a compliment or an insult
Hey, it works pretty well...
Thanks for the compliment 😂 😇
Hello! Anyone willing to help with building python from source?
although one image didn't display a previre but displayed fine in the terminal
It was very tall
Also maybe could you make it so if they're aren't any images it reverts to a directory list?
Do you have python tarball?
i'm using the 3.10 branch from github
should i use tarball instead?
Linux darmok 4.15.0-180-generic #189-Ubuntu SMP Wed May 18 14:13:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Probably use the tarball
I'd suggest using pyenv
Makes the whole process so much easier
Once you have pyenv installed, you just pyenv install 3.10.5; pyenv global 3.10.5, for example
can i use pyenv without root access?
Yes
I think so, actually
🤔 ... I don't think I understand what you mean here.
Well... that would be a file browser then 🤔 🤷♂️
To be clear... you mean in the TUI, right?
very much so, if you use it as root you can even mess up your own shell pretty bad if your not very careful
so i always suggest people always use it as another user then root
OpenSSL doesn't seem to be installed on the computer
Yes
since I don't have root, I'm thinking I have to
- Compile OpenSSL from source
- install it into some alternate directory
- ???
- Install python
that is an odd one, most distros has it unless they are super lean and use something else
you don't have root access on the system so you can't use the package manager to install it?
because you're not allowed to do sudo -i or su -?
^ yup
I see. Well... I'll sincerely like to keep it strictly images. 🙂
that's too bad, otherwise you could simply have installed the packages you need for building
i think you might get problems if the system don't have the required packages installed on the system to build python and no way to install them
i think your best bet would be to setup a system with the same version of ubuntu and install all the required packages there and build it all there as well and then just transfer the files (including dependencies) over to the other constrained system, but it will not be a walk in the park
pain
yeah, you're in quite a pinch if you need to use that system and can't use something else instead
If you have physical access to computer you can gain root easily. Reboot and when grub menu appears click e then add init=/bin/sh to kernel parameters and press f10 and it will drop you to root shell
uhhhhhhhhhh thanks for the tip but I don't have physical access LOL and I'd rather not get expelled from my university
and you can't ask for some packages to be installed on the system that you're working on?
i could but it usually takes them days/weeks to respond
i got it through pyenv actually
but now i have a separate issue that doesn't seem related
oh, the system had enough packages installed to be able to build python for you?
yeah it did
Can you where python?
i had to build openssl manually
i created a virtualenv with the pyenv binary
ouch, but good that you got through it
(venv) bcj@darmok:/scratch/cluster/bcj/poke$ which python
/scratch/cluster/bcj/poke/venv/bin/python
I see
i just needed to upgrade setuptools
we chilling
thx for all the help through these troubled times ❤️
nice, happy to hear that you're on track again 🙂
help needed with general linux question (not python related). I'm setting up an SFTP server and want to create a /ftp folder where files will be uploaded to. All that is OK. I want to create a user that can only use a subfolder . I think I have done the chgrp and chmods properly but the user keeps getting an error when logging in that they can't cd to the proper directory
any ideas what's wrong ?
ah got it ..... chmod settings were wrong
you would run something like: find . -name '*.log' -size -10k -exec sha256sum {} \; 2>/dev/null
the first . in there is the current directory, you can set it to /var/log or what ever you want instead
the - in -10k means less then and k is KB for the arguments to the -size option
sha256sum can be any command you want (just be careful) and {} means the name of the current file and the \; is absolutely necessary to tell -exec that the end of the command has been reached
and finally 2>/dev/null suppresses any error messages from find and the command find runs with -exec for the matching files
Hi guys, facing problem with GDB:) So I did GDB using below command gdb ./combined/afl-image/afl-fuzz And the code I am trying to check its under ./combined dir . So, once I went gdb mode using first command I typed break ../Program.cpp:Program:deserialize(some args) but after that I can not do anything using some command line info line 200 or print, trace etc or other command from gdb doc, any suggestion how to read specific line
(gdb) run
Starting program: /home/combined/afl-image-syscall/afl-fuzz
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Inferior 1 (process 48280) exited with code 01]
(gdb) break ../Program.cpp:Program::deserialize(unsigned char*, unsigned int)
Breakpoint 1 at 0x55555557ccd6: file ../Program.cpp, line 172.
(gdb) info line 254
Line 254 of "afl-fuzz.c" is at address 0x55555555f2b4 <main+6788> but contains no code.
(gdb)
It can not give any info of Program.cpp code
install discord-installer or discord-canary-installer
oh, through opi
sudo zypper in opi
then opi discord-canary-installer
what the
hmm if I had to guess... it's because you're on leap
well
I assume you're on Leap
I guess whoever made that package doesn't support 15.4
oh yep
I guess you could try
zypper addrepo https://download.opensuse.org/repositories/home:simonizor:discord/openSUSE_Leap_15.2/home:simonizor:discord.repo
zypper refresh
zypper install discord-canary-installer
some of those you'll need sudo
I dunno which, I just know the last one for sure
Neat
Anyways, if you've ever heard of the AUR, this is our "equivalent": https://software.opensuse.org/
#! /bin/python3
import os
glob = globals()
glob["echo"] = lambda *args: os.system(" ".join(("echo",)+args))
glob["clear"] = lambda *args: os.system(" ".join(("clear",)+args))
glob["touch"] = lambda *args: os.system(" ".join(("touch",)+args))
glob["rm"] = lambda *args: os.system(" ".join(("rm",)+args))
touch("testfile")
echo("test", ">", "testfile")
file = open("testfile")
print(file.read())
rm("testfile")
bash in python
the scripts output is "test"
which is what was echoed into the file :D
then the file is removed
so that it doesnt clutter up whatever directory you're in
lol I'd just use iPython for that
also what you're doing with glob and what-not, you might prefer to just use a partial from functools
actually I lied... You do fancy stuff with + args
right... one second, let's find out
uhh... I kinda hate how os.system() works
i dont remember why i picked this one over the other way lol
now that I think about it
looking back on it, the `"echo "+str.join is better
do tell?
this whole "only one arg with words split into a sequence >:("
yeah thats a bit dumb
I'm on Windows, but
In [1]: dir_ = !dir
In [2]: !echo "Meow, world!"
"Meow, world!"
imagine dir is ls
dir is also a command lmao
it does basically the same thing as ls but the default formatting options are slightly different
lol
anyways, your glob thing is useless regardless
glob["echo"] = would just do the same as echo = , no?
except more expensive
or... I'd think more expensive
yeah its more expensive
i was originally doing it because i wasnt in the global namespace
so it would put it in the function namespace, then remove it when the stack frame got deleted
i wanted it to be global
but then i decided to play around with it, and i largely just pasted in my previous code lol
but yeah, you're right
glob[] is more expensive
and unnecessary
I honestly don't like touching the shell at all from within Python
feels so... dirty
i was doing it bc i wanted to invoke gcc from python
then i got distracted and started playing around wiht it
*with
hu
I feel like with something like gcc, you'd want your main "thing" to be a shell script
like check the exit code of the script or something and do something based on that
but that's just me \😩
the reason i didnt use a shell script is for speed
shell scripts tend to be much slower than python
and bc im writing a relatively large/expensive thing, shell script was too slow
but then again... you're having to use os.system()
which I think would come with a bit of overhead compared to running a script directly
in my actual project, only to invoke gcc
everything else was done with python
oh, I see
I guess I just wish Python felt more like it was meant to do that kind of stuff
the geniuses in #esoteric-python once did something that made it so that you could call functions like this, iirc:
fn arg1, arg2, etc
it was a while ago, but if i could find that, i could make bash in python lmao
or at least, make it much more natural to use
I can imagine something like cmd: arg1, arg2, arg3 being possible
but I dunno about anything else
eh, maybe not that
Well, you could cmd: "arg1 arg2 arg3"
yeah it was smthn like that
yeah it might be that
my memory is bad lol
Cursed; whatever it is
this lovely script by someone called apple does that
@type.__call__
class __annotations__(dict):
def __setitem__(self, item, value):
print(value)
print: 989
print: "foobar"
print: 3*8-9
though looking at it, i think it only works with print
bc print(value)
but you could mess with that and get it to work with whatever function you use it with i think
Please anyone know how to enable zoom pinch in Ubuntu?
Hi im using linux mint 20.3 and I have the 5.15.0 kernel version, a ryzen 9 5900x and a rtx 3050ti laptop version
The brightness adjustion is quite buggy and Idk why, the screen keeps getting brighter till 62% from there on its just stuck and doesent get brighter anymore
If anybody could help, that would be great
It works perfectly, thanks!
Can you run this command on windows?
What NVIDIA driver version did you have?
Hello, I need help with something related to time.
>>> log_time = datetime.datetime.now().strftime("%d/%m/%Y %H:%M:%S")
>>> 2022-07-02 21:34:41
>>> log_time = datetime.datetime.now()
>>> log_time.strftime("%d/%m/%Y %H:%M:%S")
>>> 2022-07-02 21:34:41.061181
Why is there this difference?
I don't know where that output is coming from
how did the 2022-07-02 21:34:41 get there?
did you type it?
here's what I see
>>> log_time = datetime.datetime.now().strftime("%d/%m/%Y %H:%M:%S")
>>> log_time = datetime.datetime.now()
>>> log_time.strftime("%d/%m/%Y %H:%M:%S")
'02/07/2022 15:59:24'
@next abyss ^^
In [1]: from datetime import datetime
In [2]: datetime.now().strftime("%d/%m/%Y %H:%M:%S")
Out[2]: '02/07/2022 11:29:31'
In [3]: t = datetime.now()
In [4]: t.strftime("%d/%m/%Y %H:%M:%S")
Out[4]: '02/07/2022 11:29:48'
No difference for me \🤔 (other than the time itself, naturally)
I'm trying to install python on ubuntu, but I can't manage to do so... I uninstalled python 2.7 and installed 3.10 using apt but it just says
catow@catow-H470-HD3:~$ python --version
bash: /usr/bin/python: No such file or directory```
python3, not python
also where did you get Python 2.7?
builtin I guess
shouldn't have done that, then
you should post a complete transcript of all the commands you ran
try python3.10
yeah I know that works
but where did 3.8.10 come from
Preinstalled, likely as a dependency for some package or internal script
most likely
same with 2.7
You probably shouldn't have removed it, since it came with your installation
I've installed the OS a long time ago, not properly either. I will reinstall everything soon when it bothers me enough with too many issues, but right now it's a bit chill
yes I figured that out after removing it lol
good to know for next
You probably want to use something like pyenv, to keep the preinstalled versions of Python intact and usable by the system
oh
I just meant "all the commands you ran where you were trying to remove or install python"
sending
Once you've got pyenv installed and setup, all you do is pyenv install 3.10.5; pyenv global 3.10.5
sudo apt install python3.10
sudo apt remove python2.7 (sorry lol)
python -V will be 3.10.5, python3 -V will be 3.10.5, python 3.10 -V will be 3.10.5
those seem sane
same for pip, pip3, etc
not my favor here
When working with Python on *NIX, I will forever praise pyenv
so yeah pyenv will do well
Well, that's if you install with pyenv and set as global
yeah yeah now installing
You may want to reinstall 2.7
but also it sounds like maybe you're running an older version of Ubuntu
I'll switch back to arch
Why not?
I was just lazy one day and decided to install ubuntu
there are too many things I wanna change and too many things I don't want
Beyond the DE, I don't know if I see what you could be talking about
because I once had arch but then decided to try ubuntu again
unrelated to python now, I just don't like ubuntu because there are many things that I need to change or don't need, which I can just directly get on arch and not bother about what I don't need
That must've been years ago
a year ago
Ubuntu hasn't shipped with 2.7 in a while
You would've been using something like 20.04, no?
yes
I don't think 20.04 came with 2.7
lemme clarify the version I have wait
but also 20.04 is about two years old now
yep 20.04
I'll remove ubuntu in a few days
I'll get a new piece of SSD that I've been wanting to get for quite a while
and then install arch
which is really odd, I bet I installed something that it went along with
without noticing
tbh, I'd say it's worth trying out a 22.04 flavor
yeah alright I'll give that a shot
and if that doesn't go well with me I'll switch back to arch
I might suggest Kubuntu or KDE neon
Kubuntu and KDE neon are both distributions that come with KDE Plasma instead of the GNOME like on Vanilla Ubuntu
KDE neon and Kubuntu are very similar except KDE neon is from KDE themselves and comes with the latest versions of KDE Plasma
I mean on arch I use xfce but like with ubuntu I find KDE more similar rather than kubuntu
Ubuntu flavours are different installations of Ubuntu - each with a choice of packages and applications included by default. Here you are able to choose and download the officially recognised flavour that would best suit your particular industry and unique needs.
oh alright
thank you very much
Ubuntu itself is alright but not a fan of Canonical so I stay away from Ubuntu
Arch and Debian
that's far better imo
debatable, honestly
I tried arch and debian but I stayed with debian only for a little
I'd never use Debian for a desktop
arch was so much lighter and faster but I mean that's just probably because I installed some things poorly when I installed debian
I understand and can justify its use in servers, but not so much a daily driver
yeah I uninstalled debian after a day 😅
Arch... I just don't like kind of altogether
I mean I still liked it, better than ubuntu imo
maybe the only thing I actually like about Arch is that it's a rolling release
but in my opinion, openSUSE Tumbleweed just does everything better
might be right yeah
Canonical has made some poor choices like sending some user data to Amazon and also showing ads.
So I have a sour taste in my mouth
As soon as I read "poor choices", I knew what the rest of the sentence was lol
but also wasn't that like 6 years ago
Yeah. maybe I am being petty but when there are so many other choices for distros I can afford to be so
I've basically landed on two distributions
Ubuntu and openSUSE
and honestly I don't see myself ever seeing much of a benefit in anything else
I think I just fell for arch the first time I met linux distros I really have no idea why
I think it's because I saw it as a challenge
"to install something that's considered to be advanced"
I don't think I like how popular Arch is
and it got stuck in my head
there are many reasons though
I find it justified
I don't think I'll ever see it as justified
what'd you think would be a better replacement then?
I feel like beyond the annoying installation process, there isn't terribly much to like about it
I feel like openSUSE Tumbleweed is quite underrated
that's the whole idea, the customization
I like rolling release and AUR 🤷♂️
Just wait until you see TWs rolling release and the OBS
Much better in both regards, in my opinion
👆
In the year that I used Arch, I've had so many things break just from casual use
Eventually I got tired of fixing the most random stuff, so I switched off of it and found openSUSE Tumbleweed
but OBS is a screen recording and streaming software 
I know lol
I can relate to that in a week of usage
Okay I have no loyalty to Arch. Maybe I will check it out. But when something is established, and I don't have any major grievances, I can't really justify the effort to switch.
I felt the same until I got fed up with Arch lol
yeah well I'm honestly just used to windows so much that I have a hard time getting to know linux, which is why I picked arch in the first place
I mean that kind of happened a lot for me
but openSUSE has a lot of benefits
One of my favorite being the YaST installer
during the final step, you can choose what software is automatically installed
You get to look through all of the patterns and only install what you want
It's fantastic
and that option will exist post-install in YaST
You can look at all the patterns and choose software to install in a GUI
An example of a pattern which might be appealing to you is the "Python development" pattern
Yeah I mostly use Debian for servers or when I need to set up a quick VM.
Go-to choice for something stable that's pretty much it
but I feel like openSUSE doesn't get as much love as it should
and I will preach that until I die
plus the community is amazing
I don't think I could say the same for Arch, honestly
Arch's discord server community are fucking insanely nice
We must share different experiences
sorry if I'm not allowed to swear but about 5 people there all together helped me install arch for the first time while explaining literally every bit to me and teaching me so much
they stayed with me on the chat for 6 hours
they helped me 6 hours straight without a break
yeah experiences differ
I don't believe it's fair to make generalisations. There are good and bad people in every community. You just need to find the good guys.
ymmv
they said it was a rare occasion and the support I received was a 1 in a million
they just felt like helping that moment
absolutely right
idk, always been harder for me to find an Arch community that wasn't so uh... elitist
Well you're talking with two Arch users and neither of us came off as elitist I'd like to think. So we do exist :D
yeah
but I am by any means not good enough to assist with anything that is arch related
well I got to go, it was a really fun chat and I learned quite a lot
I'll look through many new particular options I've been suggested here when I uninstall ubuntu
including new ubuntu flavors
gentoo communities are better
Feeling nutty rn
may i ask why? as far as ik there is nothing special about it. It is very similar in feature set to RHEL while having smaller support both community wise since it is less popular and enterprise wise since redhat is bigger company than suse. in addition to that at least from my experience they zypper is slower than dnf(this might be related to my location tho) and YAST the suposedly main selling point have awful interface in TUI mode(you need to constantly spam tab) + it is slow(loading? times). Why would someone use it over RHEL/CENTOS/Rocky or other clones?
i would have added "for servers and Fedora for desktop" or similar, close to the end of your message 🙂
while fedora is quite good distro which makes good use of things like zram, thermald and pipewire however i personaly would't use it for desktop since wayland on nvidia is pain and i would't trust BTRFS with my data(multi disk is still considered experimental) also they are pushing flatpak imo awful technology which is compleatly unusable on my 11 year old thinkpad(secondary computer). Also since fedora relies on systemd boot times are awful compared to something like runit while they do not nessecarly matter on servers and desktops they do on laptops since hibernation in linux cannot described as working(tbh it is't used by any OS anymore) and "sleep mode" uses a lot of power while being idle turning off laptop is the only way to conserve battery and well waiting 30s while you want to check something fast is't ideal.
did you mean "suspend" instead of "sleep"?
also, have you tried "hybrid sleep"?
flatpak is kind of like snap and i don't care for any of them, but you don't need to use them either
@wispy ingot what exactly are you trying to protect your VPS from?
unless you're rich, I imagine the biggest threat is script kiddies; in which case, what you've already done should be fine
I've run a couple of EC2 hosts for years with nothing fancier than that, and (as far as I know! 🙂 ) have never been hacked
oh cool, I see. Nope, I was just planning on making my Discord bot public and I'd just like to ensure I begin the right way - prevent any skid from getting into my VPS later down the road.
I wouldn't stress over it; ssh is good and linux is good; you sound like you know what you're doing
hey guys I have a question
how can I change filenames
with regex
I want to change log1.txt to mylog1-file.txt
with linux ofc
use mmv if you have it or can install it
it's not really regex, but maybe enough for what you want to do
How ppl usually remap keys for MacOS? Caps to ctr on long press, caps to esc on short press. Anything else?
I'm having a problem with this:
bash: /home/vi/.bashrc: line 147: syntax error near unexpected token `(' bash: /home/vi/.bashrc: line 147: `export DISPLAY=\$(grep nameserver /etc/resolv.conf | awk '{print \$2; exit}'):0'Can I borrow a fresh pair of eyes?
My guess would be because of \$
I don't need the dollars?
Sure, but why would you need \?
I'm going by these instructions.
echo "export LIBGL_ALWAYS_INDIRECT=1" >> ~/.bashrc```
this was copied exactly, so that's why I have the \
ah, I think I see
in your .bashrc, remove those backslashes
the purpose of them is to prevent the $() and $2 from being evaluated
like when you run the echo, I mean
but they're not intended to be in your .bashrc
export DISPLAY=$(grep nameserver /etc/resolv.conf | awk '{print $2; exit}'):0
so this should work?
If I had to guess, yes
just a sec
well, bash starts without an error now. i had hoped that removing the error would allow fsleyes to work but it's still saying it's unable to access X Display
echo $DISPLAY, see what it says
I hate networking tho it always feels hard to me but it's usually just my anxiety
windows 10
So then that might be why
"Unable to access the X Display" is presumably because you don't have WSLg
the steps i'm following are for WSL 2
Pretty sure, anyways