#unix

1 messages · Page 55 of 1

final echo
#

to see ur version

wise valve
#

its up to date

#

3.6.9

final echo
#

ok nice

#

we can upgrade later if u wish

wise valve
#

how do i upgrade stuff

#

python upgrade?

final echo
#

@wise valvenow to install vscode
open your browser and search vscode linux commandline download

wise valve
#

okay

final echo
wise valve
#

okay

final echo
#

link

wise valve
#

im there

final echo
#

ok send me the link so i can confirm

wise valve
final echo
#

nice

#

there are multiple ways to install but i recomend doing this way

wise valve
#

wget line?

final echo
wise valve
#

jeez will i have to type it all

#

is ther any way to paste it in terminal?

final echo
final echo
wise valve
#

even the sudo apt part

final echo
#

yep

#

first do the wget then sudo

wise valve
#

yes i did that

#

wil it take a whole hour?

#

wait no it reduced

final echo
#

it dependson ur net speed

wise valve
#

k

#

btw i copy pasted the whole wget thing in terminal and it divided it on its own

#

was it a glitch?

final echo
#

terminal can split it automatically

#

as they are diffrent commands

wise valve
#

ohhk

#

linux is smart

final echo
#

lol

wise valve
#

all my friends used to say "linux sucks"

final echo
#

ok ping me when its done

midnight rain
#

obviously if you want to gaming or easy things Linux not the better for that

wise valve
#

@final echo done

final echo
#

did you ran the sudo comand

wise valve
#

i ran all of em

final echo
#

now check your applications
or you can just type

code in the terminal

wise valve
#

no way

#

its the vscode itself

final echo
wise valve
final echo
wise valve
#

omg so every time i type code it will open vscode?

wise valve
#

thank you sooo much

final echo
#

if u want u can disable that

#

welcome

wise valve
#

how do i install git here

final echo
#

do git --version

wise valve
#

its giving me a code to install

final echo
#

you can follow the same steps we did for vs

#

code

#

to install git

wise valve
#

Its saying "After this operation, 34.0 MB of additional disk space will be used.
Do you want to continue?"

#

should i press y?

final echo
wise valve
#

okay thanks

final echo
wise valve
#

final questoin are there some basic commands i need to know to use linux?

#

and if so can u reccomend me a video

#

also are modules like pyautogui preinstalled?

final echo
final echo
wise valve
#

like i do in windows

final echo
#

btw importnat thing

do python3 instead of python
and pip3 instead of pip

wise valve
#

okayy

final echo
#

becuase linux has both python3 and 2 preinstalled

wise valve
#

kk

wise valve
final echo
#

dont uninstall python btw

#

it will break the os

wise valve
#

can you chek the last 2 lines please

#

i tried to uninstall it

final echo
#

@wise valvepyautogui is a python module

python commands are same

just put
python3
and pip3

here you can do

pip3 uninstall pyautogui

wise valve
#

but i installed it by sudo apt install pyautogui

final echo
#

sudo apt install is for apps and stuff

#

not for python packages

wise valve
#

can u see the screenshot

#

above the line i asked it to uninstall

#

i typed sudo apt install pyautogui

#

and it installed somehtin

final echo
#

lemme see

wise valve
#

oh it says unable to locate

#

k got it

final echo
#

ok you dont have pip thats why

you have to do install like you do on windows

#

you can ask help regarding pip and stuff in general ig

wise valve
#

i downloaded pip

#

i installed pyautogui as well

#

lets goo finally i can use my linux

final echo
wise valve
final echo
#

ok nice

wise valve
#

i typed sudo apt install python3-pip

final echo
#

yep

#

thats it

wise valve
#

kk

#

thanks very much for your help

final echo
#

go on with your journey

wise valve
#

i sure will

#

thanks

#

gtg byeee

final echo
#

bye

woven yarrow
#

What's the best way to check in python for a systemd service's status and uptime?

formal schooner
#

personally i'd just use subprocess. although maybe there are some kind of systemctl bindings in python

wispy warren
opaque ginkgo
#

pyautogui isn't a deb package anyways so it doesnt matter

midnight rain
#

anyone have some video/book about dbus?

rocky dew
#

I need to retrieve information, within python script, about each pdf page's font using both pdffonts and pdftohtml from poppler. It seems that calling subprocess.run thousand times for each pdf file is bottlenecking my script. So, I'm thinking if it's better to rewrite it to: 1. call pdffonts and pdftohtml inside a bash loop and write both outputs to a single file, to be read later using mmap; 2. call pdffonts and pdftohtml inside a bash loop and write each output to single file to be read later using default open(file, 'r'); 3. call both commands each time and make them output to stdout, avoiding 2 time read/write. In your opinion, which is the best option to me?

#

I'm processing a lot of pdf files and need to identify pages with corrupted text to perform ocr

warped nimbus
#

This doesn't seem like a matter of opinion. You should develop prototypes and benchmark them to see which performs adequately.

rocky dew
#

Just image you were given the same task. What option you'd prefer based on your experience?

#

Which looks like more obvious?

#

I have implemented option 3, but it seems slow as I pointed. I've never used mmap

warped nimbus
#

Do you need to ultimately display the subprocess outputs in stdout? Doesn't that get really flooded with stuff and hard to read?

rocky dew
#

I need to parse output in order to identify likely problematic fonts (custom or identity-h encoding and no cmaps) and count occurrences of each font

warped nimbus
#

How come you asked this in the unix channel?

rocky dew
#

Maybe it's related to system calls. I'm using debian btw

warped nimbus
#

What is related to system calls?

rocky dew
#

Calling pdftohtml and pdffonts through subprocess.run multiple times

warped nimbus
#

Well yeah they use system calls just like everything else, but you're not dealing with them at such a low level. Let's continue this conversation in a help channel you claim?

rocky dew
#

Ok. So, do I need to repost it in other channel?

#

Sorry, it's my first time here

warped nimbus
#

yeah, please. I think your question doesn't quite fit this channel. You can see #❓|how-to-get-help and just ping me once you've claimed a channel

rocky dew
#

Ok, thank you for your attention. I'll do it

warped nimbus
#

@rocky dew what's going on?

rocky dew
#

Just posted my question

olive ice
#

I ask to myself can windows run off a 18GB hardrive well windows10 probably can’t but Linux can

hazy sorrel
#

!e print(“0”)

shy yokeBOT
#

@hazy sorrel :x: Your eval job has completed with return code 1.

001 |   File "<string>", line 1
002 |     print(“0”)
003 |           ^
004 | SyntaxError: invalid character '“' (U+201C)
lavish storm
#

#bot-commands

silent stump
#

Hell, some are even designed to

#

On flash drives as recovery isos, etc

olive ice
formal schooner
#

it's GUI applications that take up most of the memory in my experience, followed by the DE itself (plus all the various notification daemons, etc)

#

oh this is disk space

#

similar considerations

silent stump
#

Funnily enough I'm still going to run my computer on windows

#

I am only now setting up a Debian server for self-hosting

#

In a perfect world I would have enough IQ for NixOS. But this is not a perfect world.

formal schooner
#

i've been using opensuse for server things recently

#

i find that it's less chaotic to configure than debian

silent stump
#

I see, any points to sell me on?

formal schooner
#

system configuration is more organized, that's the main selling point for me

silent stump
#

I see

formal schooner
#

in enterprise settings, it has tools for things like provisioning many systems at once, setting up virtual machines, etc.

silent stump
#

I see, that sounds pretty interesting

formal schooner
#

debian is fine for server things though. just keep in mind that the system packages can get very badly out of date between stable releases

#

but docker helps a lot with that

silent stump
#

Well, I am not going to run docker

#

I dislike the concept of it

#

But I wont run any new pkgs anyway

formal schooner
#

imo the system package manager shouldn't be responsible for installing app-level packages. dependency isolation is a beautiful thing and it's one of the big advantages of containers

#

you don't need docker specifically, there are other kinds of containers

silent stump
#

Yeah, but Id rather use something like nixos and flakes

formal schooner
#

i'm not smart enough for that. i use docker-compose

silent stump
#

Or alternatively Slackware ||if this was 10 years ago||

#

"what's the solution to dependency hell? Just install everything to begin with"

olive ice
#

The only distros I’m running at minute are void Linux artix and Ubuntu I say this for no reason

silent stump
#

For what purpose

#

Systemd is not the devil

analog smelt
#

anyone use pipenv?

dawn pine
#

(because systemd is fat)

lavish storm
olive ice
safe sorrel
#

had an opensuse chameleon plushy in my car. used it as a window cleaner lol
unfortunately both are gone

woven yarrow
#

How can I debug a why does my Ubuntu VM suddenly has no internet? I don't remember changing anything networking wise, but I can't SSH into it anymore (nor can ping from it successfully)

olive silo
#

or did your router get restarted for any reason

woven yarrow
#

Not that I know of but it's possible, why?

olive silo
#

Because when it restarts each device on your network(s) gets a new private IP

woven yarrow
#

I'm using a static IP on it

olive silo
#

Hm. and this VM is on your primary machine, like the one you're texting me on right now, right?

#

Or well, I'm assuming you're on your PC texting

woven yarrow
#

Yes it's on my laptop (current machine)

#

But I have 2 more VM's from my desktop and they are working fine

#

(same network)

olive silo
#

Alright, and what VM Hypervisor are you using?

woven yarrow
#

Hyper-V

olive silo
#

Hm.

woven yarrow
#

Running from a switch I created for that VM

olive silo
#

Well, you said you haven't messed with your network at all like, setting wise

#

Like in the VM settings you haven't messed with it's internet

woven yarrow
#

at least I don't think or wanted to

#

How can I debug it?

olive silo
#

Hm. Could you possibly go to the VM network settings and Send a SS of it all? any sub categories and stuff. Ofc, if you need to, crop out the static IP it has if it happens to show up

woven yarrow
#

Things might have changed on the VM but I definitely did not mess with these since it stopped working

olive silo
#

hm. give me a min, doing something, but i'll check it out

woven yarrow
#

Alrighty

olive silo
#

alright so, just to make sure, you have access to the machine running the VM, like if you wanted to you could walk to the PC and mess with the files manually and stuff

#

Nvm, you do

#

Alright so

#

What you should do is go to the VM, and type two things, ifconfig

#

and if that doesn't work

#

ipconfig

#

With that, it should say like, 192.text

#

That should be the IP address of the VM

#

meaning, you can most likely ping it, then if it pings, try to ssh into it

#

I personally, will try to do that myself, with VirtualBox, so we can both understand

woven yarrow
olive silo
#

ok so

#

with that, install ifconfig

#

apt install net-tools

#

as it suggests

#

then afterwards try the ifconfig

woven yarrow
#

But I don't have internet lol

olive silo
#

Oh it just doesn't have internet access at all?

#

Hm

#

Well this is... not fun

#

Does said VM have a GUI or is it only terminal based

woven yarrow
#

It's server only

olive silo
#

😩 Linux sucks sometimes

#

Have you tried looking up things you can do to enable network connections

woven yarrow
#

When I try ssh localhost it gives connection refused

#

So something definitely not right

olive silo
#

Hm

#

Try this

woven yarrow
#

Yeah

olive silo
#

ping an IP

#

such as

#

1.1.1.1

#

see if it gives any pings

woven yarrow
#

Pinging localhost works

olive silo
#

Bruhhh why're HVs so dumb sometimes

#

Hm

#

Well hol up

#

And, what OS is this?

#

Ubuntu

#

?

woven yarrow
#

Yeah ubuntu 20.04

olive silo
#

k

#

This seems to be your exact issue

#

k

#

so

#

Im gonna guide you through everything

#

so it's easy on you

#

first off, run this
sudo mv /etc/netplan/*.yaml /etc/netplan/01-netcfg.yaml

woven yarrow
#

1 sec

#

Let me show my config first

#

Because I did touch that

olive silo
#

then, run this
sudo nano /etc/netplan/01-netcfg.yaml

#

oh alr

woven yarrow
#

Does that look alright?

#

dhcp4 is false so it doesn't give a dynamic also

#

Been running it like that for a while

olive silo
#

Let me see according to the page

woven yarrow
#

(the 2 other VM's on my PC have the exact same config just .200 and .202)

olive silo
#
"Change the file to read: "
network:
  version: 2
  renderer: networkd
  ethernets:
    ens33:
      dhcp4: true```
#
Netplan is very particular about spacing, indentation, etc. Proofread carefully twice. Save (Ctrl+o followed by Enter) and exit (Ctrl+x) the text editor. Follow with:```
#
sudo netplan generate
sudo netplan apply```
woven yarrow
#

Hm wait

#

I've changed it back to the default

olive silo
#

Mhm..

woven yarrow
#

I.e. removed addresses and changed false to true

#

And now I think I have internet

olive silo
#

Try to ping that IP

#

or well

#

for that case any IP

woven yarrow
#

Yeah pinging google works now

olive silo
#

well there ya go

woven yarrow
#

So what the hell is happening

#

I'm using the exact same config file on the 2 other VM's too

olive silo
#

It may be the network card on that Desktop

#

it might be wlan

#

instead of eth0

woven yarrow
#

It's eth0 too

#

SSH still won't seem to work

#

(trying to connect to the new dynamic IP)

olive silo
#

It's because that IP is well, only available to that VM

#

I tried to ping an IP of my parrot os installation and it wouldn't ping

#

so you'd have to re-convert that stuff into a static IP

woven yarrow
#

I can SSH into my PC's VMs just fine though

#

And on this one I'm having issues with even ssh localhost fails

olive silo
#

So, it can ping, and everything

#

but it can't ssh

#

My System can't ssh localhost

#

localhost isn't able to ssh in any ways

#

it's just the localhost

#

however, if you tried to ssh into lets say

#

those Vms on your other PC

woven yarrow
#

But it works on the other VM's lol

olive silo
#

assuming they have static IPs as well, it should work

woven yarrow
#

ssh localhost works on the others

olive silo
#

thats od

#

odd*

#

did you install those net-tools

woven yarrow
#

Yes

olive silo
#

weird

#

type just ssh

#

and see if it has something that gives an output

#

like says what args ssh takes

woven yarrow
#

Yes it has the default one

olive silo
#

odd

#

brb

#

it seems you also have to enable ssh

#

try this

#

ps -aux | grep ssh

woven yarrow
#

Can't copy paste from this garbage terminal sorry

olive silo
#

no worrys, anyway, try this

sudo apt-get install openssh-server -y

#

all that does is install openssh-server

woven yarrow
#

Already have it installed but I'll try nuking it

olive silo
#

if you wonder what it does

#

No

#

Don't try to remove it

#

haha

woven yarrow
#

Welp too late lol

olive silo
#

just wait in that case

#

Alright

#

well then just make sure to re install it

woven yarrow
#

Yeyyyy

#

It worked

#

Thanks for the help man

olive silo
#

Ofc

#

There was more but, seems like you got that working with that

#

so, have fun ig!

woven yarrow
#

Fun in linux lol does that even exist?

olive ice
#

Learn Linux

real swan
#

if you run the same program twice what section would be shared in the memory?

#

is it code section?

summer trail
#

The code segment could be shared, yes.

molten wedge
#
glob.glob('**/*.txt',recursive=True):matches all files ending in '.txt' in the current directory and in all subdirectories
#

How can I get this behaviour in bash?

#

I tried ls **/*.txt but it didnt work

lavish storm
#

well tried it with png but same deal

molten wedge
lavish storm
#

oh you want multiple extensions

molten wedge
#

im trying to get all tailwind config files in current directory and sub dirs

lavish storm
#

you could try egrep

molten wedge
#

im using the js glob package

lavish storm
#

i don't know any js sorry

molten wedge
#

it has the same syntax as bash though

#

i just need the pattern

lavish storm
#
ls -R */*(tailwind|windi).config.(cjs|js|mjs|ts)

works

#

i'm unsure about braces i've never used them myself

molten wedge
#

thanks it works, ill try to port it to js

real swan
#

whats the diff btw structure of os and type of os?
diff btw (simple, layered, microkernel, modular) vs (batch, timesharing, multiprogramming...)

steep wagon
#

when using bash to import a function from another script what is the procedure

#

?

#

i am using source but some of the functions are found and others are not

#

i have no clue why

formal schooner
#

bash doesn't have any notion of "importing" anything

#

source just runs a script

undone pulsar
#

It "imports" only in the sense that all names in the script you source are available to you afterwards, but this is only because it executes in the current shell.

#

In all other respects source script (or . script if you're not on bash) is just running another script, so it won't cache modules or implement namespacing or anything like that

#

If you want to "import" from another script like this, you could do some fuckery with BASH_SOURCE to prevent execution when the script is sourced:

#!/usr/bin/env bash

bar() {
  rev <<< "$@"
}

main() {
  echo "Reversing input..."
  bar $@
  echo "Input reversed!"
}

if [ $BASH_SOURCE = $0 ]
then
  main $@
fi
#

This is a bashism though so I'd probably steer clear

summer trail
safe sorrel
olive ice
#

Install gentoo that’s fun

#

Funtoo exists

violet falcon
#

Someone give me a distro to use I have a pentium 6405u with 8gb of ddr4 ram

lavish storm
#

literally any linux distro

violet falcon
#

ugh idk what to do I want something super stable and Debian 11 doesn’t come out until august 14

lavish storm
#

i don't know what kind of things you want to do that needs your system to be "super stable"

olive ice
#

FreeBSD stable says that never ran bsd on real hardware

lavish storm
#

i've scoured the entire documentation and did not find a single thing about "never ran on real hardware"

#

besides if that was the case then why would they have Hardware Compatibility List?

glad bough
#

does anyone know how to install whl files with python2

#

I am having issues installing this watchdog whl file on my pc intranet environment

amber garnet
hard lion
#

Hey, im sorting a list with "sort" in bash and with "sorted" in python.
But they have a different sorting. Bash sorting numbers first, and python first giving me strings beginning with a dot.
Does someone know if there is a general "sort order" or where to look up on that? man sort doesnt gave me the hint i needed.

amber garnet
shy yokeBOT
#

@amber garnet :white_check_mark: Your eval job has completed with return code 0.

001 | [0, 3, 5, 8, 10]
002 | ['0', '10', '3', '5', '8']
amber garnet
#

All depends what you have - strs or ints

hard lion
#

Ah. Didnt thought about that. Thank you

amber garnet
hard lion
#

I checked an in my python list, its strings. And in Bash i piped multiple lines to sort.

#

So doesnt seem to have to do with ints.

formal schooner
#

@hard lion keep in mind sort is a standalone program, it's not part of bash. that said, can you give us example data that demonstrates the inconsistency? including your python code

clever spoke
#

Incoming from general:

wise valve
#

So I can't download VS code in my system for some reason. I tried folllowing the instructions from the vs code website but they just dont work.

#

I did have vscode previously

#

but I had purged it for some reason

dense wigeon
#

install the .deb package?

clever spoke
#

Which distro are you using (linux)

hard lion
# formal schooner <@!396333928635564034> keep in mind `sort` is a standalone program, it's not par...

You are right.
I tried to sort these 3 strings:
jquery.js
jquery.jshowoff2.js
jquery.jshowoff.min.js
(thats the order with sort)
An in python I used "sorted(nameOfMyList)
The whole code is:

#!/usr/bin/python3.9
import re
expression="(?<=/)[\w\.]+.js "
output = []
file = open("access_log.txt")
lines = file.readlines()
file.close

for i in range(len(lines)):
    matches = re.findall(expression,lines[i])
    if matches != []:
        for j in matches:
            if j not in output:
                output.append(j)
print(sorted(output))
wise valve
clever spoke
#

Does the Software Center not work?

wise valve
clever spoke
#

I thought I got VS Code up and running from there, if you are looking to do it from source / command line give me a second

wise valve
#

They gave me a blank line

#

for each code

formal schooner
shy yokeBOT
#

@formal schooner :white_check_mark: Your eval job has completed with return code 0.

['jquery.js', 'jquery.jshowoff.min.js', 'jquery.jshowoff2.js']
wise valve
#

should i share my terminal?

clever spoke
#

Maybe a screen shot?

#

Did you use snap or apt?

formal schooner
#

@hard lion i get this result from my sort command:

jquery.js
jquery.jshowoff.min.js
jquery.jshowoff2.js
wise valve
#

they worked the first time

#

but havent worked after I purged VS code

clever spoke
wise valve
#

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/ sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list' rm -f packages.microsoft.gpg

#

i used these commands

clever spoke
#

Huh

wise valve
clever spoke
#

Did you see the link I sent?

wise valve
#

yes

#

thats the link i followed

hard lion
clever spoke
#

I would recommend the block before it, depending on where you saved the .deb package you would run
sudo apt install ./code_1.59.0-1628120042_amd64.deb

formal schooner
#

did you alias sort to something else?

hard lion
clever spoke
wise valve
#

ohk

hard lion
clever spoke
#

An alternative to all of this is to use the Software Center, the GUI application to download / install VS Code from

wise valve
formal schooner
wise valve
#

btw today i updated my system

clever spoke
wise valve
#

but it didnt download thats the thing

#

it just gave me a blank line

clever spoke
#

If you click this link it will download the .deb file, I would save it on your system and then cd in your terminal to that directory and run the install

wise valve
#

I had installed vscode before as i mentioned

clever spoke
hard lion
clever spoke
formal schooner
#

@hard lion possibly different versions of sort, or different LC_ALL, LANG, etc. environment variables.

olive ice
opaque ginkgo
#

all real programmers use ed

dapper musk
#

*all real programmers use dd. ed is bloat

fallow wadi
#

nothing is better than cat

surreal harness
#

pfft imagine using things like heredocs

fallow wadi
#

i can do better

#

smh

surreal harness
#

just press ctrl + d galaxybrain

#

or disconnect your terminal

#

if it's physical

fallow wadi
#

lmfao

#

or just use M-x butterfly

surreal harness
main olive
fallow wadi
#

xterm

main olive
#

square brackets in prompt would drive me into depression

fallow wadi
#

good for you

#

i don't give a shit

main olive
dense wigeon
#

So basically, I want to create a group called guests and put users in it (Ubuntu 20.4)

The group has no access, but they get a directory called /home/guests (no rwx access just a folder to keep it's users in)
Each user added into the group must only have rwx-access to /home/guests/USER which becomes their home directory and no access at all in any other directory e.g. /home/guests/anotherUser

How do I achieve this? Please explain with steps and what each steps does. Thanks in advance!

hushed spoke
#

Hey I made a simple python curses app that gets loaded with bootlocal.sh on startup. It works and runs but it seems that it doesn't have keyboard focus or something. If I press enter the prompt will appear overlapping my curses GUI... How am I supposed to do this properly? I'm using tinycore pure 64bit

amber garnet
dense wigeon
#

nvm got it done

#

Got into making my own shell script for the first time

lavish lodge
#

How can i properly run a python script to run 24/7 on a linux machine? Preferably without screens

molten wedge
lavish lodge
#

Always

#

I tried with systemd but

#

The programms stop after leaving the ssh session

molten wedge
#

Use docker compose and the restart setting.

lavish lodge
#

Compose?

molten wedge
#

Docker compose

#

Yes

#

I domt think plain docker can restart containers

lavish lodge
#

Gmm im really new to docker. But are you familiar with services? Cuz i couldnt configure them correctly for my use case

#

Is it possible to give a non root user the permission to start/stop a specific system service?

#

That would solve all my problems actually

molten wedge
amber garnet
slate crypt
#

Maybe sshd?

amber garnet
slate crypt
#

Tmux is a solution.

amber garnet
#

I think that the problem is with the service configuration

#

@lavish lodge can you share your code?

vivid path
#

guys i'm making a script to see if i using lvm

#
cat /etc/fstab | grep -c /dev/mapper/
#

but i wanna be able to get a "yes" or "no" based on output is different than 0

#
cat /etc/fstab | grep -c /dev/mapper/ | true ? "yes" : "no"
#

something like that

opaque ginkgo
#

cat ... && echo yes || echo no

#

or use a if statement

#

@vivid path

vivid path
#

i kind resolve this using awk

olive ice
formal schooner
#

@vivid path

if grep -q -F '/dev/mapper' /etc/fstab
then
  echo "LVM"
else
  echo "Not LVM"
fi
vivid path
woven yarrow
#

I'm running a Python app as a systemd service on multiple Ubuntu servers, and I would like to keep the deployments in sync, as in whenever I push an update to GitHub all the servers should update their local git and restart the systemd service. What would be a great solution for this?

scarlet totem
woven yarrow
scarlet totem
formal schooner
#

would it make sense to use something like saltstack or ansible for this?

#

i think fabric is another tool along those lines? i remember an old employer used that

tranquil valley
#

Hey there, wanted to ask if there are any differences in Python programming between Linux & Windows?

main olive
#

generally in most scenarios no

#

usually you come across differences when using some obscure python modules

#

which can be OS dependent

tranquil valley
#

okay, thanks

thin jacinth
#

yesterday i installed ubuntu on my system and then my microphone is dead. i don't know how to fix it.

rain ether
#

Running on Debian 10, I'm calling os.system("umount /dev/sr0") and then os.system("eject /dev/sr0") and the disk is ejecting and then immediately retracting.

I don't see this behavior when I call eject from the command line.

I did find some decades old bug reports against the Linux kernel that imply that the tray cycling happens when called on something that is still mounted which doesn't seem to fit here... Thinking it could be still "sort of" mounted I added some time.sleep() between the two calls to no use.

Anyone have any suggestions I could try? Or run in to this themselves?

formal schooner
#

do you not have the problem in bash/dash?

rain ether
#

No... but at the same time I'm also not processing anything heavily on the disk in bash.

formal schooner
#

also os.system should be banned forever, use subprocess.run!

rain ether
#

I'll give that a whirl to see if that makes a difference.

This is actually code from a "rip your dvds automatically" project so I'll blame them 😉

formal schooner
#

i would love a shell/terminal that supports a "structured interactive command line". where a command line is a sequence of "slots", and instead of quoting, everything in a slot is always parsed as 1 argument, unless you specifically request it to be expanded. the spacebar would be a keyboard shortcut for advancing by 1 slot.

#

it would encourage people to stop conflating "shell script syntax" with "invoking an executable with some arguments"

rain ether
#

I'm not versed enough in the way OSes handle parameter passing to be wise here but I don't see the distinction between quoted parameters and your slots.

formal schooner
#

because quoting is hard and fussy

olive ice
sharp palm
#

no one is reacting to posts in the help channels, so I thought I'd try my luck here. what am I doing wrong?

#

its on a VM

amber garnet
#

!venv

shy yokeBOT
#

Virtual Environments

Virtual environments are isolated Python environments, which make it easier to keep your system clean and manage dependencies. By default, when activated, only libraries and scripts installed in the virtual environment are accessible, preventing cross-project dependency conflicts, and allowing easy isolation of requirements.

To create a new virtual environment, you can use the standard library venv module: python3 -m venv .venv (replace python3 with python or py on Windows)

Then, to activate the new virtual environment:

Windows (PowerShell): .venv\Scripts\Activate.ps1
or (Command Prompt): .venv\Scripts\activate.bat
MacOS / Linux (Bash): source .venv/bin/activate

Packages can then be installed to the virtual environment using pip, as normal.

For more information, take a read of the documentation. If you run code through your editor, check its documentation on how to make it use your virtual environment. For example, see the VSCode or PyCharm docs.

Tools such as poetry and pipenv can manage the creation of virtual environments as well as project dependencies, making packaging and installing your project easier.

Note: When using Windows PowerShell, you may need to change the execution policy first. This is only required once:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

amber garnet
#

Use python3 and pip3 commands from your venv to install this package

sharp palm
#

isnt that necessary?

amber garnet
sharp palm
#

you mean this right?

amber garnet
# sharp palm

You can select just Python 3.8 under /usr/bin/python3.8 directory to pick global interpreter

sharp palm
#

so I don't need the tensorenv?

amber garnet
#

I prefer to have venv-per-project

sharp palm
#

this has to be done in the python project?

amber garnet
sharp palm
#

was confused about that lol

amber garnet
#

Describe what do you want to do

#

Install missing package?

sharp palm
#

I want to create a project, that I can use keras and tensorflow with.

#

for ML

amber garnet
#

You can open terminal in PyCharm (it's available at the bottom bar) and there put pip3 install keras

sharp palm
#

and/or anaconda, I dont rlly know the relationship between tensor and anaconda

#

ah, great

amber garnet
sharp palm
#

yeah

amber garnet
#

The ai is part of the name of this channel lol

sharp palm
#

thought it wouldnt include setting up projects

#

since thats really basic stuff

#

importing libs

formal schooner
#

@sharp palm Anaconda is a distribution of Python that includes the Conda package manager and several other tools and libraries for scientific programming. See here: https://docs.anaconda.com/anaconda/

pine hedge
#

anyone know how I can convert this to work on windows?

"start": "touch .env.local && sh -ac 'sh .env.${NODE_ENV:-local}; PORT=${PORT:-3000} EXTEND_ESLINT=true BROWSER=none react-scripts start'",
pine hedge
#

never, I'm a moron

#

ignore me

#

react-scripts start worked

violet falcon
#

How much swap should I use with 8gb ram

formal schooner
#

if i have enough disk space, i still do the old 1:1

#

that way i can have 1000 tabs open and whatever other stupid shit im doing and still be able to hibernate

#

i use a swapfile, not a partition. just easier to set up (and easier to resize if you change your mind)

terse heron
#

idiot @ocean bobcat

signal knoll
hushed heart
#

i just installed arch can i have some desktop environment recomendations?

main olive
#

GNOME

hushed heart
#

makes sense

main olive
#

cause i like new kali gnome theme so much

hushed heart
#

i mean yea it is pretty nice

main olive
#

if you are coming from Mac or want Mac design dock and finder

#

something like this maybe

hushed heart
#

if i didnt know it was linux

#

i wouldve actually thought it was a mac

#

my sister is using some old imac as her computer

main olive
#

you should consider getting a mac as well

#

its technically unix too

hushed heart
#

yeah i wanna get a macbook

main olive
#

you can find affordable ones

#

used

#

or refurbished

hushed heart
#

i think it would be pretty useful

#

and i love how i can use usb c to plug it into a monitor

main olive
#

cant you do that on linux

#

out of the box?

hushed heart
#

yeah but like

#

i kinda never had a laptop

#

i only had desktops

#

towers

#

so it's all pretty new to me

#

ig

#

and it seems nice to like stay in bed and have a bigger screen than a tablet or phone

main olive
#

in terms of laptops i dont know

#

i would still bet you would get the best experience in terms of smoothness and fluidness

#

if you go with MacOS

hushed heart
#

yeah

#

i looked around and it's pretty customizable

main olive
#

MacOS is pretty customizable

hushed heart
#

yeah

#

like i saw yabai

main olive
#

in some ways i was even able to achieve more on macos than on linux

hushed heart
#

or however its called

main olive
#

like remapping keys

hushed heart
#

yeah

main olive
#

is way simpler on macos

hushed heart
#

i mean i guess mac is way more user friendly

#

kinda like windows

#

but not as privacy invasive?

#

and it always looked really nice

main olive
#

worse

#

than windows

hushed heart
#

lmao

main olive
#

in terms of latest

#

apple laptops and their macos versions

#

its horrible

#

actually horrible

hushed heart
#

yeah

#

thats why i want to switch to linux

#

but it's pretty hard

#

since i wanna game on it

#

and i'd have to make a kvm

#

etc etc

main olive
#

you are switching to linux from windows?

hushed heart
#

yeah

main olive
#

i wouldnt suggest going with KDE

#

honestly

#

especially if you dont have a good machine in terms of specs

#

animations and everything is smoother in gnome

hushed heart
#

i think it's pretty solid

main olive
#

from my experience

hushed heart
#

i see

main olive
#

gnome is arguably the most stable

#

it has existed for so long

#

they've perfected it

hushed heart
#

i have a ryzen 5 5600x 32gb ram gtx 1070 ti and maybe if i make a kvm i have a 1060 lying around

#

still waiting to get a 3080

main olive
#

i guess

#

then running KDE and

#

installing tons of tweaks

#

wouldnt be an issue

#

@hushed heart

#

try gnome first

#

start simple

#

if you feel like its not enough

#

upgrade to KDE

#

and install any of the thousands of cool themes people have created for KDE specifically

hushed heart
#

yeah

main olive
#

you've seen some online already i assume

hushed heart
#

yeah

#

i saw them on reddit youtube etc

main olive
#

the way i have it

#

is i have GNOME on my desktop

hushed heart
#

yeah

main olive
#

and whenever i want more aesthetics

hushed heart
#

ye

main olive
#

i get my macbook out

#

for macos

hushed heart
#

yeah makes sense

main olive
#

if you put MacOS next to some good KDE theme

#

MacOS would be hard to beat

#

still

#

its as good as operating systems get

#

in terms of visuals

hushed heart
#

yeah

main olive
#

even windows 11 is stealing some features from macos

#

like the dock

#

so it must mean its good

hushed heart
#

yeah

#

and the rounded edges

#

i think

main olive
#

whats a window docking

#

exactly

#

you mean

#

grids

#

as opposed just 2

#

spaces

#

on the sides

#

i mean sure terminal only needs to take up one corner aka one fourth of whole screen space

#

but i doubt this would be useful

#

for the end user

#

maybe i am only saying it cause i am always used to alt tabbing

#

between my windows

hushed heart
main olive
#

i have 2 monitors

#

one 1440

#

p

#

and i still use alt tab

#

at all times

hushed heart
#

i really need to get a second monitor

#

tbh

main olive
#

they should've made windows 11 open source

hushed heart
#

that would've been amazing

#

yeah

#

i was gonna say the same thing

main olive
#

honestly they can still earn money from proprietary apps like microsoft store

#

and etc

#

i dont know how much money they earn from spying on users

#

due to the code being closed source

hushed heart
main olive
#

they should open source at least some stuff

#

idk start with edge

#

maybe

hushed heart
main olive
#

everyone

hushed heart
#

what

#

why

main olive
#

you are forgetting about gamers

hushed heart
#

i mean yea it's a store but it kinda sucks imo

main olive
#

PC/Xbox gamers buy from microsoft store

hushed heart
#

then i havent used it enough

main olive
#

you just dont play as much

hushed heart
#

i mean yea i guess

#

idk but it would be amazing to port old games to the microsoft store and pc

#

cuz like

main olive
#

they do

hushed heart
#

i dont want to pull out my xbox to play skate 3

main olive
#

microsoft has good backwards compatibility

hushed heart
#

yeah true

main olive
#

if you think about it

#

you can run 15-20 year old games

#

on windows 10

hushed heart
#

i think i just play really unpopular games

hushed heart
main olive
#

that ran on previous windows versions

hushed heart
#

yeah

main olive
#

if those system requirements were legit

#

then i can hardly imagine how much more bloat

#

did they include in the source code

#

for this windows

#

as if we could get any more bloat

#

than on windows 10

hushed heart
#

yeah

main olive
#

its not a massive upgrade from windows 10 visually so wtf

hushed heart
#

that's probably why im not going to download windows 11 any time soon

main olive
#

xp source code got leaked so you could take a look

hushed heart
#

and by that time i think i'll just use linux

hushed heart
main olive
#

was it in c++

#

yeah microsoft will have to backtrack

#

on those requirements

hushed heart
main olive
#

windows 11 hasnt been released yet

#

maybe those requirements were exaggerated

#

only a small vocal minority even knows about those system requirements

#

yet billions will probably use windows 11

#

in 5 years

#

how many computers have windows 10 installed

#

have you got any vague numbers

#

in mind

#

"most secure" yet "most vulnerable"

#

i dont get whats the deal with microsoft

#

when you compare benchmarks of stock windows 10 vs debloated windows 10

#

it really makes you wonder how is adding so much bloat in any way a good business strategy

#

are they just forcing people to buy newer hardware

#

by bloating windows

#

intentionally

#

they can make it more lightweight

#

they surely can

#

it isnt really easy

#

there are 3rd party apps that help

#

but without them your normie user wouldnt

#

figure out

#

@obsidian maple do you use any non android/ios phone

#

by any chance

#

i presume not samsung

#

phone

#

you dont remember

#

the brand of your phone

#

that is exciting

#

indeed

#

surprising

#

you use linux right

#

besides windows

#

how do you handle samsung + google intergration

#

with tons of popup

#

for creating accounts

#

for both

#

like usually android only pushes you to create and integrate google accounts

#

into your phone

#

but with samsung phones its that but also samsung accounts

#

even more bloat

#

even that is my primary reason for

#

being reluctant to switching to android phones

#

even though i want to

#

its googled

#

tho

#

i probably trust apple more than google

#

cause at least apple preaches about security every conference they have

#

while yes being shady in reality

#

but google doesnt even bring up security

#

as much

#

makes me only more suspicious of them

#

you dont have a privacy if you use a gmail account

#

youtube is tolerable and understandable

#

but gmail

#

google can read your emails

#

you need to switch email provider asap

#

lonely

#

clean of what

#

any messages

#

thats not really making it clean

#

its just not using it

#

whatsoever

#

though

#

isnt it

#

i am finally gonna host by own email server

#

i am trying to buy a good domain name currently

#

not a website

#

just an email server

#

and hosting some stuff for my work

#

when you host your own email server you cant really have a domain name like cheekybomber.com

#

cause then as soon as anyone sees an email coming from john@cheekybomber.com

#

they would insta block

#

you

#

came up with it

#

point is it needs to be normal

#

otherwise people wont read it

#

guys so im a total linux noob

#

some only trust emails ending with @gmail.com

#

lol

#

yes i did some but i got a error

#

in terminal

#

what is your error

#

bash: git: command not found

#

already done that

#

pl ot dod

#

i meant ok it did

#

how

#

i did

#

it showed a bunch of stuff

#

yes

#

lot of

#

/usr/share/doc/git/relnotes/1.6.5.8.txt

#

i think so

#

/usr/share/doc/git/contrib/git-shell-commands/help

#

ok i did

#

yes

#

i already did that

#

i think upgrading python messed with all the things

#

it all happened after it

#

python 3 latest

#

ok

#

it deleted some of my apps

#

why is that

#

oh ok so i dont need to install everything again right?

#

ok i installed it

#

what i need to do rn

#

git clone

#

lol i just forgot i cant copy things from vm

#

yes i will use this to use my phone as security cam

#

if there is another option send it to me

#

bash: git: command not found

#

install git again?

#

i did sudo apt install git again

#

i did su root

#

and python and some other stuff

#

i have on login

#

kali

#

just eh

#

just learning about it really

#

oh yea thats obv haha

#

maybe i'll switch to parrot os kali is kinda buggy

#

yeah i dont i use w10

#

for daily use

#

im testing stuff on my own phone and pc

#

so i dont think anything illegal

#

dont have too much ram

#

i have 8

#

but it doesnt work out

#

the windows vm i tried to use is just too buggy

#

yea

#

its kinda a mess

#

even if im hacking myself?

#

also i got this kali .ova from another website

#

its not official

#

it came with a course

#

i think i copy from my vm

#

its my friends tag i copied it to add him

#

like?

#

oh ok i gotta be careful

#

u also ethical hack or?

#

oh cool

#

what os u use?

#

for eh?

#

which distro

#

ethical hacking?

#

no what do u use for ethical hacking

#

ok let me do that

#

is vmware better or vbox

#

32 bit or 64

#

oh my processor is x64 the last kali i had was 32

#

maybe thats why

#

also do you have a good tutorial for kali and ethical hacking

#

oh ok

#

or something like that

#

its has 158k subs on yt

#

and its the top rated course on udemy

#

oh i saw him

#

yea his vids are pretty fun

#

i didnt get the nano etc stuff tho

#

i couldnt save it

#

tried that

#

i think i broke it with the insert thing

#

i tried proxychains

#

yea that worked

#

on openvpn

#

i know some

#

but not so much

#

thats true

#

every day you learn something new

#

and have more experience

#

sorry my english is a bit bad lol

#

looks kinda complicated

#

what do you mean by that

#

oh

#

thats interesting

#

also if i clone random gits

#

can i get hacked?

#

oh this kinda looks like ls

#

do i need some C knowledge to understand these stuff

#

do u know any programming?

#

oh im too young for that haha

#

i just did some java

#

well thats young

#

i started in 12

#

bc i didnt have pc

#

yea i wont

#

i know some java for minecraft plugins and a bit of opengl

#

which languages did you do

#

also i think we are both 15?

#

i got 15 last month

#

what do you do generally in coding or ethical hacking

#

yea

#

cool same i make fun projects with opengl

#

kinda learning that also

#

did someone like your family or school made you start programming or you find about it yourself

#

thats good

#

how many hrs a day u program or do ethical hacking

#

like average a day?

#

im just trying to figure out how many hrs a day makes you better

#

or how you got this far

#

yea i have less time bc of soccer training and stuff

#

but i try to learn as much as i can

#

same

#

is it like house chores or?

#

thats cool

#

i dont do house chores really bc i also work

#

thats cool i did that when my windows broke

#

no my hard drive fried so i made a bootable usb

#

oof

#

download failed

#

network error

#

and i have 2mbps internet

#

im unlucky

#

i live in a village so its not really possible

#

i use usb tethering and use my phone internet on my pc

#

we dont have ethernet base or any fiber base here

#

its only in the center of the city

#

so its pretty unlucky

#

do you live in us?

#

thats cool

#

good oppurtunities,good economy,good system,not corrupt

#

u think its different?

#

you cant just pass the school by giving money or get a fake diploma

#

like here

#

any lot of other examples

#

why

#

1st one

#

how

#

bullying and stuff?