#unix
1 messages Β· Page 11 of 1
having a right attitude with seeing you giving a try doing it on your own first, i could bet u could get a help over there
https://github.com/mhxion/awesome-discord-communities?tab=readme-ov-file#assembly
Where/what are you studying? In my day π΄ we did the "computer organisation and design" book which is using MIPS assembly
We just did micro code on some made up system, suddenly I'm developing a custom cpu. So much fun! βΊοΈ
To be fair my degree was more electronics/signal processing etc. not Computer Science, so we didn't go too deep into processors and machine language etc. It was years and years ago, and I "pivoted" to scripting languages a few years after it.
if ! AIRFLOW_ENV="$( airflow config get-value core airflow_env )"; then
fail "Failed to retrieve Airflow config option 'core.airflow_env'."
elif [ -z "$AIRFLOW_ENV" ]; then
fail "Airflow config option 'core.airflow_env' is empty or unset."
fi
is this too terse? i liked it better than the usual approach of:
AIRFLOW_ENV="$( airflow config get-value core airflow_env )"
if [ $? -ne 0 ]; then
fail "Failed to retrieve Airflow config option 'core.airflow_env'."
fi
if [ -z "$AIRFLOW_ENV" ]; then
fail "Airflow config option 'core.airflow_env' is empty or unset."
fi
i felt like the condensed version is less noisy and easier to read
Oddly I do like the condensed version. Usually I prefer the explicit
Second here
I usually set variables from commands with backticks
MY_VAR=`command -arg`
thanks, i needed a second opinion
i never use backticks, in large part because they're considered bad by people with historical knowledge, so i adopted that
i'm not exactly sure why they are considered bad, other than not being arbitrarily nestable, but that's arguably a benefit
iirc it was an older syntax for $()
ah, although the obvious benefit with $() is the ability to nest them
this answer confirms my theory:
https://stackoverflow.com/a/33301370/12041035
The backticks (
...) is the legacy syntax required by only the very oldest of non-POSIX-compatible bourne-shells and $(...) is POSIX and more preferred for several reasons
yup, that was always my understanding as well
but it still works and does look tidier depending on your taste
It solves a problem of inconsistent behavior when using backquotes:
ah, that's the one. i knew there was some technical reason
huh. I've written a lot of shell, and I didn't realize you could check the exit status of a command while also assigning to a variable
that behavior is required by POSIX, though:
If there is no command name, but the command contained a command substitution, the command shall complete with the exit status of the last command substitution performed. Otherwise, the command shall complete with a zero exit status.
I had no idea that sh ! x=hello $(false) was even valid syntax, let alone that it would set $? to 0. TIL...
ngl, I checked this with 3 shells and then read the spec before believing it π
I prefer the first way. I learned this from shellcheck and asides from just prefering the way it looks, there are some good points in the rationale I think https://www.shellcheck.net/wiki/SC2181
I definitely prefer the first way as well, I just had no idea that it could be used with variable assignments and command substitution
hi guys
when i run pip install tkinter it gives an error
ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none)
ERROR: No matching distribution found for tkinter
no need to instal tkinter, it is included in the builtin lib
oh ok thx
admittedly i didn't check it carefully with the spec π«£
shellcheck does point it out as a single sentence in the "Rationale" section on https://www.shellcheck.net/wiki/SC2181
To additionally capture output with command substitution:
if ! output=$(mycommand); then ...
I'm surprised to learn that it works, but I'll use it now that I know it does, heh
oh i see yep. i'll keep using it now!
my original thinking was that variable assignment acts like a command when it comes to $?, so i thought i'd try it
it really doesn't, it apparently acts in its own totally unique way
the rule is that if there is a variable assignment but no command, but there are command substitutions, the exit code of the rightmost command substitution is used
the spec you quoted makes sense to me, the only odd part is the rightmost thing
but with a single assignment it makes sense to me at least
x=foo $(false) $(true) is successful, but x=foo $(true) $(false) isn't. So weird π
reads like a "idk we need to do something for that edge case" decision
it's consistent with bash pipefail at least
x=$(false) y=$(true) could make for some interesting obfuscated shell scripting
indeed
Anyone know why these node process are leaked
These are from commands I run from terminal
But for some reason when I quit them they doesn't get stopped
found the issue
somethime i accidentally press control z instead of control c
and zsh suspend them
it doesnt explain the full cpu usage tho
@unkempt hamlet type jobs to see if there are any suspended tasks
otherwise impossible to say why
i later found out that it is not issue with suspended tasks
If there is suspended tasks the terminal ask me to quite before closing
The issue happen when I use -- to run another program
I had smilar issue thing with lldb
where it didn't close the program i was debugging properly
example: lldb -- /path/to/program
or in my case with node
npx wrangler pages dev -- npm start
Guys, am in arch and how can I recover a file deleted using rm?
you cannot
Well... you might be able to, but it will require other software (I can't recall what software can do it), but also the more you write to disk the lower your chances are of being able to recover it. It might also be available via snapshots if your system and/or file system are set up to do that.
Might be worth looking over https://wiki.archlinux.org/title/File_recovery - there's no guarantee any of that will work, but the important steps would be to not use the drive and to use a live system (boot from USB stick or such) then mount the drive to be checked in the live system
Also, if a process still has that file open you can relatively easily recover it via /proc.
Hi
Need help
Not able to boot my laptop after installing Ubuntu it's freezed on welcoming screen
When I open it - it is saying failed to register error~22
Did every BIOS setting
some common debugging:
- ensure secure boot is off
- make sure you set the installation up as uefi gpt and not some legacy dos partitioning, you should have a efi partition. This may require booting the installation media as uefi
- if the error is during boot, you should be able to press escape to see a description of the error
- if the error is after boot then the error may be with gnome software and you may be able to switch to another tty, a picture of the screen would be useful to aid you
So should I clear gpt partition?
yes maybe try re installing from live environment but making sure that if you hae the choice between legacy or uefi boot, choose uefi
that nuked my pop os install once
ah ok im not too knowledgable but it wont boot and there is some error with the disk or partition
i would suggest a re install
ok yep thats good, but maybe try another install ensuring gpt partitioning and see if the error is still present
What should I set my gpt partition option to
im not sure what options the ubuntu installer gives you, if its all automatic then just ensure that the installation media is booted as uefi
but if manual then you want to pick gpt, you want to set up a small efi partition and label it correctly and you want some root partition labeled correctly with ext4 or btrfs
I am not getting any change
Have you double-checked that the image you're installing from isn't corrupt? Maybe try re-downloading it - istr having some issues with something that looked to be a complete image, but had issues when trying to install the OS.
Sorry didn't get it
I had Ubuntu installed it was working fine but it got off suddenly from then on I am not able to
"got off"? You must have done something to make it change its behaviour. Did you try an upgrade, and it perhaps failed?
I was installing simply Fortran software
It does sound like either the installation is corrupt, or there's suddenly some incompatibility with your BIOS - I'd bet on the former.
What can I do now
so you did a reinstall and it failed?
Ya I guess the same
maybe some hardware problem if so
Reinstall in which sense
wipe the disk ( making backups) and then reinstall from usb or similar
Usually in situations like this I'll boot from a live USB stick, then mount my real system in a chroot, and try uninstalling/reinstalling from there
I am stuck here
And, yes, if I can't recover like that, then it's bye-bye old install, hello new install
I don't recognise that as part of a normal Ubuntu install/installer...
Here see
That just seems to be saying it can't start LDM - and that is possibly because it doesn't recognise your graphics card. You should be able to drop into a (different) tty at that point and investigate as it suggests. It can't start up a GUI, but you should still have tty (command line) access.
So should I wait for the whole process?
ctrl-alt-F2 to drop into tty2, then systemctl status lightdm
I am not getting the tty2 line
Then either boot into single user mode, or do what I suggested above and boot it in a chroot from a live USB
I got to here
this isn't single-user mode. this is the bootloader shell, it's not a tty. this is a very early stage in bootup, it occurs before the actual operating system starts. usually this happens when something is misconfigured. most shell commands will not work here, like apt and sudo
Can you share any tutorial video or website
So I can do it better
the shim_lock protocol not found error seems to be the main error in that picture
i dont know about chroot
without chrooting, i would still advise to back up the contents of the disk by booting another os ( ensuring it is not a live os which wipes on reboot) which can read the data from the internal storage and then copy over what you need
then do a fresh install
I see that my laptop is not working. The CPU fan is not responding.
I am getting it to repair from the technician
:(
I got windows install in the laptop for work purposes.
I'll buy new laptop
I was about to though in few months but now I shall it earlier and get dual boot in it
Hi I run two VMS from same vmdk is there any unique parameters which differentiate both VMS ?
what is this for
11/22/1987... Never forget!
so my laptop has a built-in SD card reader, problem is I haven't been able to get it to work and read SD cards since I switched to Ubuntu 22.04 LTS. is it a separate driver?
will give it a read, thanks!
Hi all π
I am building CPython from source, and noticed that my libpython3.11.so is quite large compare to the one installed from apt install libpython3.11. Mine is around 30MB, while the one from apt is only 7MB.
I tried building with config args that I got from apt installed Python:
~$ /usr/bin/python3.11
Python 3.11.8 (main, Feb 25 2024, 16:41:26) [GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig
>>> sysconfig.get_config_var('CONFIG_ARGS')
"'--enable-shared' '--prefix=/usr' '--libdir=/usr/lib/x86_64-linux-gnu' '--enable-ipv6' '--enable-loadable-sqlite-extensions' '--with-dbmliborder=bdb:gdbm' '--with-computed-gotos' '--without-ensurepip' '--with-system-expat' 'MKDIR_P=/bin/mkdir -p' '--with-system-ffi' 'CC=x86_64-linux-gnu-gcc' 'CFLAGS=-g -fstack-protector-strong -Wformat -Werror=format-security ' 'LDFLAGS=-Wl,-Bsymbolic-functions -g -fwrapv -O2 ' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'"
But that does not help, what have I missed? π’
you can probably find the build code used to compile the version from the software repo online @umbral spade
Yeah I did find that repo https://salsa.debian.org/cpython-team/python3/-/tree/python3.11/debian and... still reading π₯² . Thanks @silk herald
My other project embeds Python and it will run in different platforms, so to have a faster build, we collect pre-built binaries and categorize them in a git repo. And we also have to distribute those libpythonXY.so file to client side so it would be nice to have a smaller artifact. Size won't have to match though, just seems way too big. And really curious about what makes it so huge.
I was building on WSL (Ubuntu), and my colleague was able to get a decent size binary (6MB) by building in a Rocky Linux docker container with common configuration args. So that's what I am going to try next. Maybe my WSL was... too dirty or what. :S
Oh and, on macOS and Windows, I can get small binary with just --enable-shared config flag, so it was really strange why the same config generates huge .so file on my WSL.
ah ok some oddities leaking into the build environment
Found the problem, simply adding -g0 reduced the size, from 30MB to only 6.5
./configure --enable-shared CFLAGS="-g0"
Turns out those were debug info π
neat
But it is strange that I did not find any -g0 flag but -g in sysconfig.get_config_var from apt installed Python.
And looks like what Debian package does is using dh_strip to remove debug sections on install.
https://salsa.debian.org/cpython-team/python3/-/blob/python3.11/debian/rules#L1541-1543
guys does anyone know why am i encountering this error!!!... I have tried every possible combination of turning on and off svm and also the windows hypervisor platform
2.7 
it'd be easier to answer that if we could see the complete stack trace
::
:incoming_envelope: :ok_hand: applied timeout to @maiden estuary until <t:1710346542:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
::
I need help with Django
is it unix related?
There's a Django discord but you can also just ask your question. #βο½how-to-get-help
My guess is that Documents is a folder, not a file? Then you probably need slashes or something
Nah, I'm guessing it's SIP related
why are you trying to 777 it?
is 755 not good enough?
is it a symlink? you can't generally change the permissions of a symlink
hm I was able to chmod mine, so ... π€·
linux-firmware:
Installed: 20220329.git681281e4-0ubuntu3.29
Candidate: 20220329.git681281e4-0ubuntu3.29
Version table:
*** 20220329.git681281e4-0ubuntu3.29 500
500 http://id.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://id.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages
100 /var/lib/dpkg/status
20220329.git681281e4-0ubuntu3.14 500
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages
20220329.git681281e4-0ubuntu1 500
500 http://id.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
500 http://id.archive.ubuntu.com/ubuntu jammy/main i386 Packages
how do install from the jammy-security/main instead? this one from jammy-updates/main is messing with my gpu
nvm i got it
just do sudo apt-get install linux-firmware=20220329.git681281e4-0ubuntu3.14 duh
kinda getting sick of having to update system stuff so imma just hold all these stuff lol,
https://douglasrumbaugh.com/post/apt-pinning/ you may be interested in pinning
I have recently discovered a feature of the apt package manager that smooths over almost all of the annoyances that I've had with point-release distributions (Debian, Ubuntu, etc.). apt provides a simple and effective way to install newer packages than are included in the release version that you are running. And it isn't even hard to get set up.
it's used primarily for upgrading packages but I would guess it'd work for forcing a specific repository too
i was looking into pinning, but surface reading of it looks like i would have to make a file for every package, which is a little annoying.
will give it a read. thanks!
Anyone configured yapf? There is one style issue I haven't been able to some:
is there any build tool for linux that can make an exe build for both windows and linux?
From Python? I think you need both instances of Pyinstaller, one normal and one on Wine
how would I do that on wine?
best scenario I found so far is to just use a VM to do it, but it feels excessive for just this one task
There are loads of walkthroughs on the web, I don't know which one is best but here's an example https://www.makeworld.space/2021/10/linux-wine-pyinstaller.html
Packaging a Python project into a standalone executable is often a struggle. Thankfully we have tools like PyInstaller to make this easier. Recently I ran into another struggle of my own, which was that it seemed impossible to βcross-compileβ with PyInstaller. That is to say, run PyInstaller on one OS, and have it generate an executable for anot...
I'm looking for a straight forward and good configuration that will add git information to my bash prompt. I'm not really looking to tinker with something for the next month to get it exactlyu right, I just want to copy something from github into my bashrc.
I know a lot of people are getting their fancy prompts from ohmyzsh, but i dont really want to use zsh.
any suggestions?
idk how i feel about that one, i guess there is no way to do this without tinkering with it a bit... Still open to suggestions
hm, looks interesting but gotta say, no one wants to start installation of something with, "hey go get this font" lol
what is wrong with the font i have
nerd fonts have extra symbols that'll show up as those rectangle/question mark
most fonts have nerd font variants
what do i do with it?
wdym?
ive never installed a font on my terminal, i just use the default font. I dont really overthink things like that.
and i guess what gives me pause is like...
what I want out of this is not a terminal filled with icons
ill give it a try, it seems pretty tactful usage of the icons from the images
it's extremely customizable, you can just remove the ones you don't need
i could just not have any of them is a better starting point imo, but it looks like they are aware of that because it seems like they plan to go that direction in the future
So on ubuntu I tried putting the font files into ~/.fonts and did fc-cache -fv and it does indicate that it is looking in this location and found font files, but when I try to select the font in Konsole appearance settings it is not there...
Im just going to reiterate that having to do this as a requirement for using the software is absurd.
Alright so i got it to work by closing konsole, but now i dont like this front because its weird.
see this is why i dont do this lol
what is all this lol
all of those version numbers are just noise tbh
this is the most reasonable one, I kind of feel like i was right to be hesitant about this when the font thing came up right away.
"why do they want me to get a different font?"
"because we plan to cram as many noisy icons into your prompt as we can"
this is better imo, objectively better
I kinda want to disable specific ones and leave others enabled. But like I said earlier I also dont want to waste all my time configuring this instead of working. I was hoping for just reasonable defaults, which imo is the opposite of what this is. There are at least some simplfied presets to jump to.
im gonna try this one, i feel like even though it has the same amount of cluttered information, its organized much better
it cuts off part of the arrow
see this is why i camt get into this, its just a monumental waste of time to configure things to be perfect, its better to just accept them how they are and get to work
add a space after the arrow char in the config file
hmm ok
I just get to this stuff when I have the time to, till then I just live with it unless it's super annoying
yeah so what happens with me is when I decide to do this, I can never get any satisfaction until I go back to default. But I'll at least try it.
so where do i put the space
[character]
disabled = false
success_symbol = '[ο²](bold fg:color_green)'
error_symbol = '[ο²](bold fg:color_red)'
vimcmd_symbol = '[ο΄](bold fg:color_green)'
vimcmd_replace_one_symbol = '[ο΄](bold fg:color_purple)'
vimcmd_replace_symbol = '[ο΄](bold fg:color_purple)'
vimcmd_visual_symbol = '[ο΄](bold fg:color_yellow)'
i figured it out i just put it on all of them
i can work with this
Hey I want to install Ubuntu in my laptop (16 GB RAM+512 GB)
And make it dual boot
Can someone send with appropriate video or website to do it
Thanks in advance for help
Yuck, dual boot? Have you considered WSL and/or a VM? I also like https://docs.linuxserver.io/images/docker-rdesktop/
If you must dual boot though there are plenty of guides a web search away like https://www.freecodecamp.org/news/how-to-dual-boot-windows-10-and-ubuntu-linux-dual-booting-tutorial/
Welcome to the home of the LinuxServer.io documentation!
Yes I will doing Using VM only
Shameless promotion
heh, listing every single unix cmd/tool? π
My bspwm takes like a second to respond to any keybinding followed by a modkey! Any help? I Use Arch BTW!
I have recently discovered a feature of the apt package manager that smooths over almost all of the annoyances that I've had with point-release distributions (Debian, Ubuntu, etc.). apt provides a simple and effective way to install newer packages than are included in the release version that you are running. And it isn't even hard to get set up.
you're using sxhkbd for hotkeys?
Hi
Has any used DDSCAT in Linux before for project?
I need some help in how to make it run and perform calculations
I agree that dual booting is extremely outdated and Im always trying push new linux users away from doing it but they never listen.
I do think there is a use case for it, but I dont think most people need to do it and looking back at my own dual booting days, Im so happy I dont have to deal with it anymore.
It makes me sad knowing a lot of people who are doing this for the first time are young and they're trying to figure it out on a machine with limited storage. And they dont know yet that once its set up, they will only use one OS 98% of the time.
Basically I was already irritated with dual boot configurations and having multiple partitions with different file systems when I found out about UEFI bootkits.
And that basically just sealed it for me, Im done with it, not turning off secure boot for it.
once you are able to afford it, the way is to just have two computers
its so much better
actually after looking into, it seems its possible to install with secure boot enabled now.
But that doesnt stop a lot of guides from telling you to disable it though π
hey guys, is anyone familiar with a current workflow for setting up flask (python 3.10 venv) via wsgi on an apache server running on an ubuntu vm? Like, the Flask app itself runs properly, but we need it on the vm. When requesting the desired resource, it says "cant find modul 'run'" - meaning the run.py, where the flask app is created. I find a huge variation of how to configure the Apache with wsgi, but after talking to a few colleagues, I feel we have set up the python and project paths properly, etc. Is there anything inherently we are not seeing?
Without sharing the code or config or logs or anything, your guess is better than ours.
This is a good reason to use Docker though. That way if it runs on your dev machine it will almost certainly run on your server.
Dual booting works okay to me ^_^
i just do it at different physical drives
1 GB good SSD for Linux
and 250gb SSD for windows π
when i installed Windows, i physically disconnected Linux drive just in case
so my Windows is not aware about Linux existence and therefore not making boot messes
Linux to see Windows is okay, i can fix grub issues in case of trouble just fine
ergh... i haven't launched by Dual booted windows for half a year already though
i just configured already running Windows in VM with folder sharing to linux
makes a nice experience using Windows without leaving my comfort zone ^_^
i haven't figured out how to forward videocard to VM though (i remember seeing guides it is possible, but ergh haven't figured it out), in case i need videocard in windows, i still need to dual boot to Windows for such usage case. Very rarely needing to run smth with Videocard at windows though
@wise forge could you please help me with Linux installation
First, I was gonna dual boot my system, but now I think it might backfire me π€
If you have sufficient space it's a lot better. Most new Linux users are often kids who don't however
So it's always a battle trying to convince them they don't need it
I think it is fine to survive on Linux with small amount of space
like... i lived 2 years with having work every day in Linux while having just 250 GB ssd
ncdu program helped me a lot to manage this possible,really making easy to clean up space
- i used regularily enough
docker system prune -a
ncdu is brilliant small CLI program that scans filesystem and shows all folders in order desc by their sizes
you can quickly navigate through folders to find where all the space is taken
anyone here uses WSL day in day out?
i am starting a new job that will force me to use windows due to security reasons... i am looking for any tips in maximising productivity and/or any pitfalls i should know ahead of time.
Basically just that wsl and docker desktop have this problem where they both want to claim the same ports and either one points to the other as the problem
If you're expecting networking tools like nmap to be useful in wsl I find they usually aren't
Of course wsl is improving all the time and it's possible my experience is outdated
oh yeah i am not touching docker desktop with a ten foot pole, i have heard things related to it.. just gonna install docker inside WSL, which seems to necessitate WSL2 (as opposed to WSL1) as far as i know
yea you will need WSL2
with WSL2 dev on windows is pretty fine -- tooling allows you to more or less seamlessly connect into there (i.e. vscode), windows terminal is nice, it all just worksβ’οΈ
to use windows due to security reasons...
π€£
i have read somewhere that when reading files crossing the boundary of windows<->WSL is slower than expected, is that still true?
also i have been terrified from my limited usage of windows terminal, hopefully i won't be this time around π¦
yeah.... actually maybe more like laziness. it's a hedge fund and they are probably stricter than most corporate IT π€·ββοΈ
fair enough - this is a work related project, so I'd rather not share too much. I was just wondering if there is something I am missing. We also tried to use gunicorn behind apache, but the result is the same. One thing we found out though is that the gunicorn service states it is using python3.10 (the one the venv was created from) while print(sys.path) in the run.py says it is using 3.8 ... I am not too familiar with this, but shouldn't they state the same? equally, when running the app manually, sys.path prints 3.10. Does the venv need to be activated in some config?
we were thinking about docker in the long run as well.
I was googling and found this https://leemendelowitz.github.io/blog/how-does-python-find-packages.html which mirrors my situation: an existing system 3.8 version and a compiled 3.10 version. My related question is: could the described problem result in the interpreter not finding a module?
Lee On Coding, My blog about coding and stuff.
I do expect the different Python versions is pointing you to the crux of the problem. I don't know why gunicorn is running on the venv and Flask is not but that could absolutely explain a module not found error
they should force everyone to use QubesOS or something like that "for security reasons" instead π
i heard about some hedge fund (don't remember which one) that required all employees to run NixOS that was managed by their in-house it staff/department
would love to be forced to use nixos π
But do i also need to manually activate the venv for this workflow or can gunicorn do this? I mean, setting some python-home in the config isn't the same as activating venv, right? Because, activating means the venv path is put at index 0 in PATH, which would then allow the 3.10 interpreter to find my modul? Just trying to get the dynamics straight....
I've never tried to deploy without Docker, but it looks like this may deal with your situation: https://stackoverflow.com/questions/44478638/activating-gunicorn-through-virtualenv-with-supervisor-for-flask-application
Thanks for the link, buddy. I will check it out!
right
hey, i got a digital ocean vps, and well, the time is 5 mins behind on it, does anyone know how i can fix it?
you probably want to set up some sort of NTP - https://timetoolsltd.com/ntp/how-to-install-and-configure-ntp-on-linux/ might help?
what operating system are you using?
Never would have thought this would be a problem in the year 2024
ubuntu
thanks
trying it out rn
you should already have systemd-timedated running and shouldn't need any additional configuration
i suggest not fumbling around with other ntp things until you've figured out why it's not working by default
i stand corrected: my debian server with systemd also does not have timedated running
if you have that running then output of timedatectl would be helpful
in fact, i don't think i have an ntp client on my system either π
ah, i do have timedatectl so it must be running somewhere
it's just part of the base systemd package
and following the docs, it must be running because i see it on dbus:
gdbus introspect --system --dest org.freedesktop.timedate1 --object-path /org/freedesktop/timedate1
@vale cobalt βοΈ try that command?
that gdbus command should be provided with libglib which you should already have on your system
$ timedatectl
Local time: Tue 2024-04-02 18:54:58 CEST
Universal time: Tue 2024-04-02 16:54:58 UTC
RTC time: Tue 2024-04-02 17:00:47
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
interestingly it looks like i am also 5 minutes behind, and that must be because my system clock is not synchronized. maybe that's what @vale cobalt is experiencing too
@vale cobalt last ping hopefully: https://ubuntu.com/server/docs/use-timedatectl-and-timesyncd
ah, the systemd service is timesyncd not timedated... of course, that was so obvious (/s)
$ systemctl status systemd-timesyncd
β systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; preset: enabled)
Active: active (running) since Tue 2024-01-09 08:21:27 CET; 2 months 23 days ago
Docs: man:systemd-timesyncd.service(8)
Main PID: 296 (systemd-timesyn)
Status: "Idle."
Tasks: 2 (limit: 2250)
Memory: 1.4M
CPU: 4min 17.337s
CGroup: /system.slice/systemd-timesyncd.service
ββ296 /lib/systemd/systemd-timesyncd
hm, not sure why mine isn't synced either, i did ufw allow ntp too just to be sure
well, i just restarted it, and well, this might be absurd, but its magically synced now π
sorry for the fuss
just linux things π€·ββοΈ
:/
How to expand 0 1 2 to -s 0 -s 1 -s 2?
is there any available tool for this, like echo/paste/cut?
Probably not directly, if space separated. Something like sed/awk/perl should work though.
The problem with paste is that it never stops if one of the given "files" is infinite. So doing something like echo 0 1 2 | tr ' ' '\n' | paste <(yes -- -s) - | tr '\n' ' ' won't work.
$ echo 0 1 2 | sed -E 's/(\w+)/-s \1/g' 12:12
-s 0 -s 1 -s 2
why not use python?
π [2024-04-03T06:56:19-0700][/tmp] % python3 -c "import sys ; print(' '.join([f'-s {arg}' for arg in sys.argv[1:]]))" 0 1 2
-s 0 -s 1 -s 2
Very wordy for a shell tool, but then I'd do python -c 'import sys; print(*map("-s {}".format, sys.argv[1:]))' 1 2 3 :)
using "sed" and "tr" and "awk" all remind me of autotools and m4, which reminds me of https://rachelbythebay.com/w/2024/04/02/autoconf/
is it actually just 0 1 2 3 as a string, or something else?
might as well:
printf '0 1 2\n' | awk -v RS=' ' -v ORS=' ' '{ print "-s " $0 }'
i had been working on a python CLI tool along the lines of pypipe and mario that could do things like this more succicntly
wow my notes on it are from 2020
it's been a while
the idea was to let you write this, dropping the import sys:
my-tool '" ".join([f"-s {arg}" for arg in sys.argv[1:]])"
or if you wanted, something like this:
my-tool -D spacejoin::xs='" ".join([f"-s {arg}" for arg in xs])' -A spacejoin
basically a little python DSL for the command line
That python cli tool exists, I just forgot what it's called
mario and pypipe both exist
i just didn't like mario's design and pypipe didn't exist at the time
I think I mean another one, but it might have been pypipe
It was a very thin wrapper, just pre-importing a few things and allowing something like perl -pe
Because I want to type this on the fly on the command line
Really nice idea. I have been thinking about an awk like tool but with other language. (python or somehow language agnostic)
check out mario and pypipe if you want something that exists on pypi and not just in my head
Thanks π
I think I actually created a short script for doing this, I wonder if I still have it ...
quick question.... I have 2 servers that have absolutely no access outside their lan. it's centos and I need a package the other one has... is it possible to export a package?
some help, im getting sudden CPU spikes on my ubuntu LTS os vps
like every 4 - 5 hours
is there something i can do to prevent it, also, it isnt cuz of the stuff running on it, that barely consumes 1.3 to 2.3%
hopefully there's an rpm file for the package on your machine
https://superuser.com/q/385712 @fleet forge this maybe
just thought i would spread the word https://www.bleepingcomputer.com/news/linux/kde-advises-extreme-caution-after-theme-wipes-linux-users-files/amp/
If there's something funky with the hypervisor you need to take that up with the VPS provider
But if you're saying that baseline cpu consumption according to htop or whatever is 2% that doesn't mean there isn't a process causing the spike https://askubuntu.com/questions/1225073/how-can-i-see-what-process-spiked-cpu-usage-and-froze-the-system-a-few-seconds-a
Sadly there are files there with size 0 lol assuming the got wiped
Suppose I were to read some megabytes directly from a partition (ext4, if it matters) like /dev/sda1. In the meantime, the filesystem is doing things, so the data on the partition may change. How's this synchronized? Is a read guaranteed to return a "consistent" (not partially modified) view of the filesystem? And does the ongoing read cause writes to the filesystem to be delayed?
No, there is no guarantee of consistency. https://softwareengineering.stackexchange.com/questions/288025/reading-file-during-write-on-linux
I think the only consistency you can count on is that the file won't vanish, or have its permissions noticeably changed, while you're reading it.
Regarding: Setting up cli tool to compile/lint source code.
So I'm building (let's say) some template library code, and also have a few use cases of this library code. I want to have compilation/linting when I modify the library code so that I can get quick in-editor feedback if I break any use case (which will show up as errors in the library source file).
I was thinking of picking one arbitrary usecase and setting up a makefile for that specific case. But ideally I would like to. Have many use cases and easily lint/compile any or all of them.
Any ideas?
what do you mean by linting/compiling "use cases"?
Hi there!
Just a heads up: I'm crafting Snakeshell π, a cool new Bash-like shell that work one pure Python with the classic shell vibe. It's just me on this project right now, but I'd love some company! Coding, testing, ideas - whatever you've got, let's hear it. https://github.com/G000D1ESS/snakeshell
How is this different from https://xon.sh/ ?
Agreed, the idea isn't new. XONSH has full Bash support, while Snakeshell is still in the early stages. The idea behind Snakeshell is to reimagine the application of Python, demonstrating that Python can also be used to write and enhance low-level applications.
There's another interesting project that you might find intriguing β https://github.com/oilshell/oil
Other code that usages the library stuff
YO WHATS UP what is unix
im just genuinely intrested
as
i come from python
and i love making stuff
lol
so could someone one introduce me
btw i mean python CTkinter and Pygame
UNIX is not a programming language, it's more a selection of standards and ideas on how to build an operating system
there are a lot of Unix-like operating systems, most notably probably nowadays are Linux and macOS, which follow the Unix philosophy https://en.wikipedia.org/wiki/List_of_Unix_systems
oh ok thanks
Resistance is futile. You will be assimilated.
:incoming_envelope: :ok_hand: applied timeout to @thorn dust until <t:1712705126:f> (10 minutes) (reason: duplicates spam - sent 4 duplicate messages).
The <@&831776746206265384> have been alerted for review.
alias phpd='php -d '\''xdebug.mode=debug'\'
this is working example but i cannot understand why this is something like this.
i wanna alias php -d 'xdebug.mode=debug'
can someone explain (please ping when reply)
logically if i escape quote then it should like this
alias phpd='php -d \'xdebug.mode=debug\' '
u could use a simpler hack
create file phpd in some bin path
#!/bin/sh -e
php -d 'xdebug.mode=debug' $@
and chmod it as sudo chmod a+x to_its_path
exec php -d 'xdebug.mode=debug' "$@"
you can't escape single quotes inside single quotes
you actually don't need quotes at all for that xdebug thing, . and = will not be interpreted by the shell as anything other than plain text in that context
but if you insist on quotes, you need to mix single and double quotes, or use the "quote-unquote-escape-quote" trick:
'abc'\''def'
Trying to run like 10 different python servers (chatting app, basic ftp, and some other random crud) dose anyone know if I would be able to run it on a pi zero 2 w, sure it can but I just want to be sure
If performance isn't critical you'll probably be OK. You could test on a free VPS with similar specs
Any recommendations?
Oracle or Google if you want something that will hopefully stay always free. Not sure exactly how the specs compare though
With Python apps your constraint on a pi zero will probably be memory
with python apps your constraint is crazy!
"Not enough crazy ... gotta download some more"
Hello guys, anyone got any success for installing a Python 3.7 on and old Debian jessie ? I'm not able to download pip packages after building python from source cause the module ssl is not present ? I'v followed https://kitabi.eu/blog/2019-06-26-python-install/ and https://jameskiefer.com/posts/installing-python-3.7-on-debian-8/ and I got no good result. Any help please ? Thanks you π
Things like conda make setting up complex python projects simpler, but create a whole parallel world.Sometime you want to just fix the current OS, and at most use virtualenvs (I dislike introducing too many layers).I have a debian jessie (8.1) VM (oldstable), and I wanted to have modern python 3 on it, so I decided to install the latest python (...
is there a reason you are using Debian Jessie ?
Very old PC that runs a mandatory software that I cannot upgrade
I use a docker image for my test, for "building" it with pyinstaller then use it on the pc
can you share the error
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org',
port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
if I'm going on python3.7 prompt and I use "import ssl" I got "ModuleNotFOundError: No module named '_ssl'
i always download the deps listed here before compiling python
https://github.com/asdf-vm/asdf/issues/570#issuecomment-531187568
in particular you are probably missing libssl-dev, which would in turn make the SSL module not be built and thus be not available
Steps to reproduce asdf install python 3.7.4 Expected behavior How to avoid warning while installing python 3.7.4 on ubuntu 19.04 Actual behavior Does it require a separate installation of followin...
before building it I did : apt-get install -y --force-yes build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev libssl-dev
Do I need to ./configure --with-ssl or no need ?
ah right - then you do have that dependency, my bad for not reading the article you posted which probably has that.
is --with-ssl really a flag? i am not sure.
in any case, have you considered just using pyenv https://github.com/pyenv/pyenv ?
Does pyenv not already need the version already installed before ?
hmm? what do you mean?
pyenv would just compile it iirc, there might be other behaviour that it prioritise if possible, but for me it almost always just compiles so i just kinda treated that as the default.
I though Pyenv will use an already installed python version like 3.7 - 3.9 before working.
I'm trying to use pyenv but it needs homebrew installed, which required a git version that my debian repo doesnt have xD
i don't think so? pyenv is just a bunch of shell scripts iirc
oh dear god that's a can of worms
it is dude, it is π’
hmm, i wonder what would happen if you just.. yoink this and try them out.. https://github.com/docker-library/python/blob/b7b91ef359a740a91caeabce414ce4ee70fd2b23/3.7/bullseye/Dockerfile
Already tried that, my program needs to be "compiled" and if I did it on a newer version of debian, it just not works at all on the jessie version, libc are all different ^^'
i meant like take those individual steps in the docker file and run them on your host
(not using docker itself)
well just a thought.. https://github.com/docker-library/python/blob/b7b91ef359a740a91caeabce414ce4ee70fd2b23/3.7/slim-bookworm/Dockerfile if you are gonna do that, slim image seems to list out the deps better
hmm yes it could work, I'm trying ! Ty for your help ry π
you could entertain a thought of using easy compilable language like Golang btw.
It would compile to binary requiring no system level dependencies.
Especially if you will build it with flag to turn off CGO off ^_^
Docker can work too, but docker does have requirements to minimal Linux Kernel for specific versions
So make sure you have there meeting compatibility in its versions
So docker is not foolproof method to run stuff on overly ancient hosts
I didnt knew before coding that the source machine is like 15 year old and python use heavily libc os dependant, so thats mb
Yes I know, but I need to try it out first ^^
in theory it should all work if u will use sufficiently ancient docker supporting your kernel
lets see Debian Jessie kernel: Linux 3.16;
Correct; in general, kernel 3.10 is the absolute minimum kernel version that supports the features that Docker requires to run stable (newer versions are preferred though).
https://stackoverflow.com/questions/29216191/docker-minimum-kernel-version-3-8-13-or-3-10
Supposedly docker is runnable from 3.10 versions
On the Docker website I am seeing information that is close to being in conflict.
The page:
https://docs.docker.com/installation/oracle/
Says "Docker requires the use of the Unbreakable Enterprise
so u have a chance to succeed with docker. do check Kernel versions at your hosts
I 'll for sure ! But for now I need to be able to download pip package xD
Ty for your input tho π
pyenv itself does not use python at all, it's just a bash script
it also does not need homebrew, it can use homebrew-installed libraries but there is an env var to disable auto-detection
plugins/python-build/bin/python-build lines 123 to 135
can_use_homebrew() {
[[ -n "$PYTHON_BUILD_USE_HOMEBREW" && -n "$PYTHON_BUILD_SKIP_HOMEBREW" ]] && {
echo "error: mutually exclusive environment variables PYTHON_BUILD_USE_HOMEBREW and PYTHON_BUILD_SKIP_HOMEBREW are set" >&3
exit 1
}
[[ -n "$PYTHON_BUILD_USE_HOMEBREW" ]] && return 0
[[ -n "$PYTHON_BUILD_SKIP_HOMEBREW" ]] && return 1
is_mac && return 0
# In Linux, if Pyenv itself is installed with Homebrew,
# we assume the user wants to take dependencies from there as well by default
command -v brew &>/dev/null && [[ $(abs_dirname "${BASH_SOURCE}") == "$(abs_dirname "$(brew --prefix 2>/dev/null ||true)")"/* ]] && return 0
return 1
}```
so PYTHON_BUILD_SKIP_HOMEBREW=1 pyenv install 3.7 should work on Jessie
The thing is how can I install pyenv on Jessie
you can just download it from the git repo, either use the install script provided by pyenv or clone the repo. there are instructions for both: https://github.com/pyenv/pyenv?tab=readme-ov-file#unixmacos
curl https://pyenv.run | bash ?
#editors-ides would be the place to ask but the next question will be good for what exactly?
Teros hdl maybe
hello folks. im trying to write unit tests for a compiler but i have to format the tokens onto 1 single line and unfortunately i wrote the tokens mimicking the main file structures. i dont know my unix command well but i want to take every tokens and space them by one whitespace all of them onto 1 single continous running line.
how are the tokens laid out currently?
ID(has_right) BECOMES FALSE SEMICOLON
RETURN TRUE SEMICOLON
RBRACE
PUBLIC BOOLEAN ID(SetRight) LPAREN ID(Tree) ID(rn) RPAREN LBRACE
ID(right) BECOMES ID(rn) SEMICOLON
RETURN TRUE SEMICOLON
RBRACE
PUBLIC BOOLEAN ID(SetLeft) LPAREN ID(Tree) ID(rn) RPAREN LBRACE
ID(left) BECOMES ID(ln) SEMICOLON
RETURN TRUE SEMICOLON
RBRACE
PUBLIC ID(Tree) ID(GetRight) LPAREN RPAREN LBRACE
RETURN ID(right) SEMICOLON
RBRACE
PUBLIC ID(Tree) ID(GetLeft) LPAREN RPAREN LBRACE```
so something like this and more below but it needs single space all 1 line
To automate the ease of coding
may i know the significance of unix?
Unix like systems (Read Linux)
- Operate 90% of modern servers (Straight Linux usage, because it is horizontably scalable)
- That alone makes Linux comfortable dev environment system for development to this target
- and also 70% of mobile market (Android is Linux based)
- Also, MacOs world is Unix based too
So.... Unix based systems (Linux) dominate modern web/server/backend and mobile development.
Oh, Thank you, thanks a lot, really, no google search gave me this straight to the point usage. π
and also 70% of mobile market (Android is Linux based)
iOS is also unix
because it is built on top of darwin like macOS
only macOS certified for unix spec and not iOS
i dont even think linux is certified
but it's unix-like, the same way we consider macos to be unix-like
It is the same for macos kernel: xnu
cuz it is stands x is not unix
macOS is Unix certified, and some Linux distros are Unix certified.
true
it is gnu that stands for not unix
not linux
Also macos got certified because of a lawsuit
as they were using unix in their marketing
which is trademarked
pretty sure you can't use "unix" in #unix as well
though i am not a lawyer
linux is "linus + unix"
oh sorry
I'm so sorry
all good mate theres nothing to apologise
can anyone help me with github pages real quickly?
sorry for the 2 year old ping, did you ever find an answer for this? π
yes, im using python-ldap which you cant install with pip but as a wheel (as far as my 2 year old notes say):
apt-get install build-essential python3-dev python2.7-dev libldap2-dev libsasl2-dev slapd ldap-utils tox lcov valgrind
it has a few requirements to install like openLDAP and python3-dev
i am actually in awe that this worked
help received on a 2 year old question
python discord wins again
Which tool do you all use these days to manage environments? I've used anaconda for a long time but many colleagues thought better options are available.
we use at work pipenv. it works.
people are hyping over poetry.
i am often just using python3 -m venv .venv then, source .venv/bin/activate and pip install -r requirements.txt -c constraints.txt and calling it a day. Simple, and it works with nothing extra π
I can be also sometimes using docker-compose as env managing tool
to add to it you can use direnv to auto source when you enter the folder and deactivate when you leave
ergh... no point to use it for vscode users
it needs to be enabled at vscode level to see Syntax highlihgting and integration working
and once u enabled it.. it auto source activates already
yeah vs code does a good job auto detecting venvs
i still like conda (specifically micromamba) the best for DS projects
for "apps" i get by with just pyenv + venv. i was using hatch for a while, but i think pyenv+venv is better for my team's current level of python expertise (not that high)
i did not have a good experience with pipenv. some people like it, but it wasn't for me.
i use pyenv
We switched to poetry ( https://python-poetry.org/ ) after using pipenv for a while. The latter had some problems with dependency resolution (back then) and just didnt feel nice to work with
Python dependency management and packaging made easy
problems with dependency resolution
well yeah pipenv had, but now they at last standartized things and made them nice
pipenv upgrade option works reliably
i think i have only problems with lack of ability to install package without updating to latest all locks
i don't remember if i was able to find solution to this in recent versions after they deprecated old commands
Were using poetry for at least 2 years now, so for sure things may have changed
Those are things only from recent year yeah
They deprecated old dangerous breaking commands and remade to new ones more reliable to update stuff
poetry is for sure not bug-free but it does a good job rn
so we dont see the need to look back
In 8086 the address bus is of 20 bit so the address of any byte would be of 20 bit ,then in segmentation we make CSR DSR SSR ESR which are 16 bit and hold the starting address of the individual segment like code,data,stack,extra how is it storing a 20 bit address in 16 bits even if it is starting
I'm going with poetry then, just to try something new. So far I added jupyter to my env but then couldn't run the actual jupyter notebook server π so some learning curve ahead. Thanks all!
Oh, apparently if you want to run a package you installed using poetry, you don't use the shell directly but rather you use poetry by writing poetry run <package>
Is anyone having experience with DDSCAT in Linux?
How to make it run and do the needful calculations
subprocess.Popen(command, shell=True)```
LinuxDedicateTeot.86_64 is unity game server file
running this command directly into linux vps works well,
but through this script it is not working
any help ? ( it is subprocess module )
"not working" how? What is the output
why shell=True? Popen can run the process asynchronously without nohup or &
in fact, that's just going to exit immediately because the process detaches from the shell and then the shell exits
You should always explain what went wrong, but in this case it's pretty clear what went wrong because the code makes no sense
Actually it was not working! Yesterday but I tried this morning and it worked
Owwww
Whoops! Thanks for the knowledge tho
The code seems reasonable enough to me... IIUC, the goal is to spawn a daemon process, and it achieves that - not in the best way, but not the worst, either
what is the best way? 
The Best way for such stuff to run as container
https://www.amazon.com/Docker-Deep-Dive-Nigel-Poulton/dp/1916585256
They have daemon features too.
As easier substitution I can offer running as systemd process
https://www.copperwall.dev/2016-08-04-use-services-for-your-web-apps
That is common enough choice too
huh. What is daemonize actually... for? The docs don't explain much, but reading the sourcecode it seems to flock a lockfile to ensure there's only one instance of the daemon alive, and closes most file descriptors (??), and sets up logging, and can set a specific uid and gid... and this is cool I guess, but is there a reason to use daemonize instead of making a systemd unit that calls the python script?
I'd guess: because you're on a platform that doesn't use systemd
Is there a way to spawn a child process without it inheriting the cgroup of the parent?
(I want a certain child process spawned by a systemd service to not be killed if the service is.)
(or is this exactly the sort of thing cgroups are made to prevent?)
it's for making a process that's as disconnected as possible from the environment that spawned it. The parent process shouldn't get a signal if the daemon dies, the daemon shouldn't die if the terminal is closed, the daemon shouldn't be able to read input that was written to the parent process's terminal, or write output that can show up on the parent process's terminal, the daemon shouldn't hold any unnecessary references to file descriptors that might stop a directory from being umounted or prevent a socket or fifo from being automatically closed, etc
ah, hmm, that makes sense
anyone can help me
i pulled my project on linux
In this post, we will see how to use nginx with gunicorn to serve django applications in production.Β Django is a very powerful web framework...
then i followed this guide
to host it
but it didn't worked
What didn't work? Is your app running?
on going domain it says this site can't be reach!
i have unmanaged vps ( not the cpanel one)
if i run my project through gunicorn --bind 0.0... it is working
but i don't know why it is not working on nginx
......
Is your app running? And if you use curl from your VPS, do you get a response?
Can you ping it remotely? Maybe there's a firewall you need to open or who knows.
Thanks for the response, by the way it get fixed by the help of some great person in django server
im working on a backend daemon for a docker container creation web app
i need basic API endpoints for only 5 actions currently, would using:
from http.server import BaseHTTPRequestHandler, HTTPServer
be fine or should I just use django for future expansion purposes? Each API endpoint would do something to a docker container with the docker-py SDK and I don't think I would need anything past /stop_container, /start_container, /delete_container, /create_container & /restart_container
I feel like I should add, the website part is handled by php and i have the management of user access and all that done there, the python part is just a more secure way of communicating with docker instead of using ssh_exec() in php
there are small/mature http server implementation like - https://www.starlette.io/
The little ASGI library that shines.
ooh
thanks
ill use that
oh hell yeah that's so much easier lol
def do_POST(self):
content_length = int(self.headers['Content-Length'])
post_data = self.rfile.read(content_length)
if self.path == '/stop_container':
self._stop_container(post_data)
self._set_response(200, 'text/plain')
self.wfile.write(b"Container stopped successfully")
elif self.path == '/delete_container':
self._delete_container(post_data)
self._set_response(200, 'text/plain')
self.wfile.write(b"Container deleted successfully")
else:
self._set_response(404, 'text/plain')
self.wfile.write(b"Not Found")
originally I was gonna do this lmao
for each action
then have a function for each action
yes. as server VM.
and better ask your real question u wished to ask instead all the time
@wise forge, I installed Ubuntu on VMware Workstation Pro 17. It has been installed and worked fine. But I want to try Python code. But If I code, it didn't happen anything. But in the side menu a setting icon shows and hides suddenly when I scroll down. I hope you understand me. My English is not good. I am so sorry.
I uninstalled VMware and try to install on Virtualbox.
Installation completed fine. But when it shows log in screen, it was freezing.
mm... i will suggest u capture video example of what is happening.
I sent you
Check if u created enough resources for your VM
sufficient CPU and RAM
vscode is hungry application (2+ gb of RAM per instance)
I did
together with running Desktop GUI for ubuntu
u should be easily getting over 6 gb of RAM
Please can you help me to do this
check also your htop application in linux to see resource consumptions
I did everything
I didn't sleep well
I give 4096 MB
CPU is 2 or 3 I am giving
RAM is 16 GB mine
The installation on VMware is completed without any problems and does not freeze, but when I scroll down in the browser, the setting icon appears on the left with the mouse cursor and suddenly closes.
Desktop Gnome GUI + VS code will consume more than 4096 ram.
CPU probably enough but under question as well. check htop
Also allocate Swap memory so it would continue working after running out of ram
u ignore my answers.
I don't ignore you
I can't do how to do this
I said
I did everything
Desktop Gnome GUI + VS code will consume more than 4096 ram.
I tried 8192 MB
or 8 GB
nothing happend
Pls can someone help me with this issue.
I'm trying to deploy my fraud detection model on streamlit, but my prediction is not working . I need help
hi
pyenv install
How can I fix this, I have given it permissions through commands and everything.. and I have no clue why its still giving an issue
drwxrwxrwx 1 root root 4096 May 3 18:48 bin
drwxrwxrwx 1 root root 0 May 3 18:48 lib
-rwxrwxrwx 1 root root 211 May 3 18:48 pyvenv.cfg
I am on arch linux btw
can you explain what you want to fix?
You posted a screenshot that, to me anyway, doesn't indicate any sort of problem
then you posted the output of ls -l, and it too doesn't indicate a problem
Maybe the files are still read only even though the directory isn't
@lean pebble did you check exactly the files listed? restart pycharm after chmod of the files?
Is it a cached status of the files inside pycharm? What happens if you press ok?
I'm sorry, but I don't know what that means
It fails when I press ok, I also did restart pycharm after doing chmod
Its just being weird/
Ok
did you check whether the files are read-only?
you never showed us the permissions of any of the files that PyCharm is saying are read-only
I definitely did lol.
drwxrwxrwx 1 root root 4096 May 3 18:48 bin
drwxrwxrwx 1 root root 0 May 3 18:48 lib
-rwxrwxrwx 1 root root 211 May 3 18:48 pyvenv.cfg```
But its fine, it doesn't really matter anymore.
I found a way "around" it that is just more annoying
that doesn't show any of the files that PyCharm says are read-only
'
It 100% does
Its saying that its read only in bin, so either way, its still "bin" the directory.
no, permissions don't work that way
you can have a read-only file in a read-write directory
what does ls -l bin show?
I have no clue rn, I am not even on that version of linux rn
Well on the same version of linux, I just was on wayland, but I am currently now on hyprland. So when I get back into pycharm later tn, I will tell you what it says.
ok. Well, my guess is still the same as yesterday: the files probably are read only, and we just don't know for sure because you never printed their permissions
Well idk to be fair, because I just can't delete the venv inside of pycharm, but I can delete it inside of dolphin.
But the venv works just like a regular venv
So that error only happens when I want to delete the venv inside of pycharm
Which I have to do when I switch things around sometimes.
But the annoying work around is to just delete it inside of dolphin, then be fine, and move on.
you can probably just fix the permissions on the files
hii
no, but sometimes I stick my hand down the garbage disposal while it's running
I want to try using debian, hopping from ubuntu as daily driver. No gaming, just web browsing, youtube and software development.
Will I cry or will I be okay
O yeha office stuff with libreoffice as well
Yes will I cry or yes will I be okay
you will be okay
Awesome
Thank you
so i just installed debian, followed the onscreen stuff and rebooted, dropped at the grub bootloader
what do i do here? it's just a terminal
If you are at the GRUB console, something went wrong
I suggest reading the Debian documentation along with the installer
It explains some of the choices you will be presented with
nvm i figured it out
the boot order was messed up
lol
If you used the graphical installer and selected a DE, it should boot to a graphical login manager like in Ubuntu
Debian is fine as a desktop OS, but it generally lacks polish
one thinng though, at the DE section, i only chose lxqt and unticked gnome, should i have not done that?
If you install a DE, you will get a fairly basic plain setup, unlike for example, Mint Cinnamon, where it feels very much built for the OS
That's fine, usually it's better to only have one DE anyway. LXQT is nice and simple
i chose lxqt and i had no idea how to connect to the net
However, it definitely will lack the polish you might expect from Ubuntu
LXQT is almost not even a DE, it's more of a collection of graphical applications that happened to work sort of nicely together
Debian is more like Arch than people give credit for. I don't remember what ships with each DE, but there's a chance it doesn't include a network manager applet, for example.
im just gonna use gnome
or mate
idk i just needed something light
XFCE is light and old-school but a little more integrated than LXQT
does it have the *network manager applet?
I'm a little surprised that LXQT didn't have one by default, but again it might be buried in a "suggested" package or something. XFCE I think includes one
But again, read some docs, don't expect to succeed by fumbling around and guessing
yea
There is probably enough information out there about configuring Debian that any major chat AI platform should be able to assist as well, but always corroborate with documentation because you never know what it's going to hallucinate
i am not resorting to AI for this i don't want anything to blow up kek
as it turns out xfce doesn't have networkmanager
so i'll just use gnome and install another DE
at least it's stock gnome
sudo apt install xfce4-goodies
Running a package fails after I install it with pip in Unix (mac). My terminal says zsh: command not found. I've seen that error many times in different contexts and it's usually about the path, but the path is updated!
More details: the package is jq and i installed it in my .venv. I made sure the package files are in <folder>/.venv/lib. Perhaps it's problematic that there is not file called jq in my <folder/.venv/bin?
What command did you actually run
pip install jq from within my folder, with the venv activated. Then once installation was completed I just ran jq (and again with various parameters but the basic command is not recognized by zsh)
jq isn't a python program. the jq package on pypi is just a thin wrapper that lets you call the external jq program from inside python
Is it also a trend in unix systems where, if the boot disk is getting full ( i was at 75%) everything goes laggy
Or maybe its just a trend on OS as a whole
or does debian just simply have better performance than ubuntu
debian is definitely less full with nonsense in the default installation
Is there any way to force Git to stage only specific, individual, exact lines of a source file?
I know about git add -p and that's not doing it for me; when I do that, it's Git that chooses what constitutes a hunk, and while it's usually correct, it's not uncommon for me to disagree with its choice. I know I can press s to subdivide the hunk, but Git often reaches a point where it refuses to subdivide the hunk any further.
I want to be able to tell Git to specifically "stage lines 457 through 471 from file foo.py".
Is there any way to force Git to stage only specific, individual, exact lines of a source file?
i do it all the time with Vscode git default integration.
clicking changed files
selecting green/red whatever at the right lines i wish to stage and choose "Stage selected lines"
probably it should be somehow existing at cli verion, eh
Yeah, like I'm even doing this on Windows, so I have the Git GUI, and that lets me select specific lines and stage them... but I want to know what it's doing under the hood to do that; I don't like not knowing how to do it myself
if i am not mistaken git add -p has options to split chunk into lesser ones may be
may be that it used to select smaller portion
Here you can slam the
ykey to stage the whole hunk, use theskey to split the chunk in smaller chunks or go completely nuts and use theekey to edit the chunk by hand.
so, at least the option s can be an option.
in patch command
I know I can press
sto subdivide the hunk, but Git often reaches a point where it refuses to subdivide the hunk any further.
I'll see if there's functionality anywhere in the Git GUI that lets you dump out the commands it's doing
perhaps answer in use the e key to edit the chunk by hand.
https://www.codementor.io/@maksimivanov/add-specific-lines-with-git-patch-eais7k69j
Oh, this tutorial is well explaning "Behold The Power Of E"
And you are really concerned about that onion part, but you don't want to remove it. So you want to stage only the "Flowers smell good" and "And so do you" lines.
Now the s option won't help us, because those lines aren't separated by empty lines, and git considers them as one hunk.
e option to the rescue.
editing hunks manually is not that easy
it's possible but it's very easy to end up with an edited hunk that does not apply cleanly, in which case git will reject it and force you to try again
note that you can also use git reset -p to unstage hunks
as well as git restore -p
And git checkout -p to throw away unstaged hunks
Hey
Hey guys, I use iTerm as a Terminal but it never shows as a window tab (only in mac bar)
restore in this case is synonymous with checkout but it doesn't also switch branches
I basically never use checkout anymore
and I never teach it to beginners, I tell them to avoid it and to treat examples that use it as outdated and dangerous
Same here, never use checkout.
git addto stagegit resetto unstage (opposite of add)git restoreto throw away changes in index
And then I use git reset --hard, but that should perhaps be achieved through another command.
Hey everyone! New to python, trying to get a hang of things. I'm working on a small pet project, and I'm trying to make my python script more accessible by making it invokable via the terminal via it's keyword. For example I don't want to invoke it via "py pet_project.py [arguments]", but instead straight via "pet_project [arguments]" in the terminal.
What is the best way to achive this without tempering with the zshrc, bash_profile, etc?
There are two ways, lazy and official one
Lazy way, just put into any folder with binaries as pet_project file
And add Shell Bang for python into file beginning
Official one, somewhere in setup tools for libraries exists place for commands defining
Got it, thank you very much!
installed gimp through apt, got this:
β― gimp
error: app/org.gimp.GIMP/x86_64/master not installed
this error happens whether or not i installed gimp, which is weird.
Any advice? (on debian bookworm)
I assumed it was a flatpak error, so I ran flatpak list and I haven't installed any flathub packages
where is that gimp executable? not sure what shell you're using, command -v gimp is the posix command to find it
if you're open to flatpak, personally i prefer it for "big" GUI apps like that, so i don't end up with 10000 obscure libraries installed in my system
im using fish shell
as for where the gimp is, it's in /usr/bin/gimp
i'll try this
at first I cancelled flatpak install of gimp because it listed a bunch of things it's installing that is not gimp, but now that I take a closer look these are probably some flatpak runtime(?) stuff to allow apps to run under flatkpak
these things
I do need gimp for some site logo design I'm making so i'll take anything that works π
with the choice of snap vs flatpak, does it matter which I choose?
alright gimp works π
solved?
Yes
does cp override the file
Yes
ty
Tooling, setup and configuration related to Python development on unix or unix-like systems such as Linux or MacOS.
Hi! Is there a recommended command line argument parser that works the same way across all operating systems?
U can use Bash at Linux
U can use Git Bash at Windows
Otherwise if your goal cross platformnes
Use https://taskfile.dev/usage/
It comes with embedded shell that will work same across all OSes
thank you!
Huh, do normal ones like argparse or click have notably different behaviour across OSes?
I think I read somewhere that some had different behaviors, but I can't remember which ones. Something like the first argument being reserved for the path to the script in sys.argv in macOS, but not in linux etc
That's not really the argparser's fault: https://docs.python.org/3/library/sys.html#sys.argv
but I see what you mean. I don't think I ever experienced such platform differences with click, but I don't think parsers particularly try normalizing this, either.
Hm. Got it, thanks!
i wonder how many people here actually develop/deploy code on unix
all modern backend developers at least
and especially DevOps engineers π
no
thats *nix
im talking about unix
nvm then
the one made in 1973
yeah... we used it i think a bit during university
but i never used or heard about it again after uni
We used plenty of questinable stuff during uni though, like Fortran or Prolog, so may be unix is ancient stuff too
afaik macOS is unix certified
when im talking about unix
i literally mean
the operating system
developed by bell labs
not unix-compatible
https://www.reddit.com/r/linuxquestions/comments/y3z2qy/is_unix_dead/?rdt=35085
googling questions like "reddit is still unix used" answered it as usual
reddit, googling what google is not googling
im asking about the poeple here
the specification was based from the os
like, does anyone here still use unix
devops engineer/backend dev dealing with linuxes only every day π
not even pressence of windows
IM NOT TALKING ABOUT *NIX SYSTEMS I SAID THAT LIKE 3 TIMES
do you mean unix certified products?
this is the list
ig these are the versions
It sounds like you're asking if anyone still uses an operating system that hasn't existed for 5 decades, then
i mean
people still do in legacy systems
The original UNIX doesn't run on any hardware that exists today, excluding emulation
Shell bang? π² Never heard this! But it makes that shebang would be short for that.
I've only heard shebang and hash bang previously
does someone have any good useful ssh clients suggestions for windows
im using openssh and well it gets the job done but something more productive would be better
tooo many options to choose from
some say tabby ssh is good but has privacy concerns
https://git-scm.com/downloads
I can recommend whatever is coming with git bash in there
CLI interface for the win, your ssh will be same in configurations as Linux users use
Actually... Scratch that, I have even better proposal. Install wsl2 and just use default ssh inside it π
Honestly, regular 'ssh' inside WSL is all I ever want
Heheh, good question... it's been almost a decade since I connected to the shell of a Solaris system.
fr π«Ά
it just randomly says incorrect password in my linux mint cinneamon
I use wezterm terminal on windows (to ssh to linux machine when working remotely).
Wezterm has builtin ssh that you could use @vale cobalt
What does "more productive" mean in this case? Like scripting?
why my java executable is in black and highlighted in red when i list it with ls, im using rhel 8.6 and installed jdk17 with their provided repository
u could try running with ls -la
and doing echo $USER to gather more info
im using root so output of echo $USER is root
ls -la still gives red background black word , permission is 755 own by root:root
Is there a cli tool like concurrently in python? https://www.npmjs.com/package/concurrently
i can offer language agnostic solution... with yaml syntax. hehe from golang world. like to use for python projects too
version: '3'
tasks:
assets:
deps: [js, css]
js:
cmds:
- esbuild --bundle --minify js/index.js > public/bundle.js
css:
cmds:
- esbuild --bundle --minify css/index.css > public/bundle.css
if u use deps syntax, they are executed concurrently when u call task deps
i usually use it without concurrency though
version: '3'
tasks:
main-task:
cmds:
- task: task-to-be-called
- task: another-task
- echo "Both done"
task-to-be-called:
cmds:
- echo "Task to be called"
another-task:
cmds:
- echo "Another task"
just doing chain stuff like this
Nice to know about option to go concurrently
I'd rather not create a new file. Can this be done via cli?
if its a symlink it should be pointing to some other file right? the output of file java is also marked as java
seems like a broken symlink to me
a screenshot will help confirm it
ill get one tomorrow
Try ls -lrt java
Hello guys,
I'm not sure if this is related to Unix or not but i hope i find an answer
i'm trying to run a cronjob on my MacOS to run at 8:55 AM on a daily basis, this should force my laptop to wake up to run another cronjob that will follow it.
55 8 * * * sudo rtcwake -m no -t $(date +%s -d "8:55 today")
will the above actually run on a daily basis at 8:55? and would it be affected if my laptop screen down not up (but not shut down)
This site is handy: https://crontab.guru/
If your laptop is asleep, I would expect the job to get skipped
this is java 11 and its not in red
i also tested the application in other environment and it seems like it works with openjdk 17 but sth seems to be broken in this environment
What does ls -l show?
@river apex what does this one show?
Maybe it's extended attributes... You can try ```
getfattr -d -m '' -- /usr/lib/jvm/java-17/bin/java
for me a red background is setuid, but it would also show an s in the permission chars at the start
and setuid java would have been ......... problematic
Interestingly the manpage disagrees with that answer
Do you have LS_COLORS set?
Maybe you have this same setting that results in a red background for files detected as compressed archives
30;41 so its ca, broken link is in white text so im not sure where thats configured
Bash manual, the section Basic Shell Features > Redirections
Cit.: The following redirection operators may precede or appear anywhere within a simple command or may follow a command.
Question: How do two following cases distinguish from each another?
- redirection operator at the end of simple command
- redirection operator follows a command
What an example for each of two cases above can be presented?
I think you're misinterpreting the statement. They're saying the redirection operators can precede the command, appear inside it, or follow it. So you can do >redirection some command, some >redirection command, or some command >redirection.
which role does 'some' play in the second case of your 3 examples? I guess in cases 1st and 3rd the 'some command' does stand for one token.
In all cases it's two tokens, part of the command. You could replace some with git and command with status, for example: git >redirection status works.
"Some" is sometimes used to mean something like "any"
not sure if this question belongs here but:
need a new flash drive and was wondering how much is the minimum i would need solely for flashing iso files. I was thinking 8 would do but im not sure
that depends how large the ISOs are, right?
ye this depends on the OS @lethal marlin
8 is plenty though. most install mediums are somewhere from 1-4 gigs
you can always just see how large the iso is
common sense W
Not to much of an expert when it comes to deploying applications on different OSs but, what does the process look like for testing scripts within Ubuntu, for OSs such as Windows?
However you like. CI/CD pipelines can run tests on Windows. If your primary OS is Ubuntu and you need to actively try a script on Windows you probably want a VM
Github Actions have Windows runners
So... we can imagine that u can use crossplatform language
that u test on linux
and CI will run on merge to master for Windows too.
i am lazily just testing for Linux only in my pet projects at least though. Windows gets tested manually from time to time during releases π
Yeh, I really need to learn CI/CD and GitHub actions.
Kali full version is 11G I guess
Mac OS Ventura I think is 15G
But 8 is sufficient for most isos
And if you doing ventoy you will need more
Again depends on isos
hi i know unix is totally diffrent from linux but i was wondering do any of you know how to fix this linux error i am trying to install docker
oh and i did not see a linux questions page
What distro? Did you apt update or equivalent first?
i figured it out thanks
I have different partition on my hard drive. I have Linux Mint already installed and Windows 7. So I installed Void Linux, but if I reboot my system, or like when I on my system, the GRUB bootloader will only show me Void Linux, like as if the Linux Mint does not exist. So I don't know what to do.
um
when
you
install a new Linux distribution,
it could be make some problem
so
installs its own GRUB bootloader,
which might not recognize other operating systems immediately.
to
resolve this issue and make all operating systems visible in the GRUB menu,
you need to update the GRUB configuration. Hereβs a step-by-step guide to fix this issue:
Since Void Linux is currently the only system visible in your GRUB menu, start by booting into Void Linux.
Open a terminal in Void Linux and identify your partitions. Use the following command:
and
This is linux code
sudo fdisk -l
This will list all partitions on your hard drive(s). Make note of the partitions where Linux Mint and Windows 7 are installed.
you need to update the GRUB configuration to detect Linux Mint and Windows 7.
If Void Linux does not automatically mount the partitions where Linux Mint and Windows 7 are installed, mount them manually.
sudo mount /dev/sdXY /mnt
Replace /dev/sdXY with the appropriate partition identifier (e.g., /dev/sda2).
Run the GRUB update command to regenerate the GRUB configuration file:
This command will search for all installed operating systems and add them to the GRUB menu.
After updating the GRUB configuration, reboot your system:
reboot
don't forget the sudo
tldr copy paste the efi folder and update grub
Worked thanks
has anybody used zellij on fish shell+starship and having the autocomplete/peek gone?
how'd you have the autocomplete turned on?
nvm fixed it
just gotta add the default shell to zellij config
question about ssh:
how to make a connection not disconnect all the time? it's such a pain when i connect, then do something else for a while, return and it's already disconnected.. I thought that the server would like ping the client to check if it's active before disconnecting, but apparently it doesn't, because my terminal window remains active and the connection still gets disconnected :/
you can set ssh to send keepalive pings, man ssh_config
normally it doesn't disconnect on its own as long as the connection is alive though
however if your concern is that you lose whatever you were doing on the server you probably want something like screen or tmux
I wonder if you're, maybe, closing your laptop lid -- I don't think ssh will automatically disconnect for no reason
no, i'm not. I just installed zellij (basically a more noob friendly tmux, never used a multiplexer before) and opened an ssh session. Then I opened another terminal window and opened a session there. Then I closed zellij and left the pc for 20 minutes.
When I came back the open terminal window was frozen and unresponsive (which I assumed meant the session was disconnected). I tried typing and simply nothing happened. Then I opened zellij in another terminal and attached to the previously opened ssh session in there and it worked fine. After a few seconds the other (normal) terminal unfroze and everything i was trying to type there suddenly appeared.
Exactly what's going on - idk. But it seems like my session just freezes (but doesn't disconnect) and doesn't wake up until something (don't quite know what) wakes it up. Zellij seems to work just fine, so i guess i'll just be using that for now. Would still be interested in an explanation if anyone knows what's going on
thx, tried zellij, interesting stuff
it's imp to take backup but if I don't take backup while installing arch linux (duel boot) will the chance of loosing data will be more or less? I don't have SSD to take the backup of large size. What should I do? Can I install the arch without taking backup?
well if you do make a backup, the chances of losing data are approximately zero
so, installing linux without backing up is clearly more risky than installing with backing up
If you don't know what you're doing, the chance that Arch will be in an unbootable state is pretty high. (Arch fans will always argue with this, but they know what they're doing.) That doesn't mean you'll permanently lose data, but I would absolutely not experiment on a drive with data you care about. Use a VM and/or back up your data.
I really struggle with disliking Arch because of the effect the user base has on newbies entering the Linux space.
the measure of skill with Linux should be how long you've had a publicly exposed service remain up, not how much time you wasted configuring your font manually on install.
I dont know if I'm alone in this but when I think of an arch user, I think of a Linux newb trying to pretend they are experienced.
Granted there is nothing wrong with being a newb, we all started that way. But the arch variety is particularly annoying
very snowflakish to be Arch user π
https://www.geekersdigest.com/updated-list-of-linux-distributions-with-long-term-support-lts/ it is better time investment committing to smth with having basis with LTS support.
Which in... average today... smth Debian/Ubuntu derived is the best choice
due to its popularity for servers and containers
and usability for desktops at the same time
yes, at some point the average new linux user is no longer someone with system admin dreams but of custom desktop dreams. Which I guess that is okay, whatever you want to do with your system I guess. But I cannot respect it when these people act like they are the elites or something
never encountered such linux users yet tbh.
i rarely encounter fellow linux users in the first place though
in general, if we are both linux users (and not in WSL), that's already good and rare encounter π
its mostly kids from r/unixporn (unfortunate name but that is what the name is)
but yeah it is true, whatever gets them into linux is good
CentOS on the list π. Immediately after I set up my home server on it, RH announced the change.
Guys I need help, I recently had a dual boot of Windows 10 and Ubuntu.
Then I reinstall Ubuntu but in the process the Grub menu fails to install on multiple occasions.
Problem 1: I can nolonger see the Grub menu when I'm booting.
Problem 2: I can neither boot into either os directly.
For the Ubuntu I always have to boot from efi file then get stuck in the Grub where I have to manually boot.
When I finally boot I try to fix the problem but on restart it happens again and I have to repeat the process again.
Meanwhile Windows is still intact but I can't access it.
This might help https://paste.pythondiscord.com/XO3Q
!rule 10 please write answers yourself, or don't answer at all
Lol, this is while I'll never ever again attempt dual boot. If disabling windows "secure boot" is an option, try that
Any distros to recommand ?
Ubuntu has a lot of stuff I don't care about, I can't be bothered to configure an Arch Linux and I've heards Debian packages are really out of date
i am a fan of Kubuntu. Stable ecosystem of everything easy to install.
With KDE plasma interface, that is "familiarly comfortable" to me, with taskbar at bottom, multiwindow terminal, ability to putt stuff at desktop wallpaper and etc
As DevOps engineer/backend dev, fully satisfied.
As same Ubuntu/Debian stuff is the best stable choice for servers and containers
Ubuntu is my default choice but I don't want all the games, all the useless apps, etc
I've looked for the minimal image but apparently this isn't a thing anymore
Ubuntu is the first supported choice among backend/infra tools.
You could looks of course for other choices https://docs.docker.com/engine/install/
But choices are kind of slim for smth that supports both amd64 and arm64
gotcha
I've made a fedora key I'm gonna give it a try
it's been at least a decade since I haven't tried fedora
You can install the Server image and then add whatever GUI you want. Fedora is also worth checking out though
Thanks I'll definitely try it out.
I just learned you can hide tk.notebook tabs. This changes UI development for me lmao. No more top levels or new tk.Tk() windows!
Hey folks, please feel free to redirect me if this ainβt the right channel, but hoping someone could help me or point me in the right direction?
Iβve got an altinstall of Python3.11.6 installed from source, on Ubuntu, but Iβm having issues with it importing modules .. for example ModuleNotFoundError: No Module Named _sqlite3
This seems to be for any c based input _etc
Important note, everything has to be installed from source, no package/software manager or pip.
some modules, like _sqlite3, are optional, and compilation succeeds even if those modules can't be compiled. When you build CPython, it prints out a report of which standard library modules failed to build, or failed to be imported after building. Most likely you're missing the build dependencies for some of those modules
, see https://devguide.python.org/getting-started/setup-building/#build-dependencies (especially the part with "If you want to build all optional modules")
These instructions cover how to get a working copy of the source code and a compiled version of the CPython interpreter (CPython is the version of Python available from https://www.python.org/). It...
You might want to try pyenv or asdf
in docker how cotaniners can see each other without editing /etc/hosts
by see i mean connect using the hostname
Yes they can adress each other by docker assigned hostnamed automatically
this will work as long as they are in the same Docker Network of type bridge at least
this is done automatically for services in Docker Compose. Same containers in docker-compose are assigned to same network, and they can address each other by service names
is it some docker magic
or can i replicate that somehow with servers
at the level of just Docker, it works at a single server only within same Docker Network bridge.
But, u can learn container scheduling systems which are meant to use "docker" across multiple servers, then u will have it replicated across multiple servers. Kubernetes is best choice for that today. (There are lazy self hosted choices for that like microk8s if u wish, but managed kubernetes is preferable)
setting up kubernetes is too much work
adding the hostname to /etc/hosts works alright
i would have just used DNS provider for that (if i wished avoiding kubernetes)
As they can be easily programmatically controlled via terraform as a code
then i would need assign only single record for same service
how would a dns provider work with in a vcn
i only want the servers to see each other inside a private network
even if u use private network, nobody forbids u still asigning those private IPs to your domain via dns provider.
Those IP will just work only for services being able to access this private network. that's it
DNS records will be public => but working only for services able to access private network
didn't know you could assing private ips
DNS is a simple service, that translates domain to list of IPs to anyone who will query it
it is not sensitive to IPs are publicly accessable or not (as long as u use simple DNS, and not some CDN/auth powered thing from Cloudflare, if u use Cloudflare u need to use it in "Proxy" mode directly then)
i'll look into that
i have to manage few servers so editing host files got annoying
and i was already looking at terraform to automate it
thank you for your information
If a bridge network is acceptable, that's probably easiest: https://medium.com/@augustineozor/understanding-docker-bridge-network-6e499da50f65
Waydroid is possibly the way to go, depending on what you need it for: https://waydro.id/
Waydroid - Android in a Linux container
not a "full" emulator
sadly I'm not running wayland π¦
apparently there's tons of problems with between wayland and nvidia these days
Maybe you could throw this in a virtual machine, not as nice though. I did it once a long while back: https://www.android-x86.org/
Android-x86 is an Android Open Source Project licensed under Apache Public License 2.0. Some components are licensed under GNU General Public License (GPL) 2.0 or later.
alr
thank you
I guess I'll just reboot and use WSA for now
until I can run waydroid
I don't know if this is the proper channel
I'm looking for ressources about running a (public) server that runs all its app in docker container
technically #tools-and-devops but this channel is okay too
I'll ask there too, ty
don't ask everywhere
ask in a single place
ergh... lets continue in #tools-and-devops then
Hey folks - dont know if this is offtopic, however I have a question that I cant really find an answer to. I am cloning my private github repo on a new machine using a personal access token / however when I then make changes how do I then update the local repo? Fetch and pull doesnt seem to work
Are you making changes on Github webgui and want to fetch it to your local clone?
After a clone git fetch should work automatically. What's the output of git remote -v?
Yeah exactly
I actually just ended up deleting the folder and redownloading it
recloning*
I'm lost
I need to write on serial throught a usb port. How do I know on which /dev/ to write ?
Does ubuntu reset the firewall after reboot
is my cloud provider doing that
no, Ubuntu does not reset the firewall after reboot
Looks like you need to run this command to save the changes permanently
iptables-save > /etc/iptables/rules.v4
Hi I'm back again, Istruggle to find people to answer my never ending questions.
There's this app compatible with LDAP. I use OpenID. Are OpenID and LDAP compatible ?
what do you mean by "compatible"?
I don't understand either well, but to me they solve fairly different problems, and aren't comparable, the way that, say, "egg salad" and "Wendy's" aren't comparable
I see
iiuc, LDAP is something that giant and old companies use for internal auth; OpenID is something that web sites use
they're similar in that they're both insanely complex, and I've never understood either π
hello I am not sure if it is the right place but I intend to leave windows behind and start using linux. Then I will leave google aswell and focus on its alternatives. The start will be with linux installation into my computer alongside windows 10 so that I can keep using windows until I get used to linux interface.
I would like to get some advices and ticks on this issue.
My main reason to write this is this.
in the picture you see my notebooks hardware. Add 256gb hdd to that and intel graphics.
Which linux should I install?
hello I am not sure if it is the right place but I intend to leave windows behind and start using linux.
ππ₯³
in the picture you see my notebooks hardware. Add 256gb hdd to that and intel graphics.
Which linux should I install?
Pretty much any Linux will work, depends on your goals though. I recommend sticking with Ubuntu family for user friendliness though.
U could try going with Kubuntu. I use it as favorite
https://www.maketecheasier.com/configure-zram-ubuntu/
My advice installing Zram to double your ram memory.
Also get SSD when u can. HDD in 2024 is rather meh
U can survive with just 250gb storage drive on Linux. I lived two years like that
But keep in mind ncdu program usage. It is folder traversing easy program that prints size of folders in depth, with sort desc way. For every folder navigation u do in real time.
Very helpful to eliminate extra bloat and keeping yourself within 250gb
Still, get 250ssd if u can though.
@wise forge
I wrote wrongly, 256gb SSD + 1TB HDD so I am good I suppose.
I am a physics student, I know that most of the computers on CERN etc or any computer that is used for scientific purposes uses some form of linux, I want to dig deeper into that. Other than this I think microsoft and apple really limits our experience of the actual technology, I want to explore these things.
I am an elementaryish level python user and I also want to improve myself in these areas up to a level that I can work as a freelance dev and designer.
I was checking on different versions of linux and elementaryOS and Ubuntu looks quite attractive actually.
In my university, our pc lab computers all have ubuntu and they are the joy, seriously.
Then stick with Ubuntu family. Very novice friendly and everywhere supported for easy app installs.
Just pick your GUI choice for Ubuntu.
Default Gnome (Ubuntu)
KDE plasma (Kubuntu)
XFCE (Xubuntu)
Or Lubuntu
Or other choices
Recommending installing LTS choices only. 22.04 is still good choice i guess, but 24.04 is already released and may be a point to go with it (a bit too fresh for my taste though)
If I am not mistaken ubuntu is not for the real actual programmer thingy right? There must be a version of Linux that you start with a kernel and build everything from scratch π
:/ if you are masochist.
u can be as well Arch user then.
i am backend dev / devops engineer professionally last 4-5 years. I just stick with Kubuntu. I enjoy Linux for least amount of effort to do stuff
that i am Linux user is not meaning i like having hard time, quite the opposite
i chose linux because it is easier to do my job with it
i have enough problems to keep up and learn all the languages and tech for my work as it is
I see your approach sounds logical, okay I am gonna try kubuntu first thanks for your help π
I was again mistaken, my ssd is 120gb not 256 and this totally defeats my purpose of installing an another system to my computer. Maybe I'll use the hdd part for linux at the beginning, but that wouldn't be more robust than this win10 in this case
Linux can work on 120gb pretty fine too
i admit you are going to be a bit more tighter placed, but it is still possible
i use a lot of space only because i.... full time work across hundreds of repositories, building docker images and watching movies from linux too
As long as you are doing less than that => you are going to still fit
Go with SSD π
oh you are saying partite 1tb hdd and transfer win10 to hdd and put linux into ssd right?
um. u having a single SSD for both windows and linux? ergh. yeah i guess.
Moving Linux to be a single owner of SSD would be nice
that will also encourage your transition to linux in general (since when u switch to Windows, u will face speeds of HDD) π
Ideally probably u should mount your /home folder to HDD for linux
because having home at 120gb sized disk is rather small. it can work, but small
and in this case we both agree that 120gb won't be enough for both of them right? because ubuntu says atleast 32gb and my installed win10 already using 70gb already
yeah... it does take space if u are active os user
having 120gb dedicated to Linux entirely is preference
together with allocated HDD space for /home stuff, it will be fully fledged working environment for many years
while using a lot of heavy stuff
okay I'll first figure out a way to protect my data then I will divide that 1TB for system instalments and stuff.
What do people think of Tuxedo notebooks/laptops? They come with Linux, options between their own custom distro and Ubuntu
I dont have one but would not buy one because i have to play with a laptop keys and make sure the trackpad does not interfere like transporting my pointer becuase my thumb touches it. Also does clicking right left and center fell ok with the trackpad. But If they fill your spec then might be good. But I think that laptop is mostly about form factor rather than function. Keyboard and screen are huge. The IBM nipple vs trackpad (nipple is hard to give up). Brightness of screen measured in NITS. sunlight working needs at least 350 nits. lightness vs battery life.
many Laptops do not publish the NITS spec (grrr)
Personally i cant wait for Snapdragon Laptops to come into the frey, which are calmed to be 3 times more efficient than Intel/AMD power hungry CPUs (ie x86 vs arm)
Thank you @neat jasper . I'm not entirely sure what spec I'm after to be honest, whether to go for longer battery life or for more CPU/GPU processing power. It would be for personal use, including data projects, so maybe I should give myself room to grow with GPU. π€
NP, If you want one right now for anything but gaming (for example programming with dockers) , consider your working conditions the most (sunlight limits your choice with NITS, so go big NITS) . If you are using a lot of docker images they take up a lot disk so a 1 TB ssd or one that you can open and upgrade the NVMe. I want to get the LG gram but i think its a solder job to replace the ssd. Opening a laptop to upgrade something is brilliant today as someone might have a youtube vid to guide you.
How do I get this to execute on Linux? Whether I use env or just bin/python3 it gives me errors such as no such file or dirtectory
python3 path_to_script
I don't want to do that
That's why I put the shebang
to skip that part
then call with shebang.
just name_of_script if it is in echo $PATH
or relative or absolute path to script, if not at $PATH locations
file should be executable
sudo chmod a+x path_to_file to make it executable for everyone
I... am calling with shebang that's what I put in
anyways I fixed it
I installed dos2unix and converted it from w/e Windows was to Linux. Annoying
Probably this.
so basically I ssh into a server and
Its like this:
[user_name@lab_name]$ myCommands
how can I change it so it is instead
[new_stuff]$ myCommands
well i think the point of the [user@name] is to make it clear what you are on
its probably changeable though let me see
like ideally I just wanna change the whole thing to something like [fluffy]$ my commands
cuz its much shorter and if I wanna share others my commands I don't have to keep on removing user@name
so im not very familiar with SSH itself but it looksl ike you might be able to edit your ./bashrc file
~/.bashrc
got it
well
ok so you could edit the PS1 variable which would affect your entire terminals thingy
so your entire terminal would be [fluffy]$ but that includes ssh (if you use the same terminal for ssh and normal stuff)
aight so I vim in bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
fi
export PATH
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
fi
unset rc
what do I edit : 0
how much do you know about linux