#unix

1 messages · Page 4 of 1

dapper musk
#

i like it for it's logical and sensible syntax

fickle granite
#

me too!

#

back in the day I used to use Scheme for hobby projects

dapper musk
#

i am trying to do it now with racket and guile(because of guix)

fickle granite
#

heh, I followed guile for a long time. There used to be an effort to retrofit guile into emacs, but iirc that fizzled

dapper musk
#

i stumbled upon it (because it was in guix repos and i was curious) however i did't play long with it.

main olive
#

best way to run unix/linux on windows is ubuntu?

#

nvm apparently its WSL

#

oh, WSL installs Ubuntu

#

anyone can help me set up a WSL / Ubuntu / Linux? I tried
wsl --install and it installed on my hard drive, but running WSL from the start menu does nothing and I cannot find the Ubuntu install

#

tried as admin, get this:

#

this is right after restarting

#

i got it. had to enable virtualization of CPU

fast drum
#

cries in lua neovim

dapper musk
#

tbh Lua isn't that bad, it is just error-prone + it implements quite annoying "feature" that is supposed to make it easier while it does quite the opposite ie indexing from 1

gilded saffron
#

whats the most popular python linux?

warped nimbus
cloud wasp
#

Hi, I have a question. I'm trying to use the linux tool perf on my machine to measure the cache stats (about L1, L2, LLC cache stats), but I have a problem. The tool perf only applies to a x86 linux machine. I use wsl2, and, while having installed it (manually from a git repo), the stats I want to measure are not supported, as the wsl2 is being identified as a VM. Does anyone know a way to use it on a Windows machine, maybe a vs code extension (as it has a huge variety), or a third party app, or something similar in order to measure these stats? Thanking you for your time!

eager badger
gilded saffron
warped nimbus
gilded saffron
#

right, curious which linux distro has the highest % of python code used for its OS

fickle granite
#

depends how you define "OS"

#

the only bits of python I'd expect to find in any distro would be the package manager, and I can't think offhand of any distro that uses python for its package manager

lavish storm
fickle granite
#

"shipping with python" is very different from "used for its OS"

lavish storm
scarlet steeple
#

This is a rather difficult question, it depends on where your definition of OS starts and ends. There are definitely distros out there that use python for programs that are shipped with the distro itself, but do they count as being part of the OS?

#

For example, Arch Linux has a new official installer made in Python. Does that count? Consider that it isn't the only installer (there are many unofficial ones) and you don't need an installer for Arch especially (it encourages you to install it the classic way so that you learn what goes into it)

scarlet steeple
toxic acorn
#

does anyone use systemd sockets to run their website? I'm going to deploy a website soon and I'm debating on whether to use a systemd socket to only run the website when someone accesses it, versus just using a regular systemd service to always keep it on. Are there any cons to using a systemd socket?

fickle granite
#

I would imagine the latency for that first request would be high, if your web service has to spin up

toxic acorn
#

hmm that's true

fickle granite
#

what's the benefit you expect to get from using a socket, instead of just keeping it up all the time?

toxic acorn
#

the vm I'm using doesn't have a lot of resources, so the socket activation could potentially save those resources until they're needed

#

not 100% sure if its worth the effort tho

fickle granite
#

I'd be surprised

#

if your web server is just sitting there doing nothing, the only resource it's gonna use is RAM

#

and it's not gonna use more when it's idle than it'd need when it spins up

#

if you don't mind bending your brain, you could consider turning your web service into "lambda functions", as AWS calls them, or whatever the Azure or Google Cloud equivalents are. Those use no resources whatever when idle, and spin up on first contact; the infrastructure takes care of the spinning up and down. On the other hand, it's a really unusual style of programming. Disclaimer: I've either never done it, or done it so long ago that I no longer remember the details

toxic acorn
#

that is certainly an idea yea

#

just simply using one of those serverless services to run the website

#

there are a few timers that would have to be run for the site tho

fickle granite
#

if you actually wanted to use lambda functions, then you could probably use "cloudwatch events" as your timers, and have them trigger some lambda function or other to do ... whatever you need

hexed raven
#

Hi all, I have a case where my FileRotatingHandler is being sent to the journal (service running with systemd). This is not the desired result (only the StreamHandler should be sent to the journal). Any ideas on how to properly configure to avoid seeing the FileHandler on the stdout?

flat echo
#

I am trying to install python3.9 with "loadable sqlite extensions." I accidentally installed it before sqlite-devel. Now I am trying to reinstall it. I run sudo ./configure --enable-optimizations --enable-loadable-sqlite-extensions then sudo make and get this error: ```
Could not import runpy module
Traceback (most recent call last):
File "/home/adankert/Python-3.9.13/Lib/runpy.py", line 15, in <module>
import importlib.util
File "/home/adankert/Python-3.9.13/Lib/importlib/util.py", line 2, in <module>
from . import abc
File "/home/adankert/Python-3.9.13/Lib/importlib/abc.py", line 17, in <module>
from typing import Protocol, runtime_checkable
File "/home/adankert/Python-3.9.13/Lib/typing.py", line 21, in <module>
import collections
SystemError: <built-in function compile> returned NULL without setting an error
generate-posix-vars failed
make[1]: *** [pybuilddir.txt] Error 1
make[1]: Leaving directory `/home/adankert/Python-3.9.13'
make: *** [profile-opt] Error 2

opaque ginkgo
#

example?

graceful dust
#

oi

#

ello

#

so basically, i have an issue on linux’s apt install python3-azure.
if anyone can help me, that’d be cool.

#

it’s stuck here

#

also this is debian, but this is the closest channel i can find to that

lavish storm
#

are you on stable?

graceful dust
#

i mean it’s a debian based system, parrot os

#

but i eventually somewhat fixed it using dpkg’s --purge --force-remove-reinstreq stuff

quiet ivy
#

Hi,
I think this could be the best section to ask this query.
How can we store a user input with escape sequence in python?

#

I am trying something like this:

>>> dt = input("Enter: ")
Enter: \x03\x12
>>> dt + "\x00"
'\\x03\\x12\x00'
>>> dt
'\\x03\\x12'
#

Just like the last null byte went, I need the result for \x03\x12

deft lodge
#

git push permission denied 403 did anyone had this problem before?

nimble notch
#

Someone guide me with the steps to install Linux pls

light gorge
#

You can sort by most downloaded for example or just choose Ubuntu 😜

nimble notch
#

Ok I'll try this first
Thanks man

heavy scroll
#

Welp i messed up, I just killed ibus-daemon as it was taking up 90% of the cpu for some reason than updated the distro (using kubuntu) and restarted

#

Now that im logging in the entire login is different (i would assume because i killed the main interface) and I cant login

heavy scroll
#

This is the ui i ended up on but am unable to login

wise forge
#

And just beautiful

heavy scroll
#

Yea kubuntu is fantastic as long as you dont mess with stuff you are not supposed

wise forge
#

In any Linux u can self destruct OS if wishing

heavy scroll
#

Yea true

true heath
#

hey is anyone here familiar with firewalld, specifically around trying to allow one source/IP on http port 80 and drop all other requests?

wise forge
true heath
flat echo
#

TRying to understand how installing python on centOS works: ```

  1. wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
  2. tar -xvf Python-3.9.13.tgz
  3. cd Python-3.9.13
  4. ./configure --enable-optimizations --enable-loadable-sqlite-extensions
  5. make
  6. make install
    ``` What is happening during 'make'? What is happening during make install and how would it be different than make altinstall?
wise forge
#

Inside of image u can use normal Debian or something

#

And to run it at centos without configuration problems

flat echo
# wise forge

That isn't an option for now time being. Is using python on centOS not very common?

slender garden
#

@drowsy seal tinha q ser o xasdo, bloqueou os #memes

drowsy seal
#

Hm?

slender garden
#

no blox

drowsy seal
#

Não achei que iria achar alguém do bf aqui.

slender garden
#

💀

lavish storm
#

!rule 4

shy yokeBOT
#

4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.

night dove
#

hello, These 3 empty files are being created in my home directory, They are created every time I delete them, probably after a reboot. I've no idea where are these coming from. It'd be great If anyone could help me regarding this 😃

daring robin
#

I am just wondering if i can get a quick help on bash script?

hushed quail
daring robin
# hushed quail whats the problem?
#!/bin/bash

# This script will run the three programs that play the game and evaluate the accuracy of the programs
interval=60*1   # Set the interval for evaluating accuracy to 1 hour
num_hours=5         # Set the number of hours to run the program

# Start the program that will play  both single play and parallel play for given duration
# start the single_play in the background
python3 $PWD/python2/single/single_self_play.py &

# start the parallel_play in the background
python3 $PWD/python2/parallel/jax_async_play.py &

# Start the program that will evaluate the accuracy of the programs (run every hour)
counter=0 # set the counter to 0

while [ $counter -lt $num_hours ]
do
    echo "Starting evaluation program $counter"
    python3 $PWD/python2/evaluations/eval_programs.py & # start the evaluation program in the background
    sleep $interval # wait for the interval
    counter=$((counter+1)) # increment the counter
done

# Kill the programs that are running in the background
killall python3
#

I have this bash command

#

which is supposed to run single_self_play, jax_async_play, and then another eval_program every time interval defined by interval variable

#

Everything seems to be working fine, and I get this log in my terminal

#
Starting evaluation program 0
usage: sleep seconds
Starting evaluation program 1
usage: sleep seconds
Starting evaluation program 2
usage: sleep seconds
Starting evaluation program 3
usage: sleep seconds
Starting evaluation program 4
usage: sleep seconds
run_play_and_eval.sh: line 26:  9778 Terminated: 15          python3 $PWD/python2/single/single_self_play.py
run_play_and_eval.sh: line 26:  9779 Terminated: 15          python3 $PWD/python2/parallel/jax_async_play.py
run_play_and_eval.sh: line 26:  9780 Terminated: 15          python3 $PWD/python2/evaluations/eval_programs.py
run_play_and_eval.sh: line 26:  9782 Terminated: 15          python3 $PWD/python2/evaluations/eval_programs.py
run_play_and_eval.sh: line 26:  9784 Terminated: 15          python3 $PWD/python2/evaluations/eval_programs.py
run_play_and_eval.sh: line 26:  9786 Terminated: 15          python3 $PWD/python2/evaluations/eval_programs.py
run_play_and_eval.sh: line 26:  9788 Terminated: 15          python3 $PWD/python2/evaluations/eval_programs.py
#

whcih I am assumingg is working as expected.

#

But i dont understand if the programs are running in the background?

#

none of the programs seems to be running

hushed quail
#

how do u execute them in the background?

#

i don't see any way u r doing to execute them in the background

daring robin
#

hmm interesting, wouldn't bash automatically run the scripts on background since I am using & at the end of the string?

hushed quail
#

oh, didn't see that

daring robin
#

or would it be sequential, like it would wait till itt would finish the first program?

hushed quail
#

why are you putting the code in sleep in between?

daring robin
#

oh i want that program to be run in certain intervals

#

say for example an hour, I justt used 60*1 just to test

#

oh i think i found the issue lol

#

it was probably the & at the end of the third python script

hushed quail
#

what does that mean?

daring robin
#
python3 $PWD/python2/evaluations/eval_programs.py & 
hushed quail
#

i mean i know that

#

but how does it cause the issue?

daring robin
#

in this line i was using &, so i gues it was executing the rest of the script too,

hushed quail
#

but still the script should sleep for 60 seconds before running the next iteration

daring robin
#

hmmm

hushed quail
#

i think you have to put the sleep statement below the incrementing statement

daring robin
#

hmm i just tried to interval with 60 instead of doing 60*1, and its sleeping for a minute

hushed quail
#

cuz u can just write these 2 lines

    python3 $PWD/python2/evaluations/eval_programs.py & # start the evaluation program in the background
    sleep $interval # wait for the interval

into like this

    python3 $PWD/python2/evaluations/eval_programs.py & sleep $interval

both does the same job

#

cuz bash still treats the python3 line as incompleted (i guess)

#

so it just adds the next sleep statement with that line, so that both those lines are now getting executed concurrently in the background

#

thats just my assumption

#

as i've tried something related to that in my pc

daring robin
#

lett me try that quickly

hushed quail
#

nope, i was wrong, nvm my bad

daring robin
#

yup didnt work in my end too

#

so ig the issue was with interval

#

I used interval=60, instead of using operators like interval=60*1

#

thats so interesting tho

#

Anyways thank you so much for your help @hushed quail 🙂

worthy nacelle
#

hi

#

Im

#

Newbie

#

Here

#

i

#

want

#

to

#

be

#

a hacker

#

what

#

i

#

need

#

to

#

do

#

if

#

i

#

have

#

just

#

got

#

start

sleek swan
# worthy nacelle start

First of all please write ur words on the same line. Secondly, start with learning python and the Ubuntu terminal(by using a virtual machine)

light gorge
main olive
#

does the the .htaccess file(s) or the Apache config files you are editing have the correct permissions to be read and executed by the Apache server?

silk herald
supple jacinth
frigid jacinth
#

OK so for my second semester in CS I'm taking a Linux course--only, I've never so much as approached Linux. I learn best by doing, so I wanna make one of my computer's primary OS Linux--but is this gonna mess up my existing suite of windows programs? From a software user standpoint, I have gone with windows primarily because its the most widely supported by programs, with Linux am I gonna run into the issue of suddenly finding a ton of software I can't use?

toxic acorn
frigid jacinth
#

this is my recreational computer, so primarily gaming of various flavors, plus some game modding when the mood strikes.

toxic acorn
#

steam has proton, which will work with some games

#

haven't looked into how other game stores work

#

if you're lucky, you can find a linux native version of a game you play

#

otherwise, the experience could range from flipping the proton switch on a game and it just working, to moderate amounts of tinkering, to your game being impossible to play

#

or if it works, maybe some performance loss, which would prob require some tinkering to get the performance back if its even possible

frigid jacinth
#

I did find a gaming section on the fedora discord, and it has some tools I can use but I'm definitely not going to go full switch--maybe dual boot for a while. Wish you could kinda tab back and forth between them.

toxic acorn
#

its easier to try out different distros that way

#

and you don't risk potentially blowing up your windows install

frigid jacinth
toxic acorn
wise forge
#

some programms can be installed for all OSes, some programms work only for Linux, for Windows or for macOS :/

#

different OSes have different ecosystems of programs behind them with some intersection in between

ember quiver
#

You can even run a Linux desktop in a Docker container, but VirtualBox is probably the easiest way to start

#

I typically have Windows as my primary OS but spend at least 90% of my time in Linux.... You can have RDP connected to a Linux VM across multiple monitors on one Desktop and then just press CTRL + ALT + HOME to foreground windows and then CTRL + WIN + ARROW to go to a Windows desktop.... then CTRL + WIN + ARROW again and your back in the Linux world. Or you can have Linux on one screen and Windows on another seamlessly use both at the same time

old bane
#

@queen jacinth Acer: F2 or DEL
ASUS: F2 or Del
Dell: F2 or F12
HP: ESC or F10
Lenovo: F2 or Fn + F2
Lenovo Desktops: F1
Lenovo ThinkPads: Enter + F1.
MSI: DEL for motherboards and PCs
Microsoft Surface Tablets: Press and hold the volume-up button.
Origin PC: F2
Samsung: F2
Sony: F1, F2, or F3
Toshiba: F2

#

do this when starting up computer

queen jacinth
#

what

old bane
#

press that key

#

to enter bios

queen jacinth
#

A usb doesnt have a bios

#

usb stick

old bane
# queen jacinth usb stick

LINUX MINT BOOTABLE USB DRIVE QUICK AND EASY GUIDE // Would you like to have an Operating System that you can take with you anywhere you go? If yes, then you should try this LINUX-based USB drive.

In this video, we will learn how to create a portable bootable LINUX Mint USB drive step by step. There are a few reasons why you might want to try i...

▶ Play video
old bane
#

when you switch on yor pc

#

what happens

queen jacinth
#

Do I need a working os for that

old bane
#

NOPE

#

thats what im saying

queen jacinth
#

k

old bane
#

the motherboard has it implemented

queen jacinth
#

but my usb is corrupted rn

#

is it gonna clear the volume

#

you bitch 💀💀💀💀

#

@old bane

old bane
queen jacinth
#

I have it

#

But you lied to me

old bane
#

any working computers?

queen jacinth
#

no

#

only a chromebook

old bane
#

igtg goodnight. Go join another discord server for PC recovery

#

this is not the one you need to be looking for help in

frigid jacinth
queen jacinth
#

not really because they let me ban evade

gilded saffron
#

Anyone know how to control Android OS with python? like to automate stuff

main olive
#

What to automate ?

gilded saffron
#

like app texting, scrolling, clicking, anything really

hexed vigil
#

hi is someone here good with sed?

lavish storm
#

Don’t ask to ask 🙂

river raptor
#

does someone know why my ping gets so high when downloading a torrent? (im not downloading something bad with torrents trust me)

#

from the 16th i paused my download

#

also the download is slow

river raptor
#

okay nevermind i used my mobile data instead of wifi

#

and it was ennded

#

so i only had slow

#

64kb/s

#

kbit/s*

ember quiver
#

or just ping your gateway to see if that's where the problem is

river raptor
#

and it got expired

#

so it went slower

main olive
#

best linux distro for rtx/cuda support?

humble falcon
#

The distro doesn't rlly affect what drivers you can install

main olive
agile pelican
#

Dumb question since my brain is not working today I have this command in a script (crontab -l 2>/dev/null; echo "*/5 * * * * /bin/bash -c '/usr/bin/python3 $DIR/autostop.py --time $IDLE_TIME | tee -a /home/ec2-user/SageMaker/auto-stop-idle.log'") | crontab -`)

would changing it to (crontab -l 2>/dev/null; echo "@reboot */5 * * * * /bin/bash -c '/usr/bin/python3 $DIR/autostop.py --time $IDLE_TIME | tee -a /home/ec2-user/SageMaker/auto-stop-idle.log'") | crontab -`) make it run at every reboot?

agile pelican
main olive
#

linux file managers look too cartoony

#

linux mint in general looks kinda cartoony

#

y'all got a better file manager

#

other than the terminal 💀

agile pelican
humble falcon
midnight osprey
#

I have no idea about linux mint, never tried that one...

main olive
#

it should be the same

real vapor
#

I've sworn by ranger as a terminal file browser, it's great

fallow tusk
#

What is Mint's default file manager, anyway? (I have a Mint box, but it's running qtile, so don't have the usual gui menus)

main olive
fallow tusk
#

I like ls, personally.

#

coupled with find

obtuse fog
#

Hi everyone, I want learn Linux kernel module programming
Can someone help me?

ashen sail
#

is anyone here willing to help me with emacs for 10 mins or so?

ember quiver
nimble notch
#

Gonna try linux for the 1st time. I'm very excited to see how it works😎

barren patrol
#

people recommend arch but honestly its only good if you're really big into system DIY

nimble notch
fallow tusk
#

Mint, Ubuntu, any of the distros that provide plenty of hand-holding GUIness ;)

#

There are even distros that attempt to be more Windows-y or Mac-y

wise forge
fallow tusk
#

I tend to go with Lubuntu, just because it's a little more lightweight, but yes, I like KDE, too.

#

Arch is great if you want to learn how a Linux is built from relatively bare bones. It has an extremely good wiki with lots of documentation, including an excellent set of installation instructions. However, even I have got lost when following the instructions because I glossed over what ended up being an important step (and I've run through the installation instructions many times :D)

#

If you want an even more bare bones "build Linux from the ground up", there's LFS - Linux From Scratch. I've never managed to get through to having a fully running system (either due to time or frustration or just forgetting I was in the middle of building it!)

#

Definitely a good read if you're into understanding it at the OS level

wise forge
# fallow tusk Arch is great if you want to learn how a Linux is built from relatively bare bon...

No point to learn something not used as servers and LTS
https://www.geekersdigest.com/updated-list-of-linux-distributions-with-long-term-support-lts/
Anything learning outside of this list is hurting your career.
Kubuntu is just Ubuntu with different GUI, therefore within list

We have put together a quick and updated overview of Linux distributions with Long Term Support (LTS) and Extended LTS.

#

Sure, may be there is point to learn more bare bones experience if u a embedded Dev

#

But for web dev I don't see point

fallow tusk
#

There was no indication of the rationale for learning Linux, so why are you making any sort of assumption?

wise forge
#

Well, we are in Python server where Linux is used in 98% cases only for web dev

fallow tusk
#

Personally I use it as a general desktop and as a development environment. I don't need something to be used as a server (although I have done in the past).

wise forge
#

Huh. U use it as development environment for what exactly platform targets / application types

fallow tusk
#

For Python it's mostly auxiliary scripts. For C/C++ it's a parser

wise forge
#

Parser? pithink
Will it run at Linux, or u cross compile it for other OSes?

fallow tusk
#

It's not cross-compiled. The code gets built on both Windows and Linux

wise forge
#

I needed to make program with parsing functionality for friend at Windows.
Ended up writing in Golang. Perfect low level enough language, and I was able developing from Linux with easily cross compiling to Windows

fallow tusk
#

I seldom touch the Windows stuff, though. In fact, few devs do.

wise forge
#

Sure. I touch Windows usually only for gaming 😉

woeful dome
#

I was worried that I won't be able to play on linux, but now that I can't buy any games it's totally not an issue 😄

wise forge
woeful dome
#

mmm, shady ahh websites

wise forge
# woeful dome mmm, shady ahh websites

I prefer to use it over my new cards... Because it allows me to top up in... Country origin currency for which steam prices continue to be extremely cheap. (Euro prices suck)
Makes wonder how they do it though

wise forge
# river raptor Can you Share it with me

Clarification: this website is useful only for people of... my and opium puppy origin country. If u don't have account originally created in that country, it is useless for you.
U don't have signs showing u a from it

river raptor
#

What Country are you from

lavish storm
#

opium puppy origin
lemon_thinking

#

🇰🇵?

main olive
#

!e

shy yokeBOT
#
Missing required argument

code

#
Command Help

!eval [python_version] <code, ...>
Can also use: e

Run Python code and get the results.

This command supports multiple lines of code, including code wrapped inside a formatted code block. Code can be re-evaluated by editing the original message within 10 seconds and clicking the reaction that subsequently appears.

If multiple codeblocks are in a message, all of them will be joined and evaluated, ignoring the text outside of them.

By default your code is run on Python's 3.11 beta release, to assist with testing. If you run into issues related to this Python version, you can request the bot to use Python 3.10 by specifying the python_version arg and setting it to 3.10.

We've done our best to make this sandboxed, but do let us know if you manage to find an issue with it!

main olive
#

yo. i wanna switch back to linux

#

what distro

wise forge
main olive
wise forge
main olive
#

i want an arch based distro because of pacman

#

and endeavour os is by far the best distro imo

#

it's really good

wise forge
#

Ubuntu is technically Debian based too.

prime magnet
#

I'm enjoying Linux Mint 🙂

weary chasm
#

Does someone use i3 i have problem

#

I install it on gnome fedora but i can't do anything in it i open it but i can't it opens but i can't do anything whole computer frezes

#

I fixt it

#

Is working

main olive
#

wow EndeavourOS is really nice

mortal jasper
#

Pop_OS is quite nice too.

lavish storm
#

All distros are nice ♥️

dapper musk
river raptor
pallid brook
#

What is the standard and common way of daemonizing python scripts?

summer trail
pallid brook
#

It seems to me like one of the many third-party solutions. Is it commonly used by python developers?

summer trail
pallid brook
#

Well, this demonize tool is also a dependency since it's not built in.

I was wondering if there may be some systemd approach to this problem.

summer trail
#

Possibly, at the cost of baking in a dependency on systemd 😄

pallid brook
#

Systemd is rapidly becoming a standard so it's barely a dependency nowadays. But technically you're right 🙂

summer trail
#

There's still holdouts, though, including distros whose distinguishing feature is that they refuse to use systemd. 🤷‍♀️

pallid brook
#

Looks like something old

summer trail
#

Seems abandoned at this point, but it's probably in decent shape anyway.

#

python-daemon has a decent number of releases as well, and seems actively maintained

pallid brook
#

Okay, I think I'll try systemd service. It seems like a pretty good and simple solution

nimble notch
#

What are the requirements needed for a pc to run kubuntu smoothly.🥲

wise forge
wise forge
nimble notch
#

Ty

pallid brook
pallid brook
#

Issue solved.

main olive
#

hello, how could i redirect fifo to programs stdin?

#

i already have written to fifo
how could i do something like python3 x.py < myfifo ?

pallid brook
#

Can't you open it as a file inside python script?..

dapper musk
stoic shell
#

Hi, I want to populate the input field of a terminal with something, how could I achieve this w/ python?

oblique lily
# wise forge Kubuntu 22.04 LTS 🙂

I love how well this OS works (especially the fractional scaling) but I hateeee the UI lol. It looks like a mobile phone mixed with Windows 10

stoic shell
#

I don't want to get a users input, I want to populate the input field w/ something for the user.

#

can subprocess do this?

lavish storm
#

what do you mean "input field"?

fallow tusk
#

(and from the Window Manager, too)

oblique lily
fallow tusk
#

Nothing. The different variants are just built to use the particular DE, afaik.

#

Kubuntu, Lubuntu, Xubuntu are all geared towards one or other DE

oblique lily
#

Just googled it and it looks like they have a couple different default applications as well, but yeah it's just configurable choices

fallow tusk
#

The apps are often tied to the DE - KDE has its own set of office apps, for example, built on the UI

oblique lily
#

I just started running Manjaro with Sway on my laptop, I suck at it compared to Ubuntu but the tiling windows are actually pretty neat. And that makes sense

fallow tusk
#

I don't know Sway, I take it it's a tiling WM. I use qtile, which is also a tiling WM, and really like it for dev work

slow pollen
#

Hello, any AI chatbot developer who can help me with a virtual assistant project in human resources?

real vapor
raw raptor
#

@spark mulch @hushed quail which volume should i choose

spark mulch
#

I'm guessing Volume 2; C. But I take no responsability for a broken system

raw raptor
#

Select the EFI volume by typing: sel vol Y where Y is the SYSTEM volume (this is almost always the EFI partition)

#

getting this error

raw raptor
hushed quail
raw raptor
#

idk which is the system volume

hushed quail
#

so its vol3, and pls confirm that u r working with the right disk
cuz anything may happen

hushed quail
#

vol3 has the word system straight to it

hushed quail
raw raptor
#

Ok

#

@hushed quail system reset showing

#

Pc is not booting

#

Broo

#

What happened

hushed quail
#

i always thought something's wrong gonna happen as u said that u need to do something with the system partition

raw raptor
#

Bro what should i do now

#

Nothing is happening

hushed quail
#

maybe give ur pc to a nearby service provider and let them solve ur problem

#

it has become a hardware problem rn i guess

#

and i should've said this before, never ask any problem related to boot menu firmware stuff in here

raw raptor
#

I solved it bro

stoic shell
#

Is there a way to populate the input field of a terminal with some python library? Maybe subproces? By input field I mean the where you type your commands. I want to execute a python script and have it populate the terminal with a command, BUT does not run it

raw raptor
#

@smoky snow

main olive
#

well, there's user password and root password
try both
maybe toggle your caps lock
did u just install a linux distro? from the DE and themes i think this is ubuntu

torpid igloo
#

does anyone here perchance know how to build pytorch for the 6700xt on ubuntu?

silk herald
quaint portal
#

hola

#

alguen de colombia

river raptor
#

!rule 4 @quaint portal

shy yokeBOT
#

4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.

fallow tusk
# quaint portal alguen de colombia

Y, si solo querias charlar, hay los canales offtopic…pero ahi tambien se debe hablar ingles.
(transl.) ||And, if you just wanted to chat there are the off-topic channels…but even there one should speak English.||

main olive
#

indeed

#

After that, you can use either blend, pacman, dnf, or apt in the same shell to install or remove packages, without any tricks.

long burrow
#

Just downloaded linux on my windows machine and trying to install from my requirements.txt

I'm getting lots of can't find version warnings. What's going on? e.g

ERROR: Could not find a version that satisfies the requirement Django==4.1 (from -r requirements.txt (line 11)) (from versions: ... 3.2.16) 

Is the versions available from linux different than those on windows?

toxic acorn
#

your python version is prob too old for django 4.1

tired anchor
#

Anyone on Linux machine with Wi-Fi and few free seconds? I need example iwgetid output but I am on Windows machine. Please replace your network name/MAC/IP with some examples.

dawn topaz
#

$ iwgetid
wlp1s0 ESSID:"mywifiSSID"

#

$ iwgetid -a
wlp1s0 Access Point/Cell: 45:32:01:EF:CD:AB

elfin oxide
#

My linux work computer is hooked up in a way, such that everthing under my home directory, /home/user, does not actually lie on the actual computer, but on some local server. My /home/user directory mounts to that server. All other folders /opt /usr etc. are stored on the actual computer. I currently have my virtual environment located at /home/user/.venv/env1 and this works. However, the server is sometimes overloaded, which causes python package imports to take forever, since all packages are located in the home directory and therefore on the server. I would like to create a virtual environment outside my home directory to avoid this problem. However, I am not sure which other place would be the best to place it. Any suggestions would be appreciated 🙂

ember quiver
elfin oxide
fallow tusk
#

/var would be another choice

main olive
#

hi all,
need some help with scp

#

i'm trying to transfer a local file onto a server, using scp. i'm running windows subshell for linux locally in admin mode. i use a command like:
scp filename.file serverinfo

#

and i get an error message about no matching host key type found

main olive
#

nvm got it

nimble notch
#

One of my frd was also experiencing this

violet wing
#

Good evening, everyone 🙂

I'm looking to switch from Windows 11 to a Linux Distribution on my laptop (Ryzen 7 4700U, Radeon Graphics ~2gb VRAM, 16gb RAM)

I've been looking at several distros including OpenSUSE, ZorinOS, EndeavourOS, Ubuntu, Manjaro (KDE), Fedora (KDE) and ElementaryOS.

Say I were to pick OpenSUSE: they have their Tumbleweed (rolling release) and their Leap (LTS) versions.

My question is basically: Why LTS over RR or vice versa?

It's going to be my daily driver for school work (university). I'm majoring in Computer Science, if it has any effect on my choice of distro 🙂

Thanks in advance 🙂

main olive
#

have u tried them on a VM?

fallow tusk
#

LTS doesn't change except for the odd security update; a rolling release will give you all the updates between the previous "stable" release and the next stable release as they happen (or at least as often as you ask it to run the updates). If you want something Windows-y, an LTS is probably the way to go. If you're looking to get all the latest and greatest cutting edge developments, a rolling release is the one to choose. (Although Windows does do its updates much more regularly nowadays, so is a bit more rolling release-y)

#

But, yes, I would attempt to install one in a VM and have a play. Grab the live ISO image, and start it up in VirtualBox (my preference, not the only option), and you can play with a "live" system before even attempting an install even onto a virtual hard drive. Doing an install on a VM will give you a testbed for trial and error before trying it on real hardware. If it goes wrong on the VM, you just delete the VM and start from scratch with minimal fuss

errant forge
#

Hey guys, for some reason chown doesn't work on a mounted drive

little bronze
ember quiver
#

^^^^ this, and also, what filesystem is the drive formatted with?

errant forge
#

Never mind

#

I was playing with disks and this happened lol

buoyant cedar
#

Nice

errant forge
#

Skill issue lol

ember quiver
errant forge
shy yokeBOT
#

:incoming_envelope: :ok_hand: applied mute to @main olive until <t:1675391271:f> (10 minutes) (reason: duplicates rule: sent 4 duplicated messages in 10s).

The <@&831776746206265384> have been alerted for review.

arctic oasis
# errant forge Skill issue lol

Did you fixed it?
It happened once with me after splitting a portion into 2 portions

You can fix it if you searched Google

Distro: kali-linux

errant forge
#

Nah, it turns out I f- my hard disk or something

arctic oasis
#

You couldn't fix it?

errant forge
#

I missed up the file system

#

I planning to buy ssd

arctic oasis
#

Do you need help with it?

#

The problem isn't about ssd or hdd

jolly depot
fallow tusk
#

The electrons, eh?

jolly depot
#

good idea

arctic oasis
#

ls
ls (hd0, msdos1)

ls (hd0, msdos5)

output ext2 (unix portion)

set boot=(hd0,msdos5)
set prefix=(hd0,msdos5)/boot/grub
insmod normal
normal

#After booting up
sudo update-grub
sudo grub-install /dev/sda
update-initramfs -U
update-grub

I think that's it

tiny fern
#

i have a question
i have a script in /etc/init.d

it gets executed each time machine boots up.

now if i do echo "test" in the script. where will the message get displayed or stored.

arctic oasis
#

Yes that's because it's like start up apps on Windows

#

It will be done as bash process

You can use exec-in-shell if you want to run it in your terminal

#

Btw which distro do you use?

fickle granite
tiny fern
#

what i did was.
i did echo "test" > /home/me/auditlog

so when i rebooted. the script got executed and i got the mssg in the file "auditlog"

arctic oasis
#

So basically you write the output to a file

tepid drift
#

how to change the permission of all executable files and folders to 700 and all non executable files to 600 in bash?

hard igloo
# errant forge

@errant forge bro I had the same issue i deleted the partition , before changing to the BIOS..... whatever i just had to download the new windows 11 in my pendrive.

errant forge
dapper musk
hard igloo
#

It's not in the rule so i guess I can help you https://youtu.be/xx2CFufykB0

Hi friends, I showed up in this video How to fix Grub error: no such partition Unknown File System.
Maybe, sometimes you are facing such a problem on your dual boot computer’s and laptop’s –
Like, "error : no such partition
Entering rescue mode
grub rescue
We've made a video before, for regarding this problem, but some users said that “Insmod N...

▶ Play video
errant forge
hard igloo
#

I deserve a raise @blissful cloud

atomic carbon
#

what do people tend to use to process svgs on ubuntu 20.04 lts?
librsvg and inkscape don't really work with the full range of svg I want

would also be nice if I could get ImageMagik to be able to use it for the python library wand

warped nimbus
atomic carbon
warped nimbus
# atomic carbon I want to render them from svg to png

Use a web browser in headless mode. There are command line arguments to specify which file to open, at what resolution, and to take a screenshot. I have had better results with Firefox, but Chromium can also work. I have noticed some inconsistencies between them regarding rendering typefaces. They're both not prefect, but overall they're pretty good about respecting even complex SVG code.

I've tied a bunch of ways: inkscape, librsvg, Illustrator, etc and found web browsers are the best by far.

shy yokeBOT
#

events/evergreen/other_assets/banner.svg?short_path=7bee9be line 14

firefox -headless -\-window-size=1920,1080 -\-screenshot 'file:///banner.svg'```
warped nimbus
#

Just replace -\- with --

slender grove
obtuse wyvern
#

Hi guys i had a problem with manjaro hibernation boot, how can anyone help me?

tulip dock
#

Is there a way to see the amount of memory used for caching per filesystem?

#

(and possibly limit it?)

obtuse wyvern
#

When i use ls i can only see dev and some folders but gparted and fdisk dosent work

tulip dock
#

you might have something configured wrong in fstab or whatnot. Are you using full-drive encryption?

obtuse wyvern
tulip dock
#

if you type "reboot" and enter, you get the same thing?

obtuse wyvern
humble falcon
#

Iirc I got that when I tried resizing my root partition, turns out my partitions were explicitly using uuid rather than the relative path or whatever it's called

lean locust
#

Please I need help in writing a script to list and delete objects that are older than 2 years in my OVH object Storage

#

I have a this script but not working

import swiftclient
import time

Authenticate to the OpenStack Swift API

conn = swiftclient.Connection(authurl='AUTH_URL',
user='USERNAME',
key='PASSWORD',
tenant_name='TENANT_NAME',
auth_version='2')

Define the container name

container_name = 'autopod'

Define the last modified date threshold

threshold = time.mktime(time.strptime('2022-01-01', '%Y-%m-%d'))

List all objects in the container

objects = conn.get_container(container_name)[1]

Filter the objects based on the last modified date

filtered_objects = [obj for obj in objects if int(obj['last_modified']) < threshold]

Print the filtered objects

for obj in filtered_objects:
print(obj['name'])

tulip dock
main olive
#

I have this problem

#

Idk what to do

pallid smelt
# main olive Idk what to do

and without knowing 1. the user that runs the flask 2. filesystem attributes of the db - hard to help .. but doing something like chmod a+rw $your_sqlite_file might help (but is not so secure approach)

main olive
main olive
#

I fixed it, I just gave the /instance directory ownership to www-data user

serene locust
#

@obtuse wyvern Did you try to resize your root partition? Cuz, I got a similar problem with another distro when I resized its root partition for dual booting... If so you might have altered its virtual memory size making this problem.

#

Try this, If you get permission denied... (Happened to me) I'm sorry bro, You might have to do a fresh install (May have fix, but IDK)

obtuse wyvern
#

I solved @serene locust ty

river atlas
#

I'm rly sry but how do I exit vim I'm actually serious

fallow tusk
#

:q

#

Or :q! if you have unsaved changes you want to discard

#

Ah, a thought: if you're in insert mode, you'll need to esc out to command mode to be able to send that.

river raptor
#

me kde plasma

fallow tusk
shy yokeBOT
#

:incoming_envelope: :ok_hand: applied mute to @main olive until <t:1676662831:f> (10 minutes) (reason: duplicates rule: sent 4 duplicated messages in 10s).

The <@&831776746206265384> have been alerted for review.

fallow tusk
#

You said you were KDE Plasma…KDE Plasma would know what to do with that

river raptor
#

okay i will do it

#

but i am real plasma kde trust me

fallow tusk
#

I don't need to trust, I ran a test. The test failed.

#

Never believe anything a computer tells you :)

humble falcon
fallow tusk
#

Indeed

river raptor
#

trust me

fallow tusk
#

Looks like a system fault; I'll just have to do a forced shutdown :p

#

…anyway. silliness aside…I take it there wasn't a unix-related question, was there?

river raptor
#

and that i am real

fallow tusk
#

!ot

shy yokeBOT
fallow tusk
#

^ that'd be the appropriate forum :)

river raptor
#

okay sorry

pastel solar
#

yes

north hearth
#

How do I pre-compile the standard library when building from source?
I know the Windows installer has a "precompile standard library" checkbox, but this is not so obvious when building from source. I looked through the ./configure flags but couldn't find anything, apart from that --enable-optimizations doesn't seem to do that: https://docs.python.org/3/using/configure.html#cmdoption-enable-optimizations

fickle granite
#

"make install" compiles all the python files

modern oasis
#

wıfı adapter workıng but not showıng wıfı networks

#

ın kalı lınux

#

why lıke that

opaque ginkgo
#

kali moment

main olive
#

Is putting the GNU public license into your source code files (that you wrote yourself, but contain module imports from third parties) safe or am I making myself liable to lawsuits?

#

Sorry if this is the wrong channel, I didn't know where else to ask

humble falcon
main olive
#

I don't know, I don't really understand licensing and never published code before

#

I just want to put GNU public license on all my source files so everyone can use it

quick tapir
#

GNU means many many people won't use it

fickle granite
#

heh

opaque ginkgo
#

if you want everyone to be able to use it (incl closed source projects), put it under MIT

#

if you want to require that everyone that modifies it uses the same license (ie. derivatives must remain free), use gpl

dense kernel
#

Is this valid syntax?

for curr_run in "${RUNS_SETTINGS[@]}"
do

    cd ${...} && time ${PYTHON_BIN} ${FIRST_PY} 
    if [ $? -ne 0 ]
    then
        return 1
    fi

    sleep 5

done
#

specifically the return statement

quick tapir
#

that's not python

wise forge
#

i would recommend using shell/bash stuff only to piping commands

fickle granite
nimble notch
dense kernel
quick tapir
#

I am awesome at pointing out the obvious!

dense kernel
wise forge
#

all input values are named then

#

and it is always possible to use sys.argv to get arguments in same way as bash scripts

#

or using os.environ to get arguments from env if desired

#

python has no restrictiosns for input 🙂

dense kernel
#

the issue is AWS RDS not Python

#

you pass it an array for a command, for example ["python3", "script.py", "--smth", "blah"] but how can you run multiple scripts??

wise forge
#

you know... this is even design pattern called facade for this 🙂

wise forge
dense kernel
#

but I gotta love how everybody is giving suggestions but nobody can answer if this syntax is correct or not

wise forge
#

For different calls

#

Of this script

dense kernel
#

yeah

wise forge
#

U can use it even for linking script from another file, if disabling help for linked script

#

That is if u need invoking multiple scripts from one entry script

#

Each subparser can have its own independent set of arguments

fresh trout
#

does anyone have any tricks to setting a bash env var using python?

fallow tusk
#

You can set them and use them within your Python process (or subprocesses), but they won't persist back to the shell.

fresh trout
#

Yep, I want to persist them

#

kinda like how conda can do it

polar mist
#

hey, i'm using ffmpeg-python for making videos. after making it, ffmpeg process does appear in htop, is it ok in linux to have a process with 0 for cpu and memmory?

fallow tusk
#

You can use a shell script to call Python to generate a bash script that would then get called to set them

#

But that usually seems like more overhead than it's worth

fresh trout
#

the problem I am trying to solve it to make it multi-os

polar mist
fallow tusk
#

You'd need to do the same in DOS, too ;)

fresh trout
#

dang

fallow tusk
prime magnet
fallow tusk
#

If they are processses generated by another process, then they may just be idle because it's not using them, and they'll get cleaned up when it exits

polar mist
fallow tusk
#

"it"?

polar mist
#

program

fallow tusk
#

ffmpeg?

polar mist
#

python calls ffmpeg

fallow tusk
#

So is Python exiting cleanly?

polar mist
#

it receives api call, and have to return video

fallow tusk
#

That suggests that the ffmpeg process that it started isn't ending, perhaps it's waiting on the Python process to exit...

#

If you end the Python process, do they all get tidied up? If not, then you probably need to do something in your script to ensure they actually terminate (I don't know what that might be)

polar mist
#

now it is a python question

#

it doesnt kill a process

fallow tusk
#
  1. Does it execute that line?
  2. What's the error message?
#

...

polar mist
#

no errors

polar mist
#

i tried this one

#

and it kinda works

#

after 3 requests it kills all 3 processes

#

however on 1 and 2 requests, processes exists

fallow tusk
#

Yeah. That's probably my point 1

#

And also suggests that the kill is unnecessary

#

Since you're yielding it, I imagine it is keeping a reference to the object around until the generator actually exits

whole badger
#

Anyone familiar with blueZ?

shy yokeBOT
#
Nope.

No documentation found for the requested symbol.

gloomy lava
#

Can i use shell glob or regex for python arguments?

#

resolved it

deep lava
#

hello everyone. i have a python script running in the background with pid 48139. I wish to bring it to terminal (foreground) while i'm connected with ssh, so i can display the print(' ') commands. how i can do that ?

wise forge
#

If u launch script with docker.
Then just docker logs command can be seen

deep lava
wise forge
#

Start with simple systemd

deep lava
#

on command fg %555
the response is no such job

#

do i have a package missing or something ?

wise forge
#

U will see short amount of latest logs

#

For full logs, learn how to request them with journalctl command

deep lava
wise forge
#

For full

turbid flicker
#

Hey guys ,
So in my ubuntu desktop , wifi is connecting only when I take my usb adapter out and reinsert it . What do I do , its not working default

fallow tusk
#

That could be something along the lines of it not starting up the usb service before it's started trying to connect wifi, so it doesn't see the dongle as a wifi device. If that's the case, you may be able to make it connect by using ip to bring that interface up once you're logged in.

#

The order things are brought up is determined by systemd services…

river apex
#

I'd defining logrotate.d for my httpd log on rhel server, is there any way i can control the masking of the compressed file?

fickle granite
#

"masking"? Do you mean the permissions?

fresh trout
#

and included a function in my library that will print those hooks out, so the user only needs to source them

river apex
fickle granite
wanton garnet
#

my .py file in /var/www/vhosts/hardcore-vaughan.163-161.plesk.page/httpdocs/emadeus/ path, when i try to run by using python code.py i got error no module named numpy but when i try pip3 install numpy it says already satisfied in /usr/local/lib64/python3.6/site-packages
can someone help me

craggy tartan
#

Where did you learn how to shell script

humble falcon
#

I personally wouldn't learn too much scripting, just the basics for running commands and maybe knowing some loops. For scripts I reuse a lot that do more than just basic commands, I'd use python or another lang

quick geyser
#

How does one install modules when using sbatch?

main olive
# craggy tartan Where did you learn how to shell script

The best way to do this is know linux commands very well and then start putting sequences of commands into a bash shell script file. Then start to read about things like if statements and all that, and replacing values with variables, etc. Trying to make simple tasks more dynamic.

#

Python is in no way a replacement for bash shell scripting, nor would I suggest someone try to start doing that as a replacement. Reason being is all the sudden you have to constantly maintain technical debt in python that bash does with commands in linux natively. Also python can not replace specific bash commands and it would be silly to run execs from python constantly.

humble falcon
#

It depends on what you want to do, whether you want to distribute it, and if you already know another scripting lang imo. If it's just a script for yourself and you're comfortable in py, I don't really see the merit in learning a new lang if it can be done in one you already know

craggy tartan
#

I need to learn it for a college assignment

wise forge
#

learn subprocess library and argparse

#

together they show amazing results.

#

subprocess.run("your command", shell=True, check=True) will ensure your command will run with non zero exit return code in case of error

#

argparse creates quite awesome self documented input to your scripts

main olive
#

on youtube

main olive
#

thats cool but i wanted it to move some files.

#

if you write 100 lines to do that, you wasted my money

#

IT is a business that runs on lean efficiency to make money and beat competition, not a pissing match between engineers about how obscure they can do something that's later impossible to repair

#

when someone says "i need to solve this in bash because its required" that doesnt translate into "do it in python because i like python better"

#

especially in a unix channel

wise forge
# main olive If you did something in python that only required bash I would fire you. Becaus...

And if u were that genius that writes parsers (or any too long bash scripts) in bash, without unit testing or any code readability, i would ensure it did not pass code review until u fixed it 🙂
https://github.com/b-fuze/batch-encoder/blob/master/config/parser.sh

GitHub

An interactive batch video encoder written in Bash using FFmpeg - batch-encoder/parser.sh at master · b-fuze/batch-encoder

main olive
#

he didnt ask for a parser,, that is where your argument is flawed

#

programming step number 1: define the problem

#

which you didnt do

#

you need a unit test to figure that one out?

wise forge
#

Any long script in bash without unit testing is idiocy, which is not readable and not maintainable

main olive
#

You're avoiding constraints obviously

#

the ask and the requirement was in bash I need to learn x to do y

#

where does that say spaz out and then go with python to code 50 lines of something and reference it with "because someone else did something totally random in python because it's rediculously complex" an answer to that?

#

no one asked for unit testing

#

lol

#

and when you cost a manager weeks of budget with jacking around when something took ten minutes to solve you think they won't reach down your throat and fire you? lol

#

give me a break

#

stop trying to solve things that arent requested

#

I want to hear some pass an interview with "forget your bash because i use unit tests in python" because they're going to laugh and say what??? when given the ask to use a bash script.

river raptor
#

what is the best way to parse /proc/<pid>/maps using python?

#

or a good way

wise forge
# river raptor what is the best way to parse /proc/<pid>/maps using python?

https://stackoverflow.com/questions/1401359/understanding-linux-proc-pid-maps-or-proc-self-maps
Quick googling to its format suggests

address           perms offset  dev   inode   pathname
08048000-08056000 r-xp 00000000 03:0c 64593   /usr/sbin/gpm

it is easily parsable with python regex(or may be even string.split is enough) pithink recommending putting parsed input to List/Dict of @dataclass or to pydantic

import re
wise forge
# river raptor or a good way

may be there is no point to parse it though? may be necessary stuff can be already may be available in Monitoring solutions like Node Exporter agent to Prometheus

river raptor
river raptor
#

([0-9a-f]+)-([0-9a-f]+) ([r-])([w-])([x-])([ps]) ([0-9a-f]+) ([0-9]+):([0-9]+) ([0-9]+)(?: +(.*))?
is this good? it matches everything

#

i didnt really know how i should do the path part

wise forge
river raptor
#

okay

wise forge
#

and then parsing further if necessary subvalues of column

river raptor
#

so the perms should be one and dev too?

wise forge
#

first, and rwxp looks good. I think time parsed with separate values is a bit bad though. may be parsing whole value with import datetime will be better

river raptor
#

okay

#

how can datetime do it

wise forge
#

well, find for yourself what will be easier 🙂 that is just an idea

wise forge
#

u will receive datetime object as result.

river raptor
#

but i dont need time

wise forge
river raptor
#

what looked like datetime

#

address perms offset dev inode pathname these are the names of the values

#

okay i think i will use ([0-9a-f]+)-([0-9a-f]+) ([r-][w-][x-][ps]) ([0-9a-f]+) ([0-9]+:[0-9]+) ([0-9]+)(?: +(.*))?

#

i made perms and dev one

#

([0-9a-f]+-[0-9a-f]+) ([r-][w-][x-][ps]) [0-9a-f]+ [0-9]+:[0-9]+ [0-9]+(?: +(.*))?
i removed some stuff i don't need, this is what i will use, thanks for the help

upbeat vine
#

dare me to install the forbidden shell

midnight osprey
#

Welcome to the xonsh shell 0.13.4

                                                   ~ Conches for the xonsh god! ~
upbeat vine
#

the xonsh god is pleased with your contribution

main olive
#

hello

#

my aliasing isn't working in WSL. i successfully declare an alias and then when i go to use it it says "no such file or directory"

#

this is after using alias to see it was indeed declared properly

#

maybe it cannot work with cat? does it only work for commands or executables?

ember quiver
main olive
#

a custom alias. the scripts are in a distant directory and i'd like to alias their path and name so that i can simply use their name instead

dapper musk
#

you should add that directory to PATH

#

instead of aliasing it

#

also you have most probably typed path wrong

#

"no such file or directory" usually indicated that sort of stuff

humble cove
#

can someone help me out with this I have been trying all day

#

im trying to make it so they can access sftp on a specific folder only and not be able to log into ssh or have root

wise forge
# humble cove

recursive chmod to files is
chmod 700 -R /home/Dan_Files

humble cove
#

same thing

#

I did it all from start again

#

I deleted the user and dir

#

this is what it looks like in sshd_config

vernal sedge
#

anyone aware if there is a way to have subprocess.Popen pass something as FD 3 on unix/linux and/or another safe way to run a subprocess thats getting a extra pipe for a binary protocol thats not supposed to interfere with the stdio

wise forge
vernal sedge
#

I want to spawn python subprocess and have a communication channel to them that's using a binary protocol without abusing stdio for that as we currently do with execnet

wise forge
#

oh. u want real time sending input and getting output from it?

#

i only had case where i had output to python and stdout at the same time

#

never needed sending input in real time too

runic goblet
#

i obviously have a knowledge gap somewhere here, what does binary protocol mean in this context?

#

i remember i tried to use python to do something similar, i.e. sending user input to a subprocess
but couldn't figure it out, ended up using expect in a shell script instead :\

wise forge
# runic goblet i remember i tried to use python to do something similar, i.e. sending user inpu...

it looks like it is possible to send input in real time.
https://docs.python.org/3/library/subprocess.html
at least stdin is possible to override
is, and Popen.communicate with example is whown how to do that
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate

wise forge
runic goblet
runic goblet
wise forge
vernal sedge
#

It seems that the combination of pass_fds gets halfway there, i just can't tell it to dup2 it from the current fileno to the new fileno before exec

devout current
#

Hi guys

#

I have error with import of a packet of python on kali linux

#

Anyone can help me ?

fickle granite
hallow herald
#

do the standard file picker dialogs in linux distros offer to change the text of the "Select" / "OK" buttons?

summer trail
# vernal sedge It seems that the combination of pass_fds gets halfway there, i just can't tell ...

Do you specifically need it to be fd 3? Or could you let it be passed with whatever fd it already has in the parent process, and communicate the fd to use to the child process via a command line argument or message on stdin? Or, heck, by making the child process enumerate its open fds?

But also, there's no requirement that stdin/stdout be text. I wouldn't consider sending binary data on stdio to be an abuse.

summer trail
vernal sedge
vernal sedge
# summer trail You could do that `dup2` with a `preexec_fn`

preexec_fn is not supported in subinterpreters (which i want to add to execnet so that pytest-xdist can use sub-interpreters for concurrent tests) and pretty much comes with warnings wrt thread-safety, as execnet is using threads (in most unfortunate ways conceived back with python 2.4)

summer trail
#

you could always just exec a program that does the dup2 and then exec's the real program, I suppose

summer trail
#

That technique is probably only useful if you can't modify the code of the final program you're trying to exec. If you can, you might as well write it to accept the file descriptor to use as an environment variable or CLI argument or something, rather than hardcoding 3, and then you don't need the dup2 at all

barren temple
#

Anyone have exp with tinkerboard? What is the process of getting started with https://github.com/TinkerBoard/buildroot ? Learn Makefiles, learn buildroot, add your own thing into packages, make menuconfig and build image? I want to build an app on tinkerboard, and I want to setup github actions to build an image with the app installed.

GitHub

Contribute to TinkerBoard/buildroot development by creating an account on GitHub.

fleet olive
#

is

vernal sedge
barren saffron
#

Does anyone here know about tmux?
Because when I wan't to detach a session with the keys Ctrl+b d nothing happens. I can only use Ctrl+c but then it closes the session. Any help?
I'm on raspberry pi 4

warped osprey
#

is the session running in foreground

barren saffron
#

I think so

warped osprey
#

try tmux detach

barren saffron
#

tmux new-session -d -s izdabot 'python3.11 main.py'
this is the command where I start the session

barren saffron
warped osprey
#

Id or the name of the session

barren saffron
#

Okay thanks but another question

#

huh

#

I cant exit out of my session when im in the session

barren temple
#

it doesn't say it's attached. Try attach it and then quit whatever you have there

barren saffron
#

When I press Ctrl+b d it wont get out of my session

barren temple
#

ctrl+b k might help?

warped osprey
#

just check if the command is right : tmux list-keys | grep detach

barren saffron
warped osprey
#

That shows the key bindings

barren saffron
barren saffron
barren temple
#

yes

barren saffron
#

But when I press this in my session nothing happens

#

HUH What is that

barren temple
#

it doesn't say it's even attached

barren saffron
barren temple
barren saffron
#

Is it now attached?

barren temple
#

probably? 😄

barren saffron
#

Yes but Ctrl+b d still not working

barren temple
#

what is azda bot

barren saffron
#

A sh!... project I made while I was bored

#

But this is not the problem

barren temple
#

does the sessions list say it's attached?

barren saffron
#

yes

warped osprey
#

its a mess, just create a new session and attach to it

barren temple
#

ctrl b (release ctrl) d

barren saffron
#

HUH WT..F

#

Finally

warped osprey
#

tmux new-session -s <session-name> to create a new session and then typing tmux attach -t <session-name> to attach to it.

warped osprey
barren saffron
#

Omg... The problem was just that I didn't release Ctrl+b ctrl and then pressed ctrl d

#

I'm so sorry for wasting your Golden time

barren temple
#

no problem 😄

barren saffron
#

Thank you both so much!

barren temple
#

you're welcome

barren saffron
#

i appreciate it haha

main olive
#

Hi, how do i turn a python project into a Linux executable? What is the best way to make it distributable?

fickle granite
#

there's something called pyinstaller that claims to do that, but I've never gotten it to work

#

it's insanely complex

dapper musk
#

it depends what do you mean by executable

#

if by executable you mean file that can be executed ie you can run it through <pathToFIle>

#

then you can just add line

#!/usr/bin/env python3
#

on top of your script

#

and chmod a+x it and if your script does't depend on any non standard libraries you should be fine

#

if by executable you mean an binary file then like offby1 said you need to use pyinstaller

#

you might also try using guix package manager and it's pack subcommand

wise forge
wise forge
main olive
#

its a cli tool i think ill go with setuptools

wise forge
#

pyscopg2 and psycopg2-binary pip packages do that

main olive
#

Ok, thank you, ill also consider that

acoustic mist
#

yeah

steep sequoia
#

it was. literally created for this purpose

#

and its also what the docs say to use

#

you should use it!

river raptor
#

Hello everyone, i was trying to install Arch and when i tried to install grub it gave me this

fallow tusk
#

That just indicates that the keys aren't up-to-date... let me find the package you need

#

Ah, yes. Probably just bash sudo pacman -Sy archlinux-keyring

#

and then do the update

#

You should probably -Syy before adding a package, anyway.

#

@river raptor ^^

#

So the following in order are probably a good way forward: bash sudo pacman -Sy archlinux-keyring sudo pacman -Syyu sudo pacman -S grub

river raptor
#

@fallow tusk thanks for trying to help, one of my friends helped me, i did this what he said in picture into /etc/pacman.conf

#

but i also have another problem now

#

arch is installed

#

but

#

no internet

#

if i do pacman -Sy wpa_supplicant it fails because no internet

#

i am currently on kubuntu 22.04.1 lts, can i just copy my wpa_supplicant to the arch /bin?

fallow tusk
#

What does ip a say?

river raptor
#

wait

fallow tusk
#

You're connecting via wifi, I take it

river raptor
#

Yes

#

This is IP a

fallow tusk
#

Yep, OK, so at least it sees the wifi adapter. Yes, I think you're right - install wpa_supplicant, and copy the config across

river raptor
#

How do i install WPA supplicant If i dont have Internet connection

fallow tusk
#

lol. Yes...good question. You can't wire it in?

river raptor
#

Wait

fallow tusk
#

You should be able to download the packages from a system that is connected and install them locally (iirc)

river raptor
#

It told me to pacman -U /package/folder/*.tar.zst

#

Where do i Download the tar.zst

#

@fallow tusk

fallow tusk
river raptor
#

Then i do Pacman -U and the path?

fallow tusk
#

I believe so; I can't recall, but ISTR doing that once or twice previously

#

The problem may be dependencies

#

(I don't have an arch system in front of me to try thing on right now)

river raptor
#

Okay

river raptor
fallow tusk
#

Any the package needs...if there are any

#

I don't see anything specified on the page

river raptor
#

okay

#

im on ubuntu, now i will download it and put it into the arch drive?

fallow tusk
#

Are you chrooting into the arch environment?

river raptor
#

i just installed arch then booted to arch

fallow tusk
#

If the Ubuntu system is on the same laptop, then you can make things a little quicker by chrooting into arch and doing the setup by jumping into and out of arch like that.

fallow tusk
river raptor
#

your son died so you just decided to join the python discord and ask for giving a ps5

fallow tusk
#

Sorry, that counts as advertising, which is not allowed on this server.

river raptor
#

true

#

i think it was a scam

quick tapir
#

what if he was telling the truth?

fallow tusk
#

Aye

river raptor
quick tapir
#

I mean, it was probably a scam, sure

fallow tusk
#

That doesn't stop it from being advertising

river raptor
#

why would anyone give a ps5 for free especially when its new

quick tapir
#

because it reminded him of his dead son and he wanted rid of it?

river raptor
#

but why for free?

quick tapir
#

because he's too distraught to think about money right now?

fallow tusk
#

It's irrelevant.

quick tapir
river raptor
#

@fallow tusk

[root@localhost /]# pacman -S wpa_supplicant
resolving dependencies...
looking for conflicting packages...

Packages (4) duktape-2.7.0-5  pcsclite-1.9.9-3  polkit-122-1  wpa_supplicant-2:2.10-8

Total Download Size:   0.39 MiB
Total Installed Size:  9.27 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 polkit-122-1-x86_64                                         395.9 KiB  1816 KiB/s 00:00 [####################################################] 100%
(4/4) checking keys in keyring                                                           [####################################################] 100%
(4/4) checking package integrity                                                         [####################################################] 100%
error: polkit: signature from "Jan Alexander Steffens (heftig) <heftig@archlinux.org>" is unknown trust
:: File /var/cache/pacman/pkg/polkit-122-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.
[root@localhost /]#
fallow tusk
#

You still need to install the keyring

river raptor
#

how

#

@fallow tusk

fallow tusk
#

The same way

river raptor
#

what

#

with pacman?

fallow tusk
#

You'll need to get the package and update it

#

Sounds like the installation medium you used was somewhat old; did you not have internet access in the installer?

river raptor
#

i did have internet access in the installer

fallow tusk
#

OK. Then you're better off going back to the installer and using that to install the packages you need

river raptor
#

in the installer i had wpa_suplicant

fallow tusk
#

Yeah, in the live system, but you didn't install it in the system you were building.

#

You can use pacstrap to add things like that

river raptor
#

oh okay

#

so i need to reinstall arch?

fallow tusk
#

I'm surprised, though, that pacstrap didn't install the latest keyring.

river raptor
#

how do i install the latest keyring

fallow tusk
#

That's probably the easiest. You can just go from section 1.11 or even 2.2

river raptor
#

okay

#

@fallow tusk

fallow tusk
#

OK...I don't know, now :)

river raptor
#

Okay

#

I'll try rebooting

river raptor
fallow tusk
#

Odd. That sounds like you were trying to install to the live system, not the target

river raptor
#

what should i do

fallow tusk
#

It may be worth starting from scratch, with this new knowledge :)

#

I've done that a few times when installing arch - usually I've just missed a (not-so) minor step

river raptor
#

i did
pacstrap /mnt base base-devel linux linux-firmware dhcpcd nano wpa_supplicant

fallow tusk
#

Just do everything again, but ensuring you add wpa_supplicant during the pacstrap

river raptor
#

i did that

fallow tusk
#

From scratch?

river raptor
#

okay wait i will do it one more itme

#

@fallow tusk still Not working

#

No space left on devic

#

When Doing mkinitcpio -p linux

fallow tusk
#

Ah…is the /boot partition pretty small? it may have run out of entries in the UEFI …err…thinggy (technical term!!)

river raptor
#

100mb i cant make it bigge

#

I think

fallow tusk
#

I've had to clean that out before now. But the easier option is to make a bigger partition…yeah

river raptor
#

I have a 500mb Partition, how can i use that instead?

#

On /dev/nvme0n1p5

#

nvme0n1p3*

#

How can i use that instead

fallow tusk
#

It should tell you in the installation instructions - where it explains how to partition the disk

river raptor
#

I didnt find it

#

@fallow tusk

#

I think i got it

#

Wajt

#

Now its says pacstrap Not found

#

Im going up

#

I will try again tomorrow or Something

#

Now this but i dont ude Windows anymore

fallow tusk
#

That definitely sounds like a UEFI problem.

#

You may need to get familiar with the UEFI shell, if only to boot one of the entries that have (presumably) been corrupted

river raptor
#

oh wait it didnt find pacstrap because i was in the chrort

#

chroot

fallow tusk
#

That'd do it :)

river raptor
#

how do i make the fourth partition the efi partition or how do i resize my efi partiotion with 100mb

fallow tusk
#

To increase the existing 100MB partition, you're going to have to decrease part 4 to give it enough space, then move partitions 3 and 2 up.

#

I'm not sure about making part 4 the EFI partition…

river raptor
#

okay

#

how do i move partitions?

fallow tusk
#

fdisk or one of its gui counterparts

river raptor
#

im going to sleep now, could i talk to you tomorrow please? i found gparted and i will try to use the live usb

fallow tusk
#

I probably won't be online until 10:00 GMT, but anytime after that

ebon breach
#

Between fedora, manjaro or Ubuntu , which would you recommend?

neat jasper
# ebon breach Between fedora, manjaro or Ubuntu , which would you recommend?

I hate to say depends, but it depends. I always pick fedora because its based on redhat which is an industry standard build. fedora is on the bleeding end of that because red hat do not want to release unproven builds into the industry... So if you are developing skills for the industry then fedora. Its also great even if you are not interested in that. Ubuntu is the most popular i would say but not that sure. i dont go for that because the packaging is different. but if you were wanting to play steam games on linux, then that would be better fit.

ebon breach
neat jasper
#

the real difference is the packaging . fedora uses rpm with is different from debian builds which ubuntu belong

fallow tusk
#

I guess the analogy I was looking for was: "Do you recommend a Ford, a Nissan or a Peugeot?" - mostly it's down to individual preference, with slight differences in how they "handle"

#

And Manjaro is an Arch-based build, so uses pacman (which I think is its own thing, but can handle .debs with some fiddling)

#

In terms of what interface they provide and the availability of things for coding - they're much of a muchness. Throw each in a VM and try them out

neat jasper
#

the other thing that i am a bit picky about is the UI. I like Mate version of fedora. i think that this is the real thing that will affect you. I really didnt like (ad well as others) the gnome UI. Mate is gnome2 style. gnome3 was mac look alike. I never liked mac ui

fallow tusk
#

I've avoided Gnome for a while, now ;) But, yes, each distribution will allow you to use different Desktop Environments. That is even more a matter of taste.

#

If all you want to do is code, then you could get away without a DE entirely.

ebon breach
#

Ok, thanks you so much. I think fedora will be a good choice for me

fallow tusk
#

I should probably run up a Fedora VM and try it again. I never got on with RHEL, though.

neat jasper
#

i stoped using windows altogether and just use Fedora Mate build

#

you dont need a vm for that

#

just a usb they have the LIVE version to checkout

#

if you like it just install from usb

fallow tusk
#

Well, I'd still run the live version in a VM, tbh. Means I can still do stuff whilst I tinker

neat jasper
#

sure

#

usb is less hassle i think thats why i suggest it

#

and its a good option to check out the different UI options. there are quite a few now.

neat jasper
fallow tusk
#

Currently I'm switching between Windows and Linux on the laptop as my desktop died. I have Arch as the main Linux system, this is currently a Lubuntu VM.

#

The Arch system is running the remnants of a Garuda install, which I think is running Plasma. The VM is running qtile with no DE.

river raptor
humble falcon
#

+1 for Garuda

river raptor
main olive
#

hehe, and bypass all the fun of the arch forums install experience? jk, congrats on your new install!

river raptor
river raptor
#

read the fucking manual.

#

i read the installation guide

main olive
#

no worries. I wasn't criticizing you, just remarking on the traditionally accepted arch culture. though i appreciate and respect the community it's not really my flavor since arch has selectively adopted things which meet their KISS standard and avoided some development tools for the same reasons.

#

then again, I'm boring. debian was generally good enough (stable, development, usable, 'it just works') without the bloat of ubuntu. cent was nice, but then redhat was acquired by IBM. fedora is great for development if you can accept potential risks to stability. however, every distro previously mentioned makes use of systemd which is the least unix compliant technology ever.

reef sluice
#

Anyone know how i can escape `help' in kali nethunter

misty yew
#

did u try
:q

#

q