#unix

1 messages · Page 7 of 1

summer trail
#

What do you mean by "unix-interpretable"?

ebon dove
#

I mean, is there a distinction between the set of all characters available in unix-like systems and the set of all characters that have a unicode representation?

summer trail
#

Hm. Well, Unix filesystem paths don't need to be valid UTF-8 strings, which might sort of be what you're asking about

#

Other than that, I guess it might depend on what you mean by "available"...

ebon dove
#

I'll read up on UTF-8, that'll get me started. Thank you!

formal schooner
# ebon dove I mean, is there a distinction between the set of all characters available in un...

file paths on unix-like systems are blobs of bytes with no particular file encoding.

unicode is an abstract system of representing text as a sequence of "code points", so it's not really relevant to things that are blobs of bytes (nor is there a clearly defined idea of a "character" in unicode).

there are several systems for representing unicode in a string of bytes. these are called encodings. the most preferred encoding for general use is UTF-8, but you'll also see UTF-16 and its ancestor UCS-2 occasionally (notably in Javascript), and internally some systems (like Python) use UTF-32 because it has certain desirable characteristics. in 2023, most webpages and "text" files on your computer should be encoded in UTF-8. ideally the same is true for file paths, but there's no strict requirement that it be true. this is what godlygeek was talking about.

#

see here for an interesting discussion https://dwheeler.com/essays/fixing-unix-linux-filenames.html

ebon dove
south fossil
#

I don't know what "unix-interpretable" characters are, but I think unicode can represent any character including 8-bit ASCII

formal schooner
#

it's basically 1 number per "code point", but the notion of a visible character is more like what unicode calls an "extended grapheme cluster"

#

and yes the lowest numbers correspond exactly with ascii, and very closely (but not exactly) with latin-1, iso-8859-1, windows cp-1252, et al

#

that is, ascii character 1 is unicode code point 1, ascii character 2 is unicode code point 2, etc. the "basic latin" block of unicode is the set of ascii characters.

summer trail
#

the "basic latin" block of Unicode comes directly from ISO-8859-1

#

!e print(all(chr(i) == bytes([i]).decode("latin1") for i in range(256)))

shy yokeBOT
#

@summer trail :white_check_mark: Your 3.11 eval job has completed with return code 0.

True
formal schooner
#

maybe windows cp-1252 is the one that's slightly incompatible with unicode? i can't remember

summer trail
#

yeah, cp-1252 overlaps a lot with latin1, but not entirely

hallow herald
#

Binbows uses ucs2

#

but claims that its utf16

vagrant frigate
#

i am getting this permision error even though i am giving the the permission to the user pcmcom with chown -cR pcmcom:pcmcom but still i nginx can't access the file. what permisson should i give and to whom?

2023/08/13 10:42:04 [crit] 11578#11578: *11 stat() "/home/pcmcom/paymall_frontend/web-build/index.html" failed (13: Permission denied), client: 47.29.161.81, server: domain.com, request: "GET / HTTP/1.1", host: "domain.com"
spark mulch
#

Your nginx is running under the user pcmcom? It usually runs as www-data AFAIR

drowsy saffron
#

hello

#

I run ubuntu on Oracle vmware

#

today had an error while starting: failed to send host log message

#

can anyone help me?

knotty saddle
#

I'm new to programming

ember quiver
#

But you'll find lots of other people suggesting lots of other things so just keep at it

south fossil
fallow tusk
#

VMWare - a Virtual Machine controller (a la virtualbox)

#

I get the "failed to send host log message" all the time; it doesn't appear to mean much - nothing nasty has happened whenever I get it, at least ;)

ember quiver
fallow tusk
#

I didn't say they were. I said "a la virtualbox" - i.e. in the same mannter that virtualbox is

#

Yeah, I'm just trying the blacklist option

south fossil
#

Yes but what is "oracle vmware"?

fallow tusk
#

VMWare is made by Oracle

#

fwiw, it seems there's an issue in the vmwgfx driver - there was an addition to send a log message from the driver to (afaict) the hypervisor. But virtualbox (and presumably VMWare) don't have anywhere to receive that message. Hence the error.

#

I had misunderstood dowcet's post as saying that the vmwgfx driver wasn't needed if you were using VMSVGA. This isn't the case - it is needed. After putting the blacklist in place, and then updating initramfs to exclude the module, the machine rebooted, but I couldn't use X (oddly I could get the DM selector up, but then got a blank screen with no WM)

drowsy saffron
#

thats the problem

south fossil
fallow tusk
#

Yes

fallow tusk
#

When you see that, are you able to get to another tty (ctrl-alt-F2, for tty2, say)?

south fossil
#

Oracle is a company, and VMware is a company. Those are two different companies, and AFAIK one didn't bought another.

fallow tusk
#

Ah - Oracle provides a VMWare service

#

Interesting. I'll swear I've seen Oracle branding for more than just a VMWare hosting service. (Which is also what I assume the OP has seen)

spark mulch
#

VirtualBox is by Oracle

fickle granite
#

Broadcom owns (or intends to own) VMware; Oracle is separate

hallow herald
#

Does unix have no such thing as global (OS wide) (named) mutex?

fickle granite
#

not sure. If such a thing existed, it'd almost certainly live in the file system.

fallow tusk
#

Yep anything like that would be under POSIX…

severe sable
#

Hi, don't know if it's the right server to me asking in, but i've got two tarballs, control.tar.gz and data.tar.gz and would like to make it into a debian file. It used to be in a .deb file but i extracted it to do some edits on the control file, but now i can't figure out how to make it into a deb file again

spark mulch
fallow tusk
#

I don't know what the input to dpkg-deb is, but you can just concatenate two (unzipped) tarballs directly

royal bone
#

Hi guys,
Got a problem.
Scenario -
I'm trying to install python 3.8 or higher to goDaddy shared hosting.
Got some nice stuff in this blog - https://www.godaddy.com/resources/skills/how-to-install-and-configure-python-on-a-hosted-server
The 3.4 version is working fine.
But when I try to compile the 3.8.
There is always an pip SSL error.
Here is a link which I was following to resolve the issue - https://jhooq.com/pip-install-connection-error/

I have tried everything in the blog.
Tried asking ChatGPT too.
The answer was to add --with-ssl at the time of configure.
It throws an error that this flag is not defined.
I'm stuck with it.
Any help will be appreciated.

GoDaddy Blog

With clear programs, code readability and convenience, Python takes the bite out of a developer’s job. Learn how to install Python on your server.

ember quiver
#

What version(s) of Python does your server actually have? What OS?

main olive
#

anybody wanting to show their qtile's config file?

#
  • ofc showoff their rice
ember quiver
main olive
#

as qtile doesnt use script lang, but python.

ember quiver
main olive
#

worth a try :3

fallow tusk
#

I do use qtile, but my config is just the basic stuff from the site. There's a qtile server…

#

They have a #showcase channel

crystal venture
#

KDE vs GNOME3 for 1920x1080 display?

dapper raptor
main olive
#

thank u :3

main olive
#

both are super bloated, but at least kde have smth going on for it

fallow tusk
#

I definitely feel that Gnome is heavier/clunkier/slower than KDE. That is just a feeling from trying it a few times in the past, though. I haven't installed Gnome in a while.

main olive
#

it havent really changed

#

i personally use xfce. i made it to look like a wm xd

fickle granite
#

I gave up on "linux on the desktop" long ago.

distant flare
#

Hello

fickle granite
# distant flare Hello

Please don't spam so many channels. Just ask your question, or make your statement, in the channel that's relevant.

echo tinsel
#

This is more of a linux question but I am working on a python project with a shell script to streamline the dev process.

My project consists of a virtual env and the source files. I want the script to activate the venv, cd in the source files and then run the program. Once the code is done I want to exit. I've been trying to create a subshell with (), but once the script exists the directory is still changed and the venv is still active. I often ctrl-c out of the program so a quick cd back and deactivate command won't cut it here.

I have a simple script

#!/bin/bash

start() (
    . .venv/bin/activate;
    cd src;
    python main.py $@;
)

start

How can I make sure the changes I make in the start function are not carried into my terminal?

ember quiver
echo tinsel
#

I want the venv to not be active and the directory to be src/.. once the python script has exited. Currently the terminal has the changes that were done within the script

wise forge
wise forge
normal dagger
shy yokeBOT
#

wayland/client.py line 62

xdg_runtime_dir = os.getenv('XDG_RUNTIME_DIR')```
normal dagger
#

its literally sending a bunch of byte streams.

The server starts a libeis context (which can be integrated with flatpak
portals) and uses the libeis file descriptor to monitor for
client requests.

ah god
im really stupid.

in python-wayland

Doesn't wrap libwayland, instead reads Wayland protocol description XML files and speaks the Wayland wire protocol directly.

is it something that automatically going to work under the hood? but then why libeis is needed and sometimes its not(python-wayland)?

#

I just don't understand how a bunch of byte streams make any sense to a socket which is 'XDG_RUNTIME_DIR', I can't believe that the only requirement is to use wayland as a display server.

echo tinsel
wise forge
echo tinsel
wise forge
wise forge
echo tinsel
#

it’s in a .env file in my project and it works with that

wise forge
#

😬 rethink your life choices. this is really bad approach in python

#

messing up pythonpath leads to only suffering

formal schooner
#

personally i'd rather python -m build and copy the wheel into my docker image, but instead of copy the src/ dir and set pythonpath to src

#

it's not that bad in general if you have a well-organized project and you don't want to involve pip or wheels

wise forge
formal schooner
#

its possible, but again requires discipline

#

e.g. we have scripts/ and source/, the former being for things that we only use in the repo for dev stuff, and the latter being the app code

#

both are added to pythonpath, then we add tests/ (via the pytest option, not in the env var) to run the tests

#

so scripts/generate_test_data/ is a module with several files and we can invoke it as python -m generate_test_data

#

that said, it's the kind of thing where if you have to ask whether you need it, you don't need it or shouldn't try to use it

#

what you should almost certainly never do @echo tinsel is set it and forget where you set it

#

it's like PATH itself, it's your responsibility to manage it

echo tinsel
#

oh yeah you can just put it in a .env file within the head of the repo (for the purpose i had)

wise forge
#

then u can sanely importing in absolute paths code between all of those folders

formal schooner
#

(it works even without the init file, as a namespace package, but imo that's just goofy)

wise forge
#

it is not like it is going to be bundled into package deployed. there is a choice to select what is deployed

formal schooner
#

partly because i don't think it's any better than setting PYTHONPATH, and partly because it's abusing the namespace package functionality to do a job that it's not meant to do

#

obviously this is all kind of ad-hoc and you should use whatever you like. but this works well for me and i don't dislike it

wise forge
#

it serves more dev friendly configuration discovery for other devs (or to you in a year later 😄 )

formal schooner
#

the source code is still in src/ like you'd expect

#

and we tend to wrap things in a shell script or makefile anyway, that's just the house style

wise forge
#

i'll draw a card of person that setups project configuartions, automating, CI code and deploys apps
I would honestly hate such additional problems
there is enough problems to deal as it is in any project

formal schooner
#

i do some of that, but never for other people's projects

#

i'm sure things would be different in a bigger organization

wise forge
#

Speaking of awesome settings. Pydantic has settings module 😄

from . import types
from pydantic import BaseModel
from pydantic_settings import BaseSettings, SettingsConfigDict

class SettingsB(BaseModel):
    debug: bool = False
    celery_redis_host: types.RedisHostAddress = types.RedisHostAddress("redis://localhost:6379/0")
    discord_channel_health: types.DiscordWebhookUrl
    discord_channel_news: types.DiscordWebhookUrl
    telegram_bot_token: types.TelegramBotToken
    telegram_channel_health: types.TelegramChannelID
    telegram_channel_news: types.TelegramChannelID
    log_level: types.LogLevel = types.LogLev.DEBUG
    test_mode: bool

class Settings(BaseSettings, SettingsB):
    model_config = SettingsConfigDict(env_prefix='', case_sensitive=False,)

i love it.

formal schooner
#

e.g. another option would be to make it all pip installable so you could pip install -e . and get all scripts, app code, etc. in your enironment under a single namespace package

#

yeah we use that extensively

#

pydantic has certainly grown on me, despite several annoyances

#

why split settings into two classes, instead of inheriting from BaseSettings directly?

#

i haven't used pydantic 2.0 yet so i'm not sure if that's a 2.0 idiom

wise forge
#

probably should remove such complication 😄 not really having major impact though

formal schooner
#

fair enough

#

the 2.0 migration is going to hurt a bit. we have a lot of small apps using BaseSettings, several of which have custom validators and other hooks into pydantic behavior

wise forge
#

i thought there will be time i will need Settings without ability to get settings from env. (apperently i did not)

formal schooner
#

you can disable it, at least in 1.0 you could with MySettings(_env_file=None, **kwargs) or something like that

#

obviously not pretty

tropic wasp
#

Does android count as unix

shrewd stratus
#

unix-like probably, since it uses a modified Linux kernel

fickle granite
#

what does "count as" mean?

tropic wasp
#

Does it count as a unix operating system

fickle granite
#

I still don't know what "count as" means.

#

why are you asking?

tropic wasp
#

Is it

#

A

#

Unix

#

Operating

#

System

#

Or

#

A

#

Unix

#

Like

#

Operating

#

System

#

Do

#

You

#

Understand

#

Now?

south fossil
#

Andoid it not a UNIX

#

However, Android is based on the Linux kernel, which is a Unix-like operating system

fickle granite
#

no I don't understand

#

since I don't know what those terms mean, precisely, and neither do you

#

it is and it isn't.

#

is MacOS Unix?

#

is Windows with WSL Unix?

#

until you define what "Unix' means to you, it's impossible to answer.

#

Does it have to have the famous hierarchical file system? (I actually don't know if Android does.)

#

Does it have to be multi-user?

#

Does it have to have a shell and a C compiler?

#

Does it have to share code with the original implementation from Bell Labs?

fickle granite
#

ah now we're getting somewhere

#

like I said: I honestly don't know if Android does.

#

my point is: "is it unix" is impossibly vague; but those questions I listed above are at least answerable.

tropic wasp
#

I understand

fickle granite
#

so come up with a list of questions of your own, that define what "unix" means to you, and see what the answers are for Android.

summer trail
#

Android is Linux. If you consider Linux to be Unix, then Android is as well.

rotund girder
#

Ok, now I know to avoid Flatpak! I will try to steer clear of Wayland today and hopefully I can get my setup working again.

#

My vnc is, not happy. Used tiger vnc previously but after upgrade to ubuntu 22 it has been fighting against me. Anyone else with vnc experience/opinions?

ember quiver
humble falcon
fickle granite
#

still has the linux kernel, but I tend to agree with the rest of what you said

#

The Ship of Theseus is a thought experiment about whether an object which has had all of its original components replaced remains the same object. According to legend, Theseus, the mythical Greek founder-king of Athens, rescued the children of Athens from King Minos after slaying the minotaur and then escaped onto a ship going to Delos. Each yea...

spark mulch
#

What about Linux has been changed in Android? It literally ships an (AFAIK unmodified) kernel, in my case it's 4.19.269 (Settings->About phone->Android version).

ember quiver
fallow tusk
#

Looks like the GKI builds are a cut-down version of an LTS kernel which then allows modular additions for vendor-specific drivers and the like

summer trail
# fickle granite https://en.wikipedia.org/wiki/Ship_of_Theseus

Considering they continuously merge Linux kernel changes into Android, there's no Ship of Theseus situation. You could use the Ship of Theseus to argue about whether macOS is really BSD, but not whether Android is really Linux. It's not a hard fork, they continue to contribute to Linux kernel development, and continue to pick up new kernel versions and new modules.

fickle granite
#

well, I meant they've only got the kernel, and little or none of the userspace -- to me, Linux is more than just the kernel.

summer trail
#

sounds like you're referring to Stallman's "GNU+Linux" 😂

lavish storm
#

GNU/Systemd/Linux

jaunty pine
#

“Unix” has two meanings:

#
  • A legal trademark
  • An informal term for a set of traditions about how an OS is supposed to work.
rotund girder
fallow tusk
idle knot
#

Android's lower-level components are Unix-like. Being Unix-like is inheriting features and functionalities from the original Unix operating system. Android's user space is not Unix.

fallow tusk
#

As in don't use the DM until you've got it working without. first

jaunty pine
rotund girder
fallow tusk
#

Probably. I have managed to cobble together a tigervnc setup that seemed to work, but it took me a lot of wrangling and reading of online howtos - several of which I'm not sure were necessary :|

#

Let me see - I did start doing my own write-up of what I did to get my company PDE to talk nicely over VNC

rotund girder
#

That would be greatly helpful, thank you.

fallow tusk
#

There are some changes I make to ~/.vnc/xstartup, too - to specify which user gets which port :5=user to map port 5905 to be used by user user (remote port is 5900 + the display identifier used here)

#

Aha. Looks like the session (DE) is selected by adding a session=... line to /etc/tigervnc/vncserver-config-defaults. I'm sure there's more, but my notes are more just a command history atm - I was trying to flesh them out, but ran out of impetus ;)

rotund girder
ebon dove
#

how is the loopback device (localhost/127.0.0.1) virtualized? is it treated by the OS as a standalone I/O device?

shrewd stratus
#

IIRC, the loopback address is special cased in the kernel's IP stack

#

as in, it's not treated as an I/O device at all

#

any packets to that address are routed directly

ebon dove
fallow tusk
brazen jewel
#

hi

#

how can i download an old version from an app?

ember quiver
south fossil
#

what is "an app"?

fickle rivet
rotund girder
#

bash auto completion: what could be the reason I lose autocompletion after git in some shells? Does anyone know how to troubleshoot bash autocopmpletion?

ember quiver
rotund girder
# ember quiver Where is it working and where is it not? Maybe relevant: https://stackoverflow....

It works in my first shell, but not if I from that one launch a subshell, see: https://unix.stackexchange.com/questions/755147/how-to-troubleshoot-bash-completion-for-git-not-working-in-subshell

prime drum
#

I tried to build Pytorch from source and got this error. Can anyone help?

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.18 or higher is required.  You are running version 3.3.2

(base) notooth@localhost:pytorch$ cmake -version
cmake version 3.26.4```
lavish storm
#
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  CMake 3.18 or higher is required.  You are running version 3.3.2
lapis cloud
prime drum
#

I set USE_CUDA=1 in setup.py before running python setup.py develop, but I still got this error. How can I fix it?
AssertionError: Torch not compiled with CUDA enabled

jaunty pine
rotund girder
formal schooner
prime drum
#

Yes, I did.

viscid bluff
#

dunno how relevant this is but does anyone know how to make the ubuntu wsl look like the debian one? the white ubuntu text is just kinda bland

#

but i dont wanna change everything i just wanna change the root@MSI and the ~

wise forge
#

i use personally Konsole

runic goblet
#

i think you just need to set PS1?
do echo $PS1 in your debain one and copy and paste that and set PS1 accordingly in your WSL ubuntu 🤷

#

also ubuntu's default is the same as debain as far as i know (for regular user), it's just that root's bash is "unthemed", you will get the same experience if you make a regular user

viscid bluff
#

or switch to a regular one?

#

oh there we go

#

hath fixeth thanks

warped nimbus
#

Without using third party libraries in Python, what's a nice way, if any, to read a file in another namespace?

In my case, I'd like to get the mac address of a network interface in another namespace. I'd like to avoid using a subprocess if possible, but my current solution is a subprocess that runs ip netns exec ... cat /sys/...

warped nimbus
#

A network namespace

south fossil
#

he seems to refer to network namespaces in Linux, dunno how it relates to files

warped nimbus
#

As in the namespaces feature in linux

south fossil
#

and how it relates to files?

warped nimbus
#

I can get the mac address of an interface by reading a file e.g. /sys/class/net/eth0/address

#

But if my python process is not executed in the same network ns as the interface for which I need the mac address, the file won't exist. My python script needs to manage interfaces in different namespaces so executing the entire script in a different ns is not an option.

south fossil
#

Namespaces was created for isolation.
If you are running Python process in isolation, you cannot do that. Unless you are superuser or unless you have another process being run outside of isolation.

warped nimbus
#

Hmm yeah I suppose I have to use a subprocess

south fossil
#

All forked processes will be isolated as well.

warped nimbus
#

If I use something like python-nsenter even that seems like it requires a subprocess within the context

#

Maybe not. I'm not too familiar with how setns propagates. If could just setns and then open a file that would be great.

#

But there's not a convenient way to call setns to begin with. Unless I use ctypes or third party lib

compact grove
#

How do I add the process ID to the string format? sh ./venv/bin/python main.py force \ 1> >(ts "[%F %T]" >> cron/stdout.log) \ 2> >(ts "[%F %T]" >> cron/stderr.log) & I'm using ts "[%F %T]" >> cron/stdout.log to prepend timestamps to every stdout line, i.e. py print("Starting up a new instance.") produces: ```
[2023-09-02 05:30:07] Starting up a new instance.

I would _like_ to include the process ID in this format, like: ```
[1509][2023-09-02 05:30:07] Starting up a new instance.
``` where `1509` is the process ID
#

how do I do that? I've tried sh ./venv/bin/python main.py force \ 1> >(ts "${$$} [%F %T]" >> cron/stdout.log) \ 2> >(ts "${$$} [%F %T]" >> cron/stderr.log) & but I get bash: ${$$}: bad substitution

#

oh, it's just "[$$][%F %T]"

rotund girder
#

I just thought of a cool/boring visualization I would like to do. A partial filetree where the folders with the most git activity is listed, and the less touched files are filtered - so that it all fits on one page. So similar to git-heat-map but perhaps as a compare/weighting function to [broot] (https://github.com/Canop/broot)
What do you think, does it exist?

GitHub

Visualise a git repository by diff activity. Contribute to jmforsythe/Git-Heat-Map development by creating an account on GitHub.

GitHub

A new way to see and navigate directory trees : https://dystroy.org/broot - GitHub - Canop/broot: A new way to see and navigate directory trees : https://dystroy.org/broot

formal schooner
barren temple
#

change your shell to zsh and install oh-my-zsh 😄

#

oh... it was old messages i was seeing.

#

nothing new

formal schooner
barren temple
#

but it gets you a nice looking shell

#

😄

#

with no trouble

formal schooner
#

yeah but its easy to add a "plugin" manually, you source the .plugin.zsh and add its functions/ dir to fpath

#

it's two lines of code!

#

ofc you get error handling etc

#

its just that its too tempting to add a ton of poorly maintained plugins and you get a slow messy shell config

#

and at least as of when i last used omz, it was very poorly curated

main olive
#

Hi, i have a old surface pro tablet still works great but it has a corruption in one block of memory.i know which address it is.is there a way to prevent os to access that block?

south fossil
#

no

#

@main olive Well, for Windows you can limit maximum available memory via msconfig params. For Linux kernel you can do a similar thing booting it with mem= param. But you should be lucky, and the failed memory addresses should be at the end not at the beginning. And in the first place you should somehow modify those params on a failing hardware.

main olive
#

Trying it

south fossil
#

msconfig is the same

main olive
#

But this time i only block 4kb

#

4kb page of memory

#

I have only 1 corrupt memory

#

Address*

#

Sometimes i have bsod

main olive
#

Should be removed last 3 digit

#

I will make bashscript to automate this because this solution is not permanent

#

I need to fetch memory list from memtest86 report

fast stag
#

tf does this has to do with unix

main olive
#

Is there any book covering the modules like os and subprocess?

wise forge
# main olive Is there any book covering the modules like os and subprocess?

Python Expert Programming has chapter regarding parallelism 🤔
may be there is more detailed regarding parallelism

Otherwise there is always an option to read official docs https://docs.python.org/3/library/subprocess.html

main olive
#

Is anyone taking a Unix class in college?

ember quiver
silk herald
main olive
#

PEPs forever.

humble falcon
#

Can the same driver be compiled for different minor releases of the kernel?

rotund girder
finite crater
#

Hm, I was into linux before i got into programming. Really linux is the reason why i started programming at all.

#

"The Linux Command Line" -- you can find a free copy of it yourself if you dont trust that domain,

#

you don't need to finish the book really. You can go as far with it as you want to.

dire glacier
#

@primal sierra

#

sorry for the mention

#

so how can i do that

#

hello?

#

so the problem is im not able to download linux

fallow tusk
#

"not able to"?

dire glacier
#

ye

#

cuz of the boot menu

#

its good that someone answered

#

xd

fallow tusk
#

You should already be in an operating system in order to download anything…

dire glacier
#

ugh wdym

#

i want to dual boot

fallow tusk
#

"boot into Linux", did you mean?

dire glacier
#

nah nah

#

i want just to dual boot

#

but install linux first

#

because i dont know how

#

linux didnt want to install when i tried

fallow tusk
#

Right, so you need some sort of installation media…

dire glacier
#

tell me what do you mean so i can tell you if i have done it or nah

fallow tusk
#

How did you try to install Linux?

dire glacier
#

i installed it on a usb which was 4gb but it was mint linux and it was able to be downloaded in it by the use of rufus app and then i tried to open boot manager on the old laptop to open the usb but it didnt recognize it so i opened the boot menu to enable the legacy thing and secure boot as my old laptop is legacy boot thing but the weird thing i didnt find them and till now i dont know what to do like most of my boot menu is empty (i dont know how it is a boot menu XD)

fallow tusk
#

So when you put the USB stick in, and boot the PC, you don't see it booting from the USB stick?

dire glacier
#

i checked if its recognized on windows and it was

fallow tusk
#

What does happen when you boot with the USB stick in?

dire glacier
#

nothing it just shows me the normal list of boot menu and i choose the boot manager to see the usb but all i see is a hardware and cd and both when i clicked them boot me to windows

fallow tusk
#

OK, you may need to enable booting from USB in the BIOS

dire glacier
#

fr my bios is weird

#

i have been trying all the solutions on yt for hours and i didnt find any

#

the bios is empty

#

like it has few options

#

which are useless

#

is it possible to boot the usb from windows?

#

cuz this bios wont help me ig

fallow tusk
#

No, you'll have to find the option in your BIOS to boot from a USB, or write a CD and boot from that - but that would mean it's a very old BIOS.

#

Some BIOS have an "advanced" mode that you need to enable…but that should be an obvious option

dire glacier
#

i just wanna revive it for normal use and linux would be enough for that

#

i tried to search about the name of the laptop and its bios and got no video

dire glacier
fallow tusk
#

What BIOS is it? (I'm not sure how much further I can help, tbh, but that may point me towards some details of what you might need to do)

dire glacier
#

i dont know but i know the device name

#

will that help?

fallow tusk
#

Probably not. Doesn't the BIOS screen give a name?

#

The motherboard details could help, I guess

dire glacier
#

okay wait lemme search the motherboard name

#

where can i find the full name of the laptop

#

and its motherboard name?

fallow tusk
#

In Windows you should find that in the system info

dire glacier
#

i opened the dxdiag thing and it says the bios name is

#

InsydeH20 Version 03.61.0 1F. 42

dire glacier
fallow tusk
#

That seems to show how to get to enabling a USB boot option

dire glacier
#

i dont have the info of legacy bios

#

and secure boot

#

thats the issue im facing

#

is the only chance is to boot from windows?

#

the problem is its the same bios as mine

#

:/

lapis cloud
#

when I installed linux I recall having trouble with UEFI vs legacy boot

#

iirc the issue was that windows10, which I dualbooted with, only supports UEFI, which was somehow nontrivial to install linux mint with?

dire glacier
wise forge
#

it makes USB automatically friendly to all those systems 🙂

wise forge
fallow tusk
#

oh? Most modern distros expect UEFI, I thought. it's usually a lack of UEFI support in the hard/firmware that causes issues (although I do recall Mint being odd) But the Insyde website suggests the BIOS should support UEFI

dire glacier
#

is it possible to just boot from windows

#

or any of that

fallow tusk
#

Have you tried using a different USB port?

lapis cloud
#

I no longer remember what the issue was, maybe I had to disable secure boot

dire glacier
fallow tusk
#

(one of the other suggestions from that link)

#

Yeah, disabling secure boot is probably a necessity

dire glacier
fallow tusk
#

(I have to switch between secure and non-secure for my dualboot setup)

dire glacier
#

is this laptop a mad one or sth?

fallow tusk
#

If you don't have the option it probably means it's not an issue

dire glacier
#

but ofc there is a solution and i believe in that

fallow tusk
#

(i.e it's not capable of secure boot, anyway)

#

I'm sure you're just missing something in the BIOS settings…but not being able to poke around in it myself sort of limits how much more help I can be (plus it's bed time!)

dire glacier
#

your a good man

#

maybe i will try to see more vids or sth xd

#

Gn

fallow tusk
#

You're more likely to find answers on things like stagkoverflow or hardware-specific bulletin boards, I imagine

dire glacier
#

okay ima see that then

dire glacier
#

i did it man!

#

this laptop is so buggy in bios and so old

#

so thats why you keep dragging the usb option up to the top cuz there is no usb enable or disable

#

and thats it you try to open bios manager again

#

i kept trying for so long xd

finite crater
#

disabling secure boot part 1 of why I don't dual boot anymore. Part 2 is the ease of virtualization.

dire glacier
#

i wanted to see if it will be fast on it

#

but tbh linux was doing good well on it

#

the linux mint

fickle granite
#

@woven trench you can tell by looking. ls -l includes a header line

neat jasper
#

Im running a linux box in runlevel 3 and i need to make the screen blank work bcs the monitor wont shut off. Anyone know how to enable that ?

ember quiver
#

I would probably just unplug the thing though 🤣

neat jasper
spark mulch
#

Assuming you use systemd, it's sudo systemd-resolve --flush-caches

steep sequoia
#

oh wow discord did a silly
apparently that conversation is from like a long time ago

#

it showed it as the most recent conversation until i sent the message, then it decided to load a bunch more stuff in between

fallow tusk
quaint crystal
#

is there somebody thats in mute too?

#

lets talk

real vapor
fallow tusk
#

There are so many good screensavers in xscreensaver :)

neat jasper
fallow tusk
#

Ah, I didn't twig RL3 was non-graphical…it's been a while since I used numeric runlevels (although not that long!)

copper roost
#

guys... I need some help

#

using virtual env, why keyring doesn't save password?

#

my virtual env is selected using source.. but when I use keyring library

#

I can't make it save password

copper roost
#

SOLVED

#

my keyringrc.cfg file had a bad default.. keyring.backends.empty

#

I added SecretService and now it saves keyrings credentials

finite crater
#

I cant imagine what it would have been like to use linux desktop in 2003.

#

i didn't install linux until like 2013, and i didn't become a power user until about 2017.

fickle granite
#

I always hated it tbh

finite crater
#

I'm pretty sure I had used linux in the sense that I used web servers as early as 2001 but I didnt admin or fully understand them.

fickle granite
#

I bought my first Mac in 2005

finite crater
#

I adamantly hated mac in that time period, but it wasn't exactly an informed opinion. Back then I didn't have problems with Windows and did not consider using alternatives at all.

acoustic stag
#

Anyone well versed in pop o.s and Msi?

ember quiver
acoustic stag
# ember quiver Don't ask to ask, just ask

You are correct, thank you for the advice. I solved the issue.

I couldn't figure out why security features on my new motherboard were locked. I figured out the issue was not having an admin password set. Once it was set, the secure boot could be disabled. Installation of Linux was possible.

finite crater
#

disabling secure boot in 2023 = L

main olive
#

whats so bad about running fastapi with sudo (besides that the packages are annoyingly installed in a non normal place) when you want it to be https and read .pem files? im not a linux pro, is there a safer way? I don't want to give up on running fastapi as https, I'm thinking there's something smarter to do with the file permissions

#

it's pem files certbot put in /etc/letsencrypt

spark mulch
main olive
#

oh, so I can configure nginx itself to have the pem files? ill have to try that I think that might fix another problem I'm having with needing to expose the fastapi port

spark mulch
eager nebula
#

Can anyone here assit me with a Samba share configuration issue on a linux machine?

wooden mural
#

hey im using freebsd machine and when entering command df i get 1k blocks but i want to change it to 512 byte blocks. anyone know how i can do that?

fickle granite
#

df --help should show you the various options

#

failing that, try man df

#

I don't have a freeBSD machine handy so I can't do it for you

#

you might also have "GNU df" available as gdf. If you do, it does the same stuff, but with fancier options.

wooden mural
# fickle granite failing that, try `man df`

DF(1) FreeBSD General Commands Manual DF(1)

NAME
df – display free disk space

SYNOPSIS
df [--libxo] [-b | -g | -H | -h | -k | -m | -P] [-acilnT] [-,] [-t type]
[file | filesystem ...]

DESCRIPTION
The df utility displays statistics about the amount of free disk space on
the specified mounted file system or on the file system of which file is
a part. By default block counts are displayed with an assumed block size
of 512 bytes. If neither a file or a file system operand is specified,
statistics for all mounted file systems are displayed (subject to the -t
option below).

 The following options are available:

 --libxo
         Generate output via libxo(3) in a selection of different human
         and machine readable formats.  See xo_parse_args(3) for details
         on command line arguments.
#

i searched it up

fickle granite
#

well I'm not gonna read it for you 🙂

wooden mural
#

ik but i couldnt find a command that would change the bytes

fickle granite
#

so it says it shows 512-byte blocks by default.

#

Maybe your df is actually an alias to df -k or something.

wooden mural
fickle granite
#

I'm not following you.

wooden mural
#

i want to change it to 512 byte blocks

fickle granite
#

yes I understand.

wooden mural
#

but i cant find the command to do that

fickle granite
#

yes, I understsand.

wooden mural
#

only to write a shell script

#

but i dont want to write script tho

fickle granite
#

try /bin/df instead of just df; see if it does anything different.

wooden mural
#

ok

#

its same thing

fickle granite
#

that's quite puzzling, since the man page clearly says

By default block counts are displayed with an assumed block size of 512 bytes
Are you sure it's displaying 1k blocks?

wooden mural
#

yes

fickle granite
#

no offense, but ... how do you know?

wooden mural
#

thats why i want to change it to 512 bytes. because thats what it outputs lol

fickle granite
#

yes I understand that

wooden mural
#

i found this online df -k | awk 'NR == 1 { print $1, "512-byte blocks" } NR > 1 { printf "%-20s %10d\n", $1, $2 * 2 }'

fickle granite
#

I don't understand why you're showing me that

wooden mural
#

but i think theres a much easier way to do it

#

ok neverming

fickle granite
#

yeah that awk stuff looks like it's just multiplying the output by two, which is reasonable

normal dagger
#

I have a dual boot system, I'm using Fedora with Nvidia and Wayland. Electron apps such as Discord and vscode are laggy what do you guys recommend? Should I go with pycharm instead, any ideas?

rotund girder
#

I use neovim directly in the terminal

vagrant fern
#

i have no issues with electron apps performance-wise on Xorg, resource-wise they are a joke though, i use vim as well

formal schooner
normal dagger
#

it works fine for me

formal schooner
normal dagger
formal schooner
#

well if you like pycharm then there's nothing wrong with it

fickle granite
#

"If you like your IDE, you can keep your IDE"
President Obama

humble falcon
#

"Stop making up quotes I didn't say"

  • President Obama
finite crater
#

hm i wonder why you cant open electron apps tho.

#

I have nostalgia for kate sometimes, since that is what I learned to program in before i knew what i was doing. It's a decent editor if you're working from a true piece of junk but you still want something graphical. It's eventually apparent how many features you're missing out on by using it but if you're learning to program you wont miss that stuff anyway

lilac trout
#

hello

indigo lance
#

What to practice in linux os

fickle granite
#

practice finding out which programs are using up all your CPU or memory

elfin hearth
#

Can I ask for help here with a shell script I'm trying to run that has a problem?

fickle granite
#

don't see why not

elfin hearth
#

Can anyone here help me figure out a problem with a shell script I have? I have a script to download subtitles for a movie but it doesn't work for some reason because the path has a space and special characters in it. I have no idea why and I've been unable to figure it out for a long time: https://paste.pythondiscord.com/4CTQ

I get this output ```sh
$ bash ./opensubtitles-dl.sh -n "Jarhead 2005" -l eng -o "/media/jb/T7/Movies/movies/Jarhead (2005)/Subtitles/eng"
/media/jb/T7/Movies/movies/Jarhead\ (2005)/Subtitles/eng
/usr/bin/curl https://dl.opensubtitles.org/en/download/sub/{6073089} -o /media/jb/T7/Movies/movies/Jarhead\ (2005)/Subtitles/eng/6073089.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Warning: Failed to open the file /media/jb/T7/Movies/movies/Jarhead\
Warning: (2005)/Subtitles/eng/6073089.zip: No such file or directory
2 46960 2 1360 0 0 3004 0 0:00:15 --:--:-- 0:00:15 3008
curl: (23) Failure writing output to destination

#

the command it echoes /usr/bin/curl https://dl.opensubtitles.org/en/download/sub/{6073089} -o /media/jb/T7/Movies/movies/Jarhead\ \(2005\)/Subtitles works perfectly fine when run in the terminal

#

this function specifically contains the problem with curl ```sh
download_subtitle() {
# $1: subtitle id
while read -r id; do
echo $_OUTPUT_FOLDER
echo "$_CURL" "$_DOWNLOAD_URL{$id}" -o "$_OUTPUT_FOLDER/${id}.zip"

    "$_CURL" "$_DOWNLOAD_URL{$id}" -o "$_OUTPUT_FOLDER/${id}.zip"
    "$_UNZIP" -o "$_OUTPUT_FOLDER/${id}.zip" -x "*.nfo" -d "$_OUTPUT_FOLDER"
    rm -f "$_OUTPUT_FOLDER/${id}.zip"
done <<< "$1"

}

#

it seems that it's interpreting the path as two different paths when it's the same except there's a space in the path but it's escaped so I don't understand why it thinks there are two

elfin hearth
#

I fixed it, I added a bunch of eval commands. I don't think it's the cleanest solution but it works. I'd still like an explanation for me to understand why the initial function above didn't work? sh eval $(echo "$_CURL" "$_DOWNLOAD_URL{$id}" -o "$_OUTPUT_FOLDER/${id}.zip") eval $(echo "$_UNZIP" -o "$_OUTPUT_FOLDER/${id}.zip" -x "*.nfo" -d "$_OUTPUT_FOLDER") eval $(echo rm -f "$_OUTPUT_FOLDER/${id}.zip") }

ember quiver
fickle granite
#

all I can say is that: if my bash script grows to more than maybe five lines, I rewrite it in python

formal schooner
#

You forgot to quote a parameter expansion somewhere

#

Although I don't see an actual place where that would occur

#

The evals should definitely not be necessary

#

Try using set -eux

#

-eu for safety, -x for a trace of executed commands

#

You do forget to quote the command substitution in set_args but that's not likely to be a problem

#

However i think you're confused about how escaping works

#

x='a\ b' ; $x expands to a\ and b

#

that's why the eval fixed your problem... the slash escape only works when the shell commands are parsed

#

same is true in python strings, you can't write "\" + "n" and expect to get a linefeed character... that's kind of what you're doing here

#

actually i might be totally wrong about that... huh

#

no nvm i was right

fickle granite
#

heh

#

everything salt rock says is why I prefer python to shell

#

waaaay easier to understand

pure bay
#

Has anyone encountered this bug when running an Ubuntu ISO from USB? The ISO runs but there is no mouse cursor, although i can move it and click

fickle granite
#

I imagine it greatly depends on your hardware 😦

formal schooner
fickle granite
#

🤷

summer trail
# formal schooner it's actually one instance of the shell behaving exactly like any other programm...

x='a\ b' ; $x expands to a\ and b

I'd say that's a weird shell idiosyncracy. Off the top of my head, I can't think of any other language that has anything analogous to shell's "word splitting", where a variable's value is parsed as a string at the point where it's interpolated to decide how many strings it should produce. I can't think of another language off the top of my head where a string regularly gets implicitly treated as an array of strings without any explicit call to eval or the like

willow bloom
#

I am trying to install Linux
But it will show me input output error 5

ember quiver
# willow bloom I am trying to install Linux But it will show me input output error 5

I googled it for you, but as the comments here explain, we can't give you the solution without more context: https://askubuntu.com/questions/1333763/error-5-input-output-error

This is not the place to go further, look for support based on the specific distro you're trying to install

willow bloom
#

I used same distro ubantu before this
But I accidentally format whole ssd drive
When I am trying to reinstall it then it occurs this kind of error

ember quiver
formal schooner
#

the way i like to think of shell script is that every command is actually just a string, and every usage of a variable is actually a string interpolation into that string

#

i believe tcl has similar quirks, but i haven't used it myself

fallow tusk
#

I was going to mention tcl...but it's so long since I used it. I think it's also the first time I really encountered multi-level string interpolation, so possibly tainted memories!

cold plank
#

quick question, is it possible to encrypt a password for example on python and decrypt on powershell?

wise forge
cold plank
#

The thing is im on a linux vm right where i have a python script which also contains a powershell script with in it. I am sending this powershell script to another vm through pywinrm. Within this powershell script i am passing the credentials containing the password.

#

I need to make sure that the password is encrypted before passing it through

wise forge
#

What is this target deployment vm

#

What is its OS

cold plank
#

its a windows

#

target is windows source is linux

#

so in windows os, im going to be running a powershell script

#

which will be sent through the python script i have on the linux system

wise forge
#

Are u admin of this widows, and capable to do everything there?

#

What is your real intended goal with those encrypting shenanigans

cold plank
#

i need those credentials to access a server on the windows machine

cold plank
#

The main problem is to pass those credentials encrypted

wise forge
#

What stops u from doing that

cold plank
#

becauese then its not encrypted

#

and its not secure

#

if i send the password through on the powershell script

#

if not is there a secure string thing in unix?

wise forge
#

What is the point to encrypt twice 🙂

#

And what is the point to encrypt it in this situation, if u a going to decrypt it at the end anyway

#

So... with transit already encrypted, it looks like already enough of encryptions to me

ember quiver
quaint whale
#

hi

wise forge
#

although it could be more funny to use smth asymmetric 😅 good old RSA can work too

#

symetric is going to be more simple for you

wise forge
# cold plank becauese then its not encrypted

https://pypi.org/project/cryptography/ probably something to use from cryptography library for example

>>> from cryptography.fernet import Fernet
>>> # Put this somewhere safe!
>>> key = Fernet.generate_key()
>>> f = Fernet(key)
>>> token = f.encrypt(b"A really secret message. Not for prying eyes.")
>>> token
b'...'
>>> f.decrypt(token)
b'A really secret message. Not for prying eyes.'

they offer fernet right from the start

south verge
#

@rotund girder any recommendations?

rotund girder
#

for distro?

south verge
#

I have tried ubuntu 22 with snap
And linux mint

rotund girder
#

I'm using Ubuntu at home as well at the office, it works

#

I'm enjoying unix + nvim as my programming environment

south verge
#

But i never really thought of making it my primary OS .
Now i have been using wsl for like 8 months and can't think of using windows again

south verge
rotund girder
#

If I had the time and energy, and there actually existed good documentation, I would go for NixOS distro.

south verge
#

But i only use it bcz my keyboard doesn't have up/ down keys(accidentally bought the 60% varient)

rotund girder
#

vscode is popular 🙂

south verge
#

I'll look into that one

rotund girder
#

It might be good to really good with a simpler distro first (I'm guessing now that NixOS is difficult because it's quite a bit special)

#

(but it's also popular so most application might be easy to install and use anyway! 🙂 )

south verge
#

So they made an OS just to for package manager?

rotund girder
#

the package manager Nix and NixOS were both created in 2003

#

so I guess they were co-created

south verge
#

Yes but y not just use it as a package manager

#

Y does it require an entire os pithink

#

Maybe I'll use it as a server

#

Bcz it looks like it'll be really helpful to setup

#

As a server

rotund girder
#

You can probably use another distro + Nix, not sure how much of the cake you get, 50%? 90?%

south verge
#

Have you ever tried arch linux

rotund girder
#

nope, but that's probavbly really good to learn linux

south verge
#

I need an os which is easier for development and very minimal

#

But i am afraid of arch😂
Don't wana spend too much time on learning new things

#

Also security issues(don't know how to setup proper firewalls and stuff)

rotund girder
#

I just know terminal/shell/prompt/git/vim, some stuff about files/symlinks/pipes/ssh/X but MANY holes

#

But the holes are fillable with man!

#

Builtin help is the best!

rotund girder
south verge
#

I'll try it in vm before installing ig

#

Probably will go with ubuntu

rotund girder
#

time to sleep.

#

Ubuntu sounds like a good idea

#

however, the snap application provided by the snap package manager have some problems, if you are lucky you might not notice it

south verge
#

Hopefully i won't 😆
(P.S : i am not lucky)

rotund girder
#

nighty 🙂

#

haha

south verge
#

Damn no wonder this channel is ded

rotund girder
south verge
# rotund girder Haha whut? 😂

I have spent like last 7 hours configuring bspwm
There was no option to set 2 monitors(like i can set it up but it always extends display and not add extra space)

#

If that makes sense

rotund girder
#

Oh, you didn't get that automatically? Never heard of bsp 😶

south verge
#

This is for when u disconnect something different.
Well now i installed i3wm
Who da fk is naming these 😂

#

It is better for setting up display

#

Just need discord now😭

#

And then setup my coding environment 💀

#

Ok it is working me think

rotund girder
#

I would advise you to version control your dotfiles immediately

south verge
#

Y r there so many pakage managers

rotund girder
#

Don't ask me, it's crazy

south verge
#

Most of them r in python so what could go wrong

rotund girder
#

Apt, Flatpak, packman, nix, ...

#

Huh? 😳

#

Github work files. No I mean stuff like ~/.bashrc, ~/.gitconfig,...

#

Configuration files for your environment

south verge
#

ohh ok never worked wiith them before

rotund girder
#

Dotfile because it starts with a dot. They are considered "hidden". You want see them unless you ls -a to list all files.

Those two I mentioned are settings for bash and git. Which configuration you have depends on what programs you use I guess 🙂

south verge
#

what you think about neovim

#

previously i was using vscode with vim extension

fallow tusk
#

You only need to deal with different package managers if you use different distros, generally. Although flatpak and <that other one> throw a bit of a spanner in the works.

#

What do I think about neovim? I think it's a text editor… :)

south verge
#

like isit a good text editor if you want to touch mouse
or iit is hyped?

fallow tusk
#

(much the same I think of VSCode/Codium/etc)

#

There's a fair learning curve, but if you've already learned some of the vi keybindings, you will be fine

south verge
#

great

#

time to set it up

#

and i wounder what happend to that tiling windows

rotund girder
#

I use neovim and love it!

south verge
#

ur github is from 2013 jesus

rotund girder
#

You make me feel old 🧓 😎

south verge
#
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0  1000M  0 part 
└─sda2   8:2    0 930.5G  0 part 
sdb      8:16   0 238.5G  0 disk 
├─sdb1   8:17   0  1000M  0 part /efi
└─sdb2   8:18   0 237.5G  0 part /
sdc      8:32   1     0B  0 disk 

i am pretty sure i installed it on hdd(1tb)
but it is showing iit was installed on sdd(256gb)

#

is iit installed on sdd?

spark mulch
south verge
#

send link let me see

spark mulch
south verge
#

yeah not on phone u can use browser though

#

next to commits

#

it shows like years

spark mulch
south verge
#

bruuuuuuuuuuuuuuuuuuuuhhhhhhhhhhhh

#

urs is lder then me

#

we are actually same age

#

python was same pretty much even 24 years ago ?

wise forge
#

really liking direction of python... evolution in terms of typing

#

if u are feeling kinky, u can go almost full C# in python now

south verge
#

how can i make mine like this we both are using i3wm

south verge
#

i have never before tried reading py2.x

south verge
#

my github is like 2 (1.5)years old

wise forge
south verge
#

yeah something like

#

no one uses it though

#

i went thorugh my code
literally coded that moduel in my sleep every type was wrong

#

🤣 but python didn't care (bcz it understands us)

kindred basin
#

although remember that your operating system and desktop is just a tool

#

spend your time doing actually useful things rather than just making your computer screen aesthetically pleasing

ember quiver
south verge
thorn portal
#

git question. Is there any easy and compact way to list all commit messages from sha to HEAD
I want to create change log

#

Found it git log --oneline HEAD...commit

fickle granite
#

you might want .. instead of ...

south verge
#

Still setting up most of the stuff
Spent like 6 hours setting up ss mechanism

small cave
#

is anybody here good with yacc if so could i send you some files and have you look at it everything seems to be fine (from what i know but im a little dumb) but it isnt outputting anything

hexed arrow
#

How do I install pip in WSL?

#

Already got python installed but tried using the docs for installing pip with linux, has not worked.

fallow tusk
#

Ubuntu WSL? Probably apt install python3-pip

wise forge
#

And create python3 -m venv venv in desired project folders

#

source venv/bin/activate

#

And use pip from there

hexed arrow
#

Right, but what is the install for pip?

wise forge
hexed arrow
wise forge
hexed arrow
#

Thank you

#
breath@MSI:~$ sudo apt get python 3-venv
E: Invalid operation get
breath@MSI:~$ sudo apt install python 3-venv
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python-is-python3

E: Package 'python' has no installation candidate
E: Unable to locate package 3-venv
breath@MSI:~$
wise forge
#

Fixed space, copy again

hexed arrow
#
breath@MSI:~$ sudo apt get python3-venv
E: Invalid operation get
breath@MSI:~$ sudo apt install python3-venv
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-venv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3-venv' has no installation candidate
breath@MSI:~$
fallow tusk
#

Might need a apt update

wise forge
hexed arrow
#

Perfect, thank you

wise forge
hexed arrow
hexed arrow
#

Or replace source with file path for venv or the name?

wise forge
#

source is command, don't replace

wise forge
# hexed arrow And then do I put this in as is?

pip freeze > constraints.txt to freeze deps versions.
Put main deps into requirements.txt (without versions or with minimum sign version or whatever)
Install as pip install -r requirements.txt -c constraints.txt from activated venv

Put venv into .gitignore

#

Regenerate constraints when wishing 😁

#

Very manualish and simple default. If wishing automated, learn using poetry

hexed arrow
hexed arrow
#

Thought so, just wanted to be sure

wise forge
# hexed arrow Thought so, just wanted to be sure

😉 u could install eventually btw specific python3.8-venv python3.10-venv packages (u need to install specific python first though)
and create venvs as python3.10 -m venv venv or as python3.8 -m venv venv
Thus having ability to use different python versions for different projects

hexed arrow
#

Oh, I'm not that into it 😅

wise forge
#

python3 is just some your system default python3 (don't ever delete it or make changes to it. u will break OS then)
(that is why i discouraged installing pip into system python, to avoid ever deleting smth that your OS relies upon to function)

hexed arrow
#

Just trying to start using Ubuntu more and having a more organised workspace

wise forge
#

i can't dev until i found out

  1. how to use different language versions
  2. how to install packages and where they are stored (and how to make your own library)
  • also how to record which packages u use and having ability to install them again after repository cloning
  • how to delete specific packages
  1. how to setup using unit testing framework
  • and probably with ability how to mock stuff in this language
  • how to run specific unit tests via CLI
  • how to turn on visual debug during unit tests
  1. how to write CI to make deployment of app
  2. and of course how to start application
  • preferably again with ability to turn on visual debug during the run
hexed arrow
#

Yeh, I am probably intermediate with Python, I believe I have a few highly advanced topics still to go through but I know more than enough to get around in the language - just struggling with the whole managing my workspace thing.

I am actually moving onto C# which is interesting to say the least.

hexed arrow
wise forge
#

people tend to like also Terminator as terminal multiplexor

#

install Terminator 😅 or Konsole

#

Not sure if u will be able to make it working in WSL though

#

WSL is not a real Linux

#

not a guarantee u will be able to even install it there

hexed arrow
#

That's what I thought

#

I believe I may put Linux on my old PC

fallow tusk
#

You should be able to run multiple WSL instances, but I'm unsure if you can run multiple of the same wsl distro (e.g. ubuntu and kali, but maybe not two ubuntu)

fickle granite
#

?

#

why would that be?

main olive
#

i ahve a cloud computing question

#

have*

#

i'm running Ubuntu in a cloud instance

#

and after uploading my Python script and trying to run it nothing happens.. what gives?

ember quiver
main olive
#

any recommended packages? tried eye of gnome, desktop-file-utils..

ember quiver
main olive
#

apparently i have display and that also fails

#

so i am saving the png on the instance and trying to open it as i would any ubuntu command line tool

#

its just not showing up, i wonder if it is firefox blocking a 'popup..'

ember quiver
ember quiver
main olive
#

i'll try that thanks

#

worked

#

ty

south verge
#

what is a terminal?

like i think i misunderstod what terminal actually is
i changed my terminal from xfce to alacrity and it changed themes for other windows??

fallow tusk
#

That doesn't sound normal. Alacritty is just a terminal so its settings should only affect the terminal (and only alacritty)

south verge
#

is that possible

fallow tusk
#

That wouldn't be Arch, but Xfce (if that's your DE)

#

You should be able to see the settings from the desktop menu, iirc (I can't recall how you get to them in Xfce)

south verge
#

thanks

opal basin
#

Dislocker problem...

#

I accidentally shutdown when decrying BitLocker on windows 💀

#

Can dislocker helps?

formal schooner
# south verge thanks

Xfce doesn't do that, but you might have changed some global xfce settings thinking they only applied to the terminal

harsh herald
#

hello can anyone help me with ubuntu 22.04 two finger fast scrolling problem ?

#

this solution is not working

south verge
#

This is a unix channel y are we talking linux only here brainmon

fallow tusk
#

"unix" in the general sense, not "Unix" in the specific sense.

rotund girder
south verge
#

how can i change python version on my endevoros(arch) to 3.10 or 3.9 it is currently at 3.11

lavish storm
#

use pipx/pyenv and friends (not gonna do an exhaustive list)

don't u even think about changing your system python's version

south verge
#

that's what i was thinking

#

i sometimes get these urges lel

#

i guess i'll just install it beside 3.11

humble falcon
harsh herald
#

i have ubuntu install and do u know anything about sway ?

#

can it help me ?

lunar viper
#

Probably not the channel to ask, but does any ubuntu user here know how can I screenshare audio without using a third party client?

humble falcon
harsh herald
#

only have this setting its ubuntu 22.04

#

its gnome desktop enviroment

#

touchpad speed (range input) only change the speed of cursor in screen not scroll i need controller or low speed in 2 finger scrolling !

ember quiver
brazen jewel
#

hey

#

someone here use ubuntu

#

?

#

a lot of people don't like it

#

and it's not very popular in countrys like united states

#

australia

#

maybe in london

fallow tusk
shrewd stratus
fallow tusk
#

I like how "London" gets the status of a country on par with the US and Australia ;)

kindred basin
#

Darn, didn't know that London even left Britain to become an independent nation.

kindred basin
lunar viper
#

Screen share works just fine, is just audio not getting streamed

humble falcon
#

Sometimes I forget discord can be used for stuff other than text messages lol

rotund girder
wise forge
#

somehow did not get stuck with regular people. Windows is more dominating just because they have at minimum agressive company to have it preinstalled everywhere

#

yet, Linux is perfection for developers

#

especially for developers in web development, backend and DevOps engineering

#

OS that has everything working natively for your servers

wise forge
#

inbuilt multi terminal

#

comfortable GUI with normal desktop and windows

#

good working Docker in its native lightweight way. access to all web infrastructure instruments

#

all dev tools are installed in one or few command lines from apt/snap/wget/deb whatever

feral night
#

Why do people always say "this" distro or "that" distro is better and then show a bunch of theamed screenshots without explaining the underlying difference... was my understanding you could add theams of almost any kind to your desktop environment and its still the same linux... I know "l" ubuntu is "lite" in apps but its just ubuntu... same as mint etc etc.

#

Can't imagine that "k" is any different ?

lavish storm
#

they just change how the interface looks but not how you manage packages for example

feral night
#

yer so at the core the sane os and on top interchangeable desktop environments that are glorified theams. so in my mind no different really.

lavish storm
#

within the scope of ubuntu derivatives, yes

kindred basin
#

Isn’t Kubuntu’s KDE maintained separately or something

#

Might be thinking of KDE Neon

#

Gnome is great though

lunar viper
#

The ubuntu software/app store, cant remember the name rn, also has many issues so console is kinda the only way of doings things

#

And normal user wont do that

wise forge
#

in Linux... everything is friendly to do from console

#

GUI is... very optional for most of stuff

#

that makes stuff automatable, easy to record as dev instructions into git repo README, or automating to run from CI. We just need to record commands to run 😅

lunar viper
#

I guess being used to helps hahaha

#

I've just been having nightmares with seting everything up without errors everywhere

wise forge
#

not sure what u tried to setup.

lunar viper
#

Its not like theres is smt in particular

wise forge
#

i just use Kubuntu, which has everything configured for me out of the box.
Few things to install via apt/snap/deb and i am good to go

lunar viper
#

But more of the constant google search "error why"

#

And the fact that im not versed in the os

#

I guess im just to used too windows

wise forge
#

i used windows for most of my life until i turned 25 😅 including working as windows system administrator

#

but then i started to work as backend dev/DevOps engineer... and linux just became better (removed need to use VMs in order to access all web tech)

lunar viper
#

Hahaha

#

Switching to linux made appreciate more windows actually. I never expected that to be the outcome of this little dive of mine

#

Still gonna be using it, because its smt i want to learn

wise forge
#

once u learned what should not be done to break OS

#

u enjoy freedom to do ANYTHING

#

in windows... you are never really admin (illustrated picture above). Even if u are admin, your OS is still forbidding things, any random program can restrict you access :/

lunar viper
#

I love the customization linux provides

wise forge
#

i enjoy being free 🤗 and being sure i am having no trackers or weird processes in background that take 50% of my hardware resources for strange activities

lunar viper
lunar viper
#

But my problem with linux is more related to compatibility

#

Like the discord screenshare example i posted a few messages back

wise forge
#

or u use some weird program for doing that

kindred basin
#

I thought that was an old bug

#

Forgot how to resolve it

formal schooner
wind cypress
wise forge
#

No OS, how came you up to this situation

#

plus, pipenv is kind of deprecated, use poetry 😅

wind cypress
wise forge
# wind cypress No OS?

we have no idea what is your operational system, what are previous steps u used to achieve this situation

wind cypress
wise forge
wind cypress
wise forge
#

python3.10 in ubuntu22.04 is main python used

#

u tried to install python3.10 on top of it

#

not sure if your OS is even still working correctly at this point

wind cypress
wise forge
#

u could have used 22.04 verison, it has python 3.10 out of the box

#

and saving yourself some headache then

#

otherwise u can continue trying to install python3.10 🤔 but do u need it if u can just switch OS?

wise forge
#

and create python3.10-venv -m venv venv

#

source .venv/bin/activate

#

and then install pipenv from there

#

could be better

#

u have some weird broken python installation 🤔 may be venv will help to fix it

#

otherwise just switch to 22.04. it will have already correct python installed, thus eliminating posilibity of errors at this step

tardy stream
#

has anyone done anything quite so crazy as to get python running inside wine?

#

I've been trying for several hours, and while python runs alright, pip seems to fail to install

#

I've used the wenv package, and found that ktinker isn't included with that installation, which I need

wise forge
#

isn't python compilable fine as it is?

tardy stream
#

playing a game through proton, trying to install a python plugin for said game

#

python plugin uses heaps of windows dlls

wise forge
#

nasty 😅 i prefer just to use windows at this point with dual boot

tardy stream
#

basically, doing my darnedest to not dual-boot

#

yeah XD I'm probably gonna wind up there, but doing what I can to avoid it haha

#

I've no idea why pip fails to install tho, and the error isn't showing up on google haha

wise forge
#

You know...

#

i have a strong good solution how to have Windows i think

#

without sacrificing my Linux exp

#

i should just utilize my laptop for Windows and share files over samba or smth from main PC 😅

tardy stream
#

I was wondering if you were gonna say use WSL and mount your linux partition inside it XD

wise forge
#

samba is pretty good to run Windows friendly accessable filesystem

wise forge
tardy stream
#

XD

wise forge
#

going to try WSL next time out of fun. i heard WSL2 runs full linux inside

tardy stream
#

I've heard there's a way to remove the watermark without pirating actually, so I may go that route XD

#

yeah wsl2 is full linux kernel

wise forge
#

still Samba i find very attractive path

#

because... i don't sacritice my already configured dev env in linux

#

i just extend it with external windows compiler accessing it over samba

#

and optionally CI runners with windows

#

Going to have Linux dev env first solution then with Windows compatibility 😅

#

Hmm, if i will be not using Videocard, using Windows in VM with forwarded volumes could be enough for that

#

for least amount of headache and extra hardware usage

#

i like virt-manager to use for VMs

#

it does its job, and i got used to it already

#

well, except Videocards. that i did not get how to configure

#

Samba with extra laptop is good because i get 100% of windows working for sure without any setup headache. At the cost of extra hardware 😅

tardy stream
#

that's my tracelog for wine failing to install pip

#

steps to reproduce:

  1. create a new wineprefix
  2. download python 64-bit windows installer
  3. WINEPREFIX=prefix wine python-3.x-amd64.exe
  4. breaks upon trying to install pip
wise forge
#

then it will 100% reporoducable to exact same situation

#

may be even saving resulting code to git repo 😅

#

i could bet u can utilize wget to keep everything as single Dockerfile though

wise forge
#

it will make 100% reproducability more or less

tardy stream
#

thanks! I'll see if I can get that working. Who knows, maybe it'll just work and this'll be my solution haha

wise forge
#

everything remains comletely erasable without polluting system

#

faster feedback

#

Docker Deep Dive book is great if u wish to dive into this tool more in a structured way (people manage to use it without learning stuff though)

#

every added line with RUN or smth else in Dockerfile is cached as another layer of an image. every layer/line is a savepoint for an image

lucid fable
#

The password for the next level is stored somewhere on the server and has all of the following properties:

owned by user bandit7
owned by group bandit6
33 bytes in size

Commands you may need to solve this level
my answer is find / -user bandit7 -group bandit6 -size 33c why not workng

ember quiver
#

Not sure that's possible, and you're probably approaching the problem the wrong way... You can use a bind mount to make a host folder accessible, and then attach to the container to move files. Or you can just edit inside the container without a bind mount, if it has an editor

But this generally defeats the purpose of containerization. You should probably just build the container the way you need it.

formal schooner
wise forge
#

docker run -v /host_path:/container_path image_name
first path before : is your host path
second path after : is any container path

#

u can utilize relative path with docker run -v $(pwd)/folder_name:/container_path image_name

#

if u use docker-compose, declaring volumes is easier and can use . for relative path

#

u need to recreate container in order to bind volumes 😉

formal schooner
wise forge
#

in theory it should

formal schooner
humble falcon
#

Is there a unix-y way to run a program at given intervals, eg every hour? My current idea is just to have a time.sleep in an infinite loop but I'd rather have the program not running at all when it doesn't need to

lavish storm
#

cronjob probably?

#

run X at every Y units of time and it makes me instantly think of cronjobs

#

though it's not exactly the same as running a job that takes X minutes, and then running it again exactly an hour later

wise forge
humble falcon
#

Thanks, I'll check out cron jobs. I can just make the program turn itself off when the job is done

wise forge
humble falcon
#

I have a home server set up so I don't need aws, thanks for the info though

wise forge
#

Celery Beat is still an option though then 🙂

#

Cron is simpler by magnitudes of course

lavish storm
#

i use it to sync mirrors, handy dandy

humble falcon
wise forge
# humble falcon When would one use one vs the other?

If u write many thousands code lines program, with unit testing and etc for long term quality, and u plan to deploy it within your own infra. Best is celery.
(Good if u write smth related to web apps, backend, rest APIs)
(Code scales well to run a lot of different periodic tasks)

If u just need one command to run every hour, for stuff u aren't going really to write code for... Cron will work too (and like it is not related to web apps)
(Ideal for single command to run of smth)

humble falcon
#

Sounds like cron is best for me then, thanks!

wise forge
lavish storm
#

yah for me i write shell scripts for syncing mirrors/logging and run it through cron

humble falcon
#

On this one, I'm grabbing data from an api, seeing if there's changes since the last pull, and sending an alert to my phone if there is

wise forge
#

Cron is good for lazy stuff at your own home projects. For servers that aren't going to be ever updated probably

wise forge
#

We can do it with cron too, but keeping stuff stateless is very advantageous default

Your program would have been able comparing status with previous one already in memory

lavish storm
#

How does the API deal with data diffs? I don't think it's desirable to do it directly with cron (not that you can anyway)

humble falcon
#

I'd like to write the incoming data to a db if there's a change and also to take snapshots of the data every week or so, so I think this way makes sense. Might also make a webapp to display the data on a local site, depends on how lazy I feel lol

lavish storm
#

for example, mirrors provide "lastsynced" or "lastupdated" with unix time on it to compare

ember quiver
humble falcon
#

Yeah sqlite is what I have in mind, thanks

kindred basin
neat jasper
#

how much documentaion do we really need to read before im elegable to ask a qustion

neat jasper
# ember quiver All of it

lol. have anyone done that? it seems like it but the ironic thing is, there are gaps. so how does a person know, when to actually ask a question?

#

I think more people today will ask discord questions like. "how do i for loop ?" and actually get "ohh your poor thing let me help you with that ....."

#

im from the 90s. you had to read the doc that was actually made from the developer. and you know how piss poor they can be.

#

no google

#

now there is so much of it and its getting better, but man, its an equally same but different challenge.

lavish storm
#

you can just ask the question, and say that in the process you've referred to X and Y docs to no avail

#

for example: I'm trying to do X, i've looked up library A's docs that does this, but i don't think it's adequate for my use case---there's also B I'ved checked out but it seems to lack validation and issues are stale

#

and that'd be good enough for me

neat jasper
lavish storm
#

ah that

#

that thing

#

I'm glad I'm no part of it

#

Don't even have an account and I have it blocked so it doesn't show up on my results

neat jasper
#

Oh unix channel. Is Linux UNIX?

#

Im voting No

lavish storm
#

on unix or unix-like systems such as Linux or MacOS.
it's fine i guess

neat jasper
#

I know what UNIX is and i get that this channel is unixish. Im just asking the actual question is Linux UNIX or not ?

#

I think it has diverged into a Non unix thing that is now its own thing that is Linux .

lavish storm
#

nomenclature-wise linux stands for linux is not unix

neat jasper
#

I think you mean GNU which is Gnu is not Unix. but linux is a diritive of mimix which was linus version of mimix ?

shrewd stratus
#

Linux is Unix*-like*

#

it's not a certified Unix like some BSDs and macOS are