#unix

1 messages · Page 50 of 1

main olive
#

hmm

#

and what is the mac equivalent to those?

fresh saddle
#

I believe it is the same as Linux, since they are both posix compliant

main olive
#

and the same thing with clearing the screen...

def cls():
    if "nt" in os.name or "win" in os.name or "dos" in os.name:
        os.system("cls")
    elif "unix" in os.name or "mac" in os.name or "osx" in os.name or "linux" in os.name or "bsd" in os.name or "posix" in os.name:
        os.system("clear")
    else:
        print("\n" *1000)

i think this is the only solution...

#

idk python is sometimes wired

#

and what about temp?

fresh saddle
#

This is a weird implementation tbh

#

You should get an handle to the virtual console and clear it instead

main olive
fresh saddle
#

Hmm I'd use a library for that

icy owl
#

Hello everyone!
I am exploring bash scripting currently and trying to install and configure MySQL using a bash script either locally in my mac or a linux system on AWS EC2 instance, but cannot figure out how to do it. Can anyone help me how to do this with a bash script?
Thank you!

limber sandal
opaque ginkgo
#

on linux cant you just print an ansi escape

summer trail
#

Depends on the terminal. Almost always, nowadays, but printing a hardcoded escape is not the right way to do it if you care about portability.

tender plinth
#

Hello, is there a way to send a process to background after a certain time

jolly kite
#

I love that you can grep emoji

limber sandal
#

@jolly kite ofc it's just unicode

#

you can literally name a file 🐱

jolly kite
#

Might start doing that for the playground files

#

just name the resume 👨.pdf

limber sandal
#

💩.pdf

jolly kite
#

never gets me a job anyways, might as well name it that

amber garnet
pliant leaf
#

add an ampersand after the process

#

so python3 main.py &

midnight pilot
#

hi i have a problem with my tcp chat room it works fine on a local network but i cant get it to run outside my network
can you help me

midnight pilot
#

yeah i can send you the code

#

the server crashes when enter my public ip

#
import threading
import socket

# Connection Data
host = '198,168.1.1'
port = 55555

# Starting Server
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind((host, port))
server.listen()

# Lists For Clients and Their Nicknames
clients = []
nicknames = []


def broadcast(message):
    for client in clients:
        client.send(message)

def handle(client):
    while True:
        try:
            message = client.recv(1024)
            broadcast(message)
        except:
            index = clients.index(client)
            clients.remove(client)
            client.close()
            nickname = nicknames[index]
            broadcast(f'{nickname} left!'.encode('ascii'))
            nicknames.remove(nickname)
            break


def receive():
    while True:
        # Accept Connection
        client, address = server.accept()
        print(f"Connected with {str(address)}")

        # Request And Store Nickname
        client.send('NICK'.encode('ascii'))
        nickname = client.recv(1024).decode('ascii')
        nicknames.append(nickname)
        clients.append(client)

        # Print And Broadcast Nickname
        print(f"Nickname is {nickname}")
        broadcast(f"{nickname} joined!".encode('ascii'))
        client.send('Connected to server!'.encode('ascii'))

        # Start Handling Thread For Client
        thread = threading.Thread(target=handle, args=(client,))
        thread.start()

receive()

#

this is the server code

amber garnet
#

host = '198,168.1.1'
You have typo here

#

Use dots

midnight pilot
#
import socket
import threading


nickname = input("Choose your nickname: ")

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(('198,168.1.1', 55555))


def receive():
    while True:
        try:
            message = client.recv(1024).decode('ascii')
            if message == 'NICK':
                client.send(nickname.encode('ascii'))
            else:
                print(message)
        except:
            print("An error occured!")
            client.close()
            break

def write():
    while True:
        message = f'{nickname}: {input("") }'
        client.send(message.encode('ascii'))


receive_thread = threading.Thread(target=receive)
receive_thread.start()

write_thread = threading.Thread(target=write)
write_thread.start()
#

this is the client code

amber garnet
#

client.connect(('198,168.1.1', 55555))
Same here

midnight pilot
#

yeah sory i just swiched it so i didnt have my public ip up there

amber garnet
#

Right

midnight pilot
#

the program works fine on my network i can conect from difrent pc with no problem

#

but when i opend the ports on my router and swiched the ip it just crases

#

crashes

#

u still here?

amber garnet
#

Let me see

amber garnet
midnight pilot
#

i fix it about 10 min ago forgot to save the changes

#

it works fine

#

i just need to make a interface and put it in a android app

untold socket
opaque ginkgo
shy yokeBOT
#
os.name```
The name of the operating system dependent module imported. The following names have currently been registered: `'posix'`, `'nt'`, `'java'`.

See also

[`sys.platform`](sys.html#sys.platform "sys.platform") has a finer granularity. [`os.uname()`](#os.uname "os.uname") gives system-dependent version information.

The [`platform`](platform.html#module-platform "platform: Retrieves as much platform identifying data as possible.") module provides detailed checks for the system’s identity.
opaque ginkgo
#

os.name can only be posix, nt or java so most of those checks are useless

#

anyways there are better solutions for both

#

for windows use some winapi thing through pywin32

#

for unix use termios or whatever its called or just ansi escapes

covert orchid
#

Hi everybody. I'm trying to use imageai but while I'm installing/testing my ubuntu get broken. Network doesn't work, terminal (sudo, apt, etc) doesn't work, I can't stop any process by ctrl+c/z. Any suggestion?

main olive
#

we need some sort of debug output

#

journalctl -xef and dmesg would be nice

#

upload the output to a paste service such as ix.io

normal prairie
#

Any ideas why x11 would be stupid slow compared to remote desktop?

#

I have like 2 second latency on a chrome window when I ssh -X from my macbook using Xquartz. Remote desktop isn't perfect, but it's much better

jolly kite
#

Is there any way to name the tabs in my terminal?

opaque ginkgo
#

which terminal

main olive
#

good evening, I'm trying to reimplement UNIX tree command in python.

So for e.g I have a function which returns a list with all dirs/subdirs of path specified:

tests/data
tests/data/.hidden
tests/data/.hidden/files.txt
tests/data/file1.txt
tests/data/file2.txt
tests/data/folder-1
tests/data/folder-1/first.php
tests/data/folder-1/second.php
tests/data/folder-2
tests/data/folder-2/testing.php
tests/data/folder-3
tests/data/folder-3/.gitkeep

Expected output:

tests
|--------data
          |------ folder1
          |------ fodler2
          |------ folder3

How can I make a pretty output of this with a tree-alike structure? Is there a package/library that can help me ?

Any help is greatly appreciated.

inland gulch
#

@main olive the standard libraries os.scandir() and print(), make a function that prints current directory contents with a prefix paramter, call it recursively on start directory

heavy plank
eager quail
#

i usually set the stdout and stderr to subprocess.DEVNULL

fallow narwhal
#

a windows batch file executes commands that it contains
what if one one the commands prompted use input?
can i put what should be entered in the batch file (if i know) or does the user have to type it out?

limber sandal
#

@fallow narwhal this is unix not windows, duh

fallow narwhal
limber sandal
#

read up on command arguments and user inputs
if that is what you are looking for. If not, when you spawn a program the shell will behave as the program defines it and the script will resume after program is finished.

nimble gale
#

RUNNING Spyder3 in Ubuntu, I simply want to be able to "STOP" a script, WITHOUT erasing the screen, or resetting my session... there must be some way to just Gracefully exit, and NOT lose what was printed, any suggestions please.

#

Seriously, no one knows how to do this?

dull nymph
#

@nimble gale open a second shell and send kill to the process?

nimble gale
#

nope. answer apparently is to use sys.exit(), only thing that works in my case. 🙂

nimble gale
#

anyone familiar with numpy?

#

When accessing a numpy array, and you pass [-1] what does this actually do?

quasi juniper
#

last row

#

returns the last row in your array @nimble gale

#

same as array[-1, : ]

wheat jacinth
#

$pnt (hi)

nimble gale
#

Okay, I got things all sorted out, thanks all. 🙂

meager heron
#

guys does someone know how to run multiple ssh commands with paramiko?

broken sphinx
#

Can somebody tell me what unix is?

twilit bolt
#

A pretty good history.

fresh saddle
#

It is a family of operating systems

#

The most known Unix implementation is Linux RT, and its derivates

heavy plank
tender plinth
#

Linux has support for fg_kasrl since mid 2020's I suppose, is there any way to check if it's enabled for my system in runtime?

fresh saddle
#

Do you have a typo? I can’t find fg_kasrl on google

fresh saddle
#

A'ight, there are no spaces

#

Well, it is a patchset, so if you didn't run the patch against your kernel source code, it shouldn't be installed

tender plinth
#

oh , I was wondering if its possible to detect fg kaslr during runtime with some command

fresh saddle
#

It usually set a capability, so you should be able to check for that

tender plinth
#

oh is it?

fresh saddle
#

Patches usually do, but it is by no mean required

tender plinth
#

okay , suppose Im in custom compiled kernel image , and I wish to find out if fg kaslr is enabled , is there any command by which we can find that out?

#

or do I have to know with what all options its built to find that out

fresh saddle
#

If grep CONFIG_FG_KASLR= /boot/config-$(uname -r) returns something, it should be enabled

tender plinth
#

oh thanks alot!

near arrow
#

well i think ubuntu logs python errors in /var/logs directory i had a task in my code that was constantly crashing and my logs file got too big, i fixed the problem tho now i was wondering if i could delete all files from logs directory to free up some disk space

eager quail
#

okay so i asked this question in #python-discussion, but did not get a response so i imagine i might here

#

okay so i have a python script that i would like to make executable from anywhere on my linux system

now my first thought is to put it in /usr/bin, however my code is modularized and consists of several scripts i have already written. does anyone know how i could somehow reference these scripts? or where i could put them?
i can obviously edit sys.path, but that seems a bit hacky..

fresh saddle
#

You should symlink your main file to /usr/bin

eager quail
#

yeah that is a good idea actually

opaque ginkgo
#

no symlink to /usr/local/bin

#

/usr/bin is for system stuff

#

/usr/local/bin is for your stuff

#

@eager quail

fresh saddle
#

I mean

#

It isn’t like it matters too much

opaque ginkgo
#

😦

eager quail
sharp perch
#

today I learned I can make python code portable to run from either Windows or Linux, using the platform module to detect

#

huh, I was supposed to wrap python code in three backticks, but discord is only letting me type even numbers of backticks ???

#

NEway... if hostOS is "Windows":

#

in the else, under linux, I also found i need HOMEDIR = os.path.expanduser(''~nameofuser'')

limber sandal
#

@sharp perch and?
Python code can run on both Linux & Windows using the same code, just that in some circumstances where you might use a platform specific thing, e.g running a OS Command you will have to make sure to write the equivalent on the other platform if you want your code to be cross platform.

sharp perch
grizzled saffron
#

or using a keyboard layout with accents

sharp perch
#

I added US international kbd layout
It messes up quotes

#

I should try again with that turned off

fresh saddle
#

@sharp perch with French Azerty the backticks are on ALT GR + é

grizzled saffron
#

and either way i think because backticks are used to type accents, you can only type two at once

#

when you press once, it goes into accent mode

#

when you press twice it goes oh

sharp perch
opaque ginkgo
#

@sharp perch you can do ` + space to get only 1 backtick

shrewd crypt
#

Is anyone used Linux?

amber garnet
shrewd crypt
amber garnet
shrewd crypt
#

My question is about which operating system r u use?Ubuntu or kali...
Anyway I got my answer

#

Bro I face some problem

#

Actually I am new in Linux environment

amber garnet
shrewd crypt
#

My setting is not open....
While I click on the logo at that time my setting is not opened......

#

I try lot of method for fix this problem.....

#

But I am not fixed

#

Have u face that kind of problem?

amber garnet
#

Are you using Linux as a host system or inside VM?

shrewd crypt
#

What do u mean?

amber garnet
#

I used VMWare too and sometimes drivers for VMs are buggy

shrewd crypt
#

Ooo

#

What's your version?

#

20.04 or 19.04 ?

amber garnet
#

20.04

shrewd crypt
#

Ohh

#

My version is 19.04 which is why I face some problem....

amber garnet
#

I am always using latest stable LTS but I don't think that 19.04 is the problem

#

Which logo are you trying to click?

shrewd crypt
#

Good point

shrewd crypt
#

Even I am trying to open the setting using terminal ( gnome-control-center).....

#

But it's not worked

amber garnet
#

There is an answer marked as solution

shrewd crypt
#

I already used this command

#

In spite of my setting is not opened....

#

I don't understand that where is the problem actually....

amber garnet
#

What about logs? Is there something useful?

shrewd crypt
#

Logs means?

amber garnet
# shrewd crypt Logs means?

https://www.digitalocean.com/community/tutorials/how-to-view-and-configure-linux-logs-on-ubuntu-and-centos I am not really good in Linux logs but if something is not working somethimes you can find the cause why

DigitalOcean

Linux and the applications that run on it can generate all different types of messages, which are recorded in various log files. Linux uses a set of configuration files, directories, programs, commands and daemons to create, store and recycle these lo

#

It's hard to say for me what can be wrong with your OS

shrewd crypt
#

Anyway thanks a ton!

shrewd crypt
amber garnet
amber garnet
shrewd crypt
#

Good afternoon

amber garnet
shrewd crypt
#

Oo

valid wadi
#

Basically I have tried python Gooey to add GUI to my otherwise command line program if i decide to release it as the targeted audience is not that technical. Anyways After the GUI window popped up I soon realized that del key nor backspace aren't working. Later I have experienced the same issue with filezilla adn on their forums I have found that apparently ibus is the issue and they suggest uninstall . Is there a workaround as I currently need ibus?

sharp perch
#

I've got PyCharm set up on a Debian 10 host. I want to use it to develop code that others can run from the shell. Should I use a venv, and then have to wrap my code with a shell starter to call python -m name-of-venv nameofmyscript.py ?

#

or is it easier to just make sure the system packages cover all my imports and have PyCharm inherit systempackages?

amber garnet
#

All required packages you can write in requirements.txt or setup.cfg - then pip install . installs your package with all requirement libraries

gritty sparrow
#

how to do i make a case statement for checking the time in a 12 hour time format

#

this is what i have right now

#

how do i make a condition where its 12PM

quartz zenith
#

eh should I be here

#

I only use WSL

opaque ginkgo
#

wsl is linux and linux is a "unix or unix-like system" so i'd say you're good

obsidian portal
#

anybody know if python 3.9.1 will be supported for ubuntu linux

opaque ginkgo
#

hirsute already has it

limber sandal
#

@obsidian portal ofc, but it may not be in the official repositories yet. Use pyenv if u want to customize which python build you running

twilit shoal
#

@obsidian portal yes

sweet relic
#

has anyone had issues with repo init command?
i keep seeing

Traceback (most recent call last):
  File "/media/SModules/newz/.repo/repo/main.py", line 500, in <module>
    _Main(sys.argv[1:])
  File "/media/SModules/newz/.repo/repo/main.py", line 476, in _Main
    result = repo._Run(argv) or 0
  File "/media/SModules/newz/.repo/repo/main.py", line 155, in _Run
    result = cmd.Execute(copts, cargs)
  File "/media/SModules/newz/.repo/repo/subcmds/init.py", line 390, in Execute
    self._SyncManifest(opt)
  File "/media/SModules/newz/.repo/repo/subcmds/init.py", line 236, in _SyncManifest
    m.MetaBranchSwitch(opt.manifest_branch)
  File "/media/SModules/newz/.repo/repo/project.py", line 2634, in MetaBranchSwitch
    self.Sync_LocalHalf(syncbuf)
  File "/media/SModules/newz/.repo/repo/project.py", line 1170, in Sync_LocalHalf
    self._InitWorkTree()
  File "/media/SModules/newz/.repo/repo/project.py", line 2224, in _InitWorkTree
    _lwrite(os.path.join(dotgit, HEAD), '%s\n' % self.GetRevisionId())
  File "/media/SModules/newz/.repo/repo/project.py", line 51, in _lwrite
    fd.write(content)
TypeError: a bytes-like object is required, not 'str'

#

does it have to do with python version?

inland gulch
#

Looks like it could be repo used an incompatible python version @sweet relic what repo and python versions are they?

sweet relic
#

I tried getting around it by running /usr/bin/repo init... but now it's stuck on the /usr/bin/repo sync part. I suspect it has to do with python version as well

#
  File "/usr/lib/python2.7/pickle.py", line 892, in load_proto
    raise ValueError, "unsupported pickle protocol: %d" % proto
ValueError: unsupported pickle protocol: 4
#

that's what I see now

#

I tried running rm ~/.repopickle_.gitconfig but doesn't really solve the problem

willow pivot
#
Traceback (most recent call last):
  File "/media/SModules/newz/.repo/repo/main.py", line 500, in <module>
    _Main(sys.argv[1:])
  File "/media/SModules/newz/.repo/repo/main.py", line 476, in _Main
    result = repo._Run(argv) or 0
  File "/media/SModules/newz/.repo/repo/main.py", line 155, in _Run
    result = cmd.Execute(copts, cargs)
  File "/media/SModules/newz/.repo/repo/subcmds/init.py", line 390, in Execute
    self._SyncManifest(opt)
  File "/media/SModules/newz/.repo/repo/subcmds/init.py", line 236, in _SyncManifest
    m.MetaBranchSwitch(opt.manifest_branch)
  File "/media/SModules/newz/.repo/repo/project.py", line 2634, in MetaBranchSwitch
    self.Sync_LocalHalf(syncbuf)
  File "/media/SModules/newz/.repo/repo/project.py", line 1170, in Sync_LocalHalf
    self._InitWorkTree()
  File "/media/SModules/newz/.repo/repo/project.py", line 2224, in _InitWorkTree
    _lwrite(os.path.join(dotgit, HEAD), '%s\n' % self.GetRevisionId())
  File "/media/SModules/newz/.repo/repo/project.py", line 51, in _lwrite
    fd.write(content)
TypeError: a bytes-like object is required, not 'str'
#
case $ (date +"%r") in
obsidian portal
#

i need to get an update

inland gulch
#

@sweet relic lools like repo has python2. 6 as min version according to 1.12.16 source, so it shouldn't be a version issue. That said, I still think it is. Try changing the shebang at line 1 of your repo file from #!/usr/bin/env python to #!/usr/bin/env python3 and see if it runs better or worse

gritty sparrow
#
  
 #!/bin/bash
   echo -n "Enter a word: "
   read word
   word_length="${#word}"
   counter=1
   for ((i=1 ; i <= word_length ; i++)) do
           echo "Letter $counter ": $word | cut -c $i
           (( counter++ ))
   done
#

can someone tell me why my bash script wont work as intended?

#

the purpose of this script is to enter a word example: eddy and display as
letter 1: e
letter 2: d
letter 3: d
letter 4: y

#

when i run it i get this instead

opaque ginkgo
#
echo -n "Letter $counter: "
echo "$word" | cut -c "$i"
#

or use bash specific stuff

for ((i=0 ; i < word_length ; i++)) do
   echo "Letter $counter: ${word:$i:1}"
   (( counter++ ))
done
#

@gritty sparrow

gritty sparrow
#

shoot i forgot to message back in but i figured it out!

#

thank you though

maiden geyser
#

are are the event files in /dev/input?

tepid drum
#

I am trying to make a bash script to loop through all files in a folder and move them dependent on the file created date, so a file created yesterday will move to a folder 2021-02-14 but cant seem to get anywhere
i use this but it loops through all files older then one day, anyone got any clue for fil in $(find "$folder_path" -type f -mtime +1)

scarlet sapphire
#

I haven't used unix forever

#

unix based

#

unix-based

covert trout
meager elk
#

I set up a django project on ubuntu with nginx and uwsgi. The problem is that none of the images are loading. When I go into inspect > console, it says the server responded with 500 when trying to get the images. Does anyone know how to fix this?

weary fossil
#

You're getting an Internal Server error. This happens due to some permission issue or php timeout

#

You can also look into the code in .htaccess

meager elk
weary fossil
#

0755 (-rwxr-xr-x) should be the permission set for PHP and CGI scripts

meager elk
#

so chmod 775 filename?

weary fossil
#

Yeah, give it a try

meager elk
#

I tried that

#

I even tried 777 to give it all the permissions

#

and it still didn't work

#

do you know what else could be the problem or if I need to do something else with permission?

#

@weary fossil

weary fossil
#

Php timeout maybe a problem. Also check your code under .htaccess

#

For any logical errors

meager elk
#

where's .htaccess located?

#

I haven't created one

#

is one created by default?

weary fossil
#

Ah pardon me, you said you're doing an nginx project. . htaccess is not supported in nginx

meager elk
#

oh ok

weary fossil
#

Be informed that your project is encountering a timeout

#

But I can't think of any other fix

#

I will surely share if I find a probable one

meager elk
#

ok, thanks!

#

so how would the timeout be causing the images not to load?

weary fossil
#

The images to be loaded (and every other operations you do) are requests and if these requests fail to be fulfilled, images fail to load and it throws error code 500 (Internal Server Error)

#

I am assuming you have correctly given path for the images

meager elk
weary fossil
#

Yes

meager elk
#

I just have the {% static 'filename' %} for the images

#

so I think I have the correct paths

#

unless they work different on nginx

#

it works fine on my local machine

#

so how would I fix the timeout?

#

@weary fossil

astral portal
#

someebody help me run tlauncher on 64 bit popos
I keep getting this error
cannot execute binary file: Exec format error
I have already ran this command sudo dpkg --add-architecture i386

fresh saddle
#

Well, you shouldn’t try to run i386 executables on x86

astral portal
#

what should I be doing then? I have this jar file which throws the error while opening

warped nimbus
#

Try asking in a Java forum or server.

verbal gorge
#
$ sudo apt update
Hit:1 http://deb.debian.org/debian buster InRelease                                                    
Hit:2 http://deb.debian.org/debian buster-updates InRelease                                            
Get:3 http://deb.debian.org/debian buster/non-free amd64 Packages [87.7 kB]
Get:4 http://deb.debian.org/debian buster/non-free Translation-en [88.8 kB]                            Get:5 http://deb.debian.org/debian buster/non-free amd64 DEP-11 Metadata [9,096 B]                     
Get:6 http://deb.debian.org/debian buster/non-free DEP-11 48x48 Icons [3,491 B]                        
Get:7 http://deb.debian.org/debian buster/non-free DEP-11 64x64 Icons [38.3 kB]                       
Get:8 http://deb.debian.org/debian buster/non-free DEP-11 128x128 Icons [6,725 B]                
Hit:9 http://security.debian.org/debian-security buster/updates InRelease                        
Ign:10 http://ppa.launchpad.net/papirus/papirus/ubuntu hirsute InRelease                            
Err:11 http://ppa.launchpad.net/papirus/papirus/ubuntu hirsute Release                                
  404  Not Found [IP: 91.189.95.85 80]
Reading package lists... Done                                                                        
E: The repository 'http://ppa.launchpad.net/papirus/papirus/ubuntu hirsute Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
#

I want to apt update

astral portal
neon hare
#

yo so uh i have arch

#

and i tried using my gpu with optimus

#

i enabled external gpu usage

#

and uh no processes are running on the gpu, 0MiB memory usage

#

but the temp is capped at about 37-38C

covert urchin
#

Hi! Can somebody help me? I want to run an exe with mingw32 on linux x86-64 how I can recompile it?

opaque ginkgo
#

you can't without the source code

covert urchin
#

i have the source the

opaque ginkgo
#

do you have a link?

#

since every project does it differently

covert urchin
opaque ginkgo
#

oh nice there's a makefile

#

you should be able to just run make from the project root

#

assuming you've installed all the compile deps

granite aspen
#

I'm not sure how to boil this down to a googleable question: I bought my computer as a Windows 10 machine, but it got really slow so I burned Linux to a flash drive and installed only Linux, so I'm pretty sure any Windows that was on here before is gone. I wasn't able to dual boot because my hard drive was too fragmented to to make a new partition. But I'm pretty sure installing Linux wiped everything that was on the hard drive, so I assume I can make a Windows 10 partition now. My uni lets people get windows 10 education but I'm not sure if that's only for if you already have windows 10 or what.

So is there any way to get windows 10 back on here?

devout fable
#

@granite aspen you probably just need to boot into a windows iso and install it?

#

That should get the job done

granite aspen
cursive holly
#

random question: why is visual studio code so ugly (like the text) on linux but then looks nice on windows

devout fable
#

You flash the iso to a usb to create a bootable device

granite aspen
devout fable
#

I mean you could just never active windows

#

But you’ll need to live with that watermark in the corner

#

Windows is annoying like that

granite aspen
#

ah

#

thanks for the info!

opaque ginkgo
#

@cursive holly might not have the right font installed?

cursive holly
#

any recommended font?

opaque ginkgo
#

@cursive holly default on windows is Consolas

cursive holly
#

ah ty

azure jacinth
#

unix is nice!

barren temple
#

@azure jacinth got your voice verification yet? 😄

azure jacinth
#

no

#

XD

#

i have to wait 3 days ... big sad

tulip dock
#

Sometimes multiprocessing.Process.join() returns too quick, is that a known issue?

proc = multiprocessing.Process(...)
proc.start()
start = time.perf_counter()
proc.join(10)
if proc.exitcode is None:
    print(time.perf_counter() - start)  # Sometimes will print "0.10", way lower than 10 seconds
tulip dock
#

might be caused by EINTR or something... I guess I have to loop my call to .join()

silent stag
#

I am trying to download a single file from private github, but my token is in a txt file. how can i do that in a single command? what i have i thought would work but its not. any help?```bash
wget https://${cat ~/TOKEN.txt}@raw.githubusercontent.com/path-of-file

tidal sundial
#

get x scoped

kindred basin
#

oh hey there's a unix channel

#

i must be going blind

kindred basin
fresh saddle
#

Okay, there’s no line break

#

You should try with an auth header then

opaque ginkgo
#

@silent stag not {}

#

$(cat ~/TOKEN.txt)

#

or just $(< ~/TOKEN.txt)

#

if the newline messes it up do $(echo -n "$(< ~/TOKEN.txt)")

silent stag
#

i think what was messing me up was the fact that i am useing powershell

main olive
#

Hi, anyone using i3 and i3 status bar? The battery status on my macbook behave weird

burnt flax
#

hi

#

thoughts about a drive like this for developing apis?

hardy grail
#

@burnt flax 120GB is pretty small - Also this is more of an off-topic question

kindred basin
kindred basin
main olive
#

Hi

#

I downloaded Xubuntu

#

and I have 16 GB flash

#

How to install xubuntu in this parttion ?

#

sorry if I make anything wrong

nimble panther
#

@main olive you need to burn the xubuntu iso to the usb using a tool like rofus, etcher or win32 disk imager

#

I think it'd be better if you ask any further questions in an off topic channel

main olive
#

trying to pipe output of arbitrary command into python with -i option enabled

#

aka something like echo canary | python -i getstdin.py which would read "canary" into a variable and put me in the interactive python shell

#

but what im currently getting is

#

and i am back in the regular bash prompt

#

i am assuming its related to file handles used by bash

opaque ginkgo
#

try (echo canary; cat) | python -i getstdin.py

#

b/c currently stdin is closed when echo finishes

fresh saddle
main olive
#

hmm, neither works

#

i am reading stdin with fileinput.input() for what its worth

#

(echo canary; cat) | python -i getstdin.py with and without -n arg are making the stdin hang and wait for an input

#

exiting out with ctrl + C shows that the KeyboardInterrupt is raised

#

if I can input a delimiter somehow that will end input() call i am assuming i will be put in the right py context

#

i am using echo solely for testing btw

#

i am intending to only fetch the output of cat

#

but cat uniquesubdomains | python -i getstdin.py results in the immediate termination,

update: solved my issue by manipulating bash aliases, by redirecting the stdn into a temporary file in tmp and then opening it with python -i as a separate command

#

is there a reason why i cant open folders on my system until ive opened the hard drive, To be clear this happens every time my computer is restarted, From what i can guess it seems like the computer is not recognizing the hard drive paths exist until that hard drive itself has been opened

#

the shmup folder is on another hard drive, When i access that hard drive, The folder can then be clicked

#

its like it isn't aware the hard drive exists until i manually access it

kindred basin
#

Also, does anyone have a recent guide on how to setup a aarch64 vm with qemu and preferably libvirt

main olive
#

any shortcuts to folders or files in that hard drive are inaccessible

#

until i either cd into that hard drive, or manually cd into it with file explorer

mighty tangle
#

Does anyone have use to redirect output of a command to a different terminal? (EG running tests from vim instead of swapping to another terminal)

opaque ginkgo
#

do tty in the other terminal

#

then redirect output to the file that it shows

#

eg > /dev/pts/1

mighty tangle
#

I have to admit, its an attempt at a shameless plug

#

that is exactly what I did

fallow totem
#

Has anyone successfuly handled unix file system paths with special characters in python?

#

i'm using os.walk to scan a folder and save file stats (paths, file size, metadata, etc) to a db, but certain paths seem unparseable with python.

#

For example, listdir returns one file name with a unicode character \udca0 in it. No matter what i've tried (encoding to bytes, surrogatepass) i cannot get a real path from that string that returns true from os.path.exists, desptie being able to see the file in file explorer

#

Wondering if anyone here has worked with paths in linux that have special characters like that and how to handle them, before i try asking on stack

sterile fern
verbal gorge
#

What are linux-headers?

harsh bison
vapid quarry
#

anyone use virtual machines? I genuinely don't understand the point behind these settings

#

Like why does version matter, what is the point

kindred basin
#

Presets, probably.

scenic wave
#

Hello everyone, I would like your help with an error message when running make install
Makefile:32: /home/armel/src/Makefile.config: No such file or directory
make: *** No rule to make target '/home/armel/src/Makefile.config'. Stop.

kindred basin
#

Bad makefile

#

Post the contents

#

Its looking for a file that doesn't exist

scenic wave
#

armel@LAPTOP-K7333LPP:~/pratique_traitement_sismique/src$ ls
3D MAILHOME_44R18 Refl chkroot.sh demos mkdirectories.sh xtri
ACKNOWLEDGEMENTS Makefile Rules comp developer_tools par
Complex Makefile.config Sfio configs doc psplot
Fortran Mathematica Third_Party contents faq su
Installation_Instructions Mesa Trielas cwp install.successful tetra
LEGAL_STATEMENT PVM Xmcwp cwp_su_version license.sh tri
LICENSE_44R18_ACCEPTED Portability Xtcwp cwputils mailhome.sh xplot
armel@LAPTOP-K7333LPP:~/pratique_traitement_sismique/src$ make install
Makefile:32: /home/armel/src/Makefile.config: No such file or directory
make: *** No rule to make target '/home/armel/src/Makefile.config'. Stop.
armel@LAPTOP-K7333LPP:~/pratique_traitement_sismique/src$

#

3D MAILHOME_44R18 Refl chkroot.sh demos mkdirectories.sh xtri
ACKNOWLEDGEMENTS Makefile Rules comp developer_tools par
Complex Makefile.config Sfio configs doc psplot
Fortran Mathematica Third_Party contents faq su
Installation_Instructions Mesa Trielas cwp install.successful tetra
LEGAL_STATEMENT PVM Xmcwp cwp_su_version license.sh tri
LICENSE_44R18_ACCEPTED Portability Xtcwp cwputils mailhome.sh xplo

#

I have sent back two the list of files

#

!!!

kindred basin
#

...?

#

Post the contents of the makefile

#

Its looking in the wrong directory for some reason

scenic wave
#

Makefile does not have containers.

scenic wave
#

armel@LAPTOP-K7333LPP:~/pratique_traitement_sismique/src$ ls
3D MAILHOME_44R18 Refl chkroot.sh demos mkdirectories.sh xtri
ACKNOWLEDGEMENTS Makefile Rules comp developer_tools par
Complex Makefile.config Sfio configs doc psplot
Fortran Mathematica Third_Party contents faq su
Installation_Instructions Mesa Trielas cwp install.successful tetra
LEGAL_STATEMENT PVM Xmcwp cwp_su_version license.sh tri
LICENSE_44R18_ACCEPTED Portability Xtcwp cwputils mailhome.sh xplot
armel@LAPTOP-K7333LPP:~/pratique_traitement_sismique/src$ make install
Makefile:32: /home/armel/src/Makefile.config: No such file or directory
make: *** No rule to make target '/home/armel/src/Makefile.config'. Stop.
armel@LAPTOP-K7333LPP:~/pratique_traitement_sismique/src$

kindred merlin
#

Guys

#

how do I turn a Python File to An App in MacOS Catalina

#
pyinstaller --onefile -w "filename.py"``` Dosent seem to work
neon cloak
kindred basin
#

The guest additions CD contains everything though

misty plaza
#

Does anyone know winsound module equivalent for Linux?

inland gulch
#

For Linux audio look at ALSA, pulse or jack audio packages if winsound is what i guess it is

tender plinth
#

Hello , Im using pwndgb for debugging a kernel module via a gdb-server stub. The issue with pwndgb is that it's very slow (more than 1 second lag per instruction step) , does anyone know a workaround? others like vanilla gdb , gef and peda work better in this regard, but I wish to use pwndgb for now

burnt flax
#

Does anyone here use WSL?

kindred basin
#

Yes

main olive
#

I'm using urxvt and some of the lines I want to use in my config have ...,font-size... for example. What does that ..., mean?

main olive
#

what is the file extension

#

.conf?

#

then its prolly just a commented part

#

if it is in use already i dont really know what that means

main olive
#

Hi, short question → where to announce a new python library?

granite aspen
#

I have a Dell laptop that shipped with Windows 10 but only has linux mint installed on it now. I previously attempted to install the proper nvidia driver for the GPU that is in the machine, but in so doing I messed up the display such that I could no longer do anything and had to start over (ie install Linux again from the flash drive). I can't afford to have that happen again now that the semester is in full swing so I'm afraid to figure out what to do via my own investigation.

burnt flax
#

boot from the external drive*

#

once you get it to work, you can stop using the drive, and then repeat the steps on the main drive.

granite aspen
#

@burnt flax so plug in the same flash drive as before and boot from the flash drive, but don't install over the existing installation? that sounds like a good plan.

#

does that mean that any thing I do during that session is restricted to live memory or what?

burnt flax
#

I don't actually know, I just know this from a friend. It would probably be restricted to the external drive and RAM.

#

@granite aspen ^

#

No, wait

#

The main drive would probably be mounted by default.

harsh owl
#

Stelercus: what is your actual problem? you have a laptop with linx mint, its not working after a gpu update? did you follow any guide? there is no reason to reinstall from gpu driver / xwindows problems. all recoverable on command line

#

even if your system is unbootable (that would not happen from gpu issues) you can recover it with a usb drive and such. no need to reinstall

kindred basin
#

What hardware? Optimus? What did you do that broke it?

kindred basin
#

Its very rare that you would need to actually reinstall

#

Typically, booting into a live ISO and chrooting and fixing what went wrong is enough

autumn parcel
#

Yeah, I accidentally uninstalled xorg, network manager, and a bunch of other stuff (long story), and a chroot from a live USB fixed everything in a few commands

main olive
#

It has drivers out of the box

#

Just while downloading the ise

#

Iso*

#

Select the nvidia version

#

The gui is really good and is ubuntu based

#

It uses GNOME

kindred basin
#

Pop!_OS is pretty good

#

Great Optimus support iirc

#

And Solus

nimble panther
#

but it will not solve the graphical issues you are facing, it's just a back up

neat epoch
#

Hi, not sure if i should ask here or somewhere else but i'm doing ctf and one of the challenges is to hack into a machine, but it seems only the first 'group' works. Does anyone know how to get past this?

#

it seems to work for some commands but not others

nimble panther
#

!ot @neat epoch I feel it would be better if you asked in an offtopic channel 🙂

kindred basin
#

echo $TERM

#

Your TERM environment variable isn't properly set or nano doesn't recognize it

#

Or it just isn't set

#

Also, vim ftw

burnt flax
granite aspen
#

I could also make a VM of the same operating system?

#

but idk if that will let me touch the gpu

burnt flax
#

that's why I would use a seperate drive

granite aspen
#

idk what that means. separate drive?

harsh owl
#

a VM wouldn't really let you recreate this problem. if you boot off another drive, you could basically install the OS, monkey around, then switch to other drive if something goes wrong

#

it'd be like taking the drive out of your laptop, putting in a new one, installing onto that. then swapping back if you needed to

kindred basin
#

Virtual Machines virtualize hardware, so you wouldn't be able to test out hardware specific things. (Unless you passed through your hardware, but then you wouldn't be able to use your host system, which means that you wouldn't be able to use your VM)

teal jay
harsh owl
#

they present a generic virtualized device for hardware, so you wouldnt have access to the actual gpu hardware directly, unless you do a pass through. which is complicated and usually a bit crashy in my experience

burnt flax
#

@granite aspen In short, I'd take a second drive, be it the 8gb flash drive, an external ssd or hdd, anything.
Flash that with the same OS you currently run.
Boot your laptop from that external drive, you'd need to enter BIOS or boot manager to do this, before the OS even launches.
This means you'll be running off of the external drive, and the internal drive will likely be mounted. I would unmount it if it happens to be mounted.
Use the laptop running from the external drive for a while, trying to make the issue occur. At that point, you now have a system for figuring out what the issue is.

Now you can troubleshoot solutions, and whatever you change should be on the external drive, not affecting your main internal drive.

#

clearly in short

main olive
#

I think reinstallation is faster

#

Just boot from live usb copy your data and do a fresh install

hoary pond
#

@granite aspen be careful to check your bios before you do anything - mainly where the bios recognises the windows partition to be in

#

cuz if you install an os in a drive where the bios recognises another boot media or something, its gonna ruin your other os

#

which happened to me :)

dark cargo
#

anyone here use debian?

harsh owl
#

StevenTalking: i have for many years, currently ubuntu 20.04 and archlinux for the most part

kindred basin
eternal gulch
#

how to open python file in terminal/command line using a linux lite

#

?

blazing oar
#

i think it would just be python3 filename

#

do you mean running it or looking at it

eternal gulch
#

ok

eternal gulch
#

the file

blazing oar
#

yeah python3 filename should work

eternal gulch
#

it is in my desktop

#

i am useing the text editor from linux

blazing oar
#

ok so where did you save the file?

eternal gulch
#

on desktop

#

i have python 2.7 and 3.5

#

i use 3.5

blazing oar
#

so try cd Desktop/ when you first open the terminal

eternal gulch
#

ok

blazing oar
#

and then python3 filename

eternal gulch
#

it says: bash: cd: desktop/: No such a file or directory

#

why

blazing oar
#

hm

eternal gulch
#

i dont know whyyy

blazing oar
#

try cd Desktop/ with a capital D

#

if it doesnt say anything it works

eternal gulch
#

i dont know how to work in command line

blazing oar
#

ok try ls to list out all the folders from the main folder, which you start out on when you first open the terminal

eternal gulch
#

i typed

blazing oar
#

do them in separate commands

eternal gulch
#

?

blazing oar
#

like first do cd Desktop/

#

then hit enter

eternal gulch
#

ok

#

hey

#

it didnt show the $ it shows a `/Desktop$

blazing oar
#

?

#

try cd ~/Desktop

eternal gulch
#

how to run it

blazing oar
#

python3 hello.py

#

it should work

#

if it doesnt work try python hello.py

eternal gulch
#

it worked

#

thanks bro

blazing oar
#

np :)

eternal gulch
#

can you help me learn python?

#

more

blazing oar
#

maybe

#

i don't know too much python

eternal gulch
#

mee too

#

but i can help you about something

blazing oar
#

wdym

eternal gulch
#

?????

blazing oar
#

"what do you mean"

eternal gulch
#

a ok

main olive
main olive
#

Hi! Can somebody help me pls? A Few days ago I set up an alternative version of python in my Linux shell. Right now I realize I stuck in 3.6.0 and can not go back to 3.8 version. What am I doing wrong?

harsh owl
#

whats the output of ls -l which python3 ?

#

you can always call the version you want directly with #!/usr/bin/python38 or whatever. but alternatives should be working; it updates a symlink

valid wadi
#

I am looking for a way to send and receive data from dmenu

#

I have tried something like ```
cmd= ['echo'] + ['"{Title} {Pages} {Extension}"'.format(**source) for source in sources] + [ '|', "dmenu"]

p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
result = p.communicate()[0]
print(result)

#

But had no luck

valid wadi
#

I managed to get dmenu to run with this

#
echo = Popen(['echo'] + ['{Title} {Pages} {Extension}'.format(**source) for source in sources] , stdout=PIPE)
dmenu = Popen(['dmenu'],stdin=echo.stdout, stdout=PIPE)
echo.stdout.close() # enable write error in dd if ssh dies
out, err = dmenu.communicate()
print(out)
#

it's just that hole thing is treated as one item

jolly kite
#

how would one diagnose Chromiun constantly getting sigtraps?

eternal gulch
#

how to run bigger programs in linux lite

#

i docd Desktop/ filename.py

#

for smaller programs

harsh owl
#

prolomic: are you asking how to structure a python program with multiple files that contain functions and such? not really sure what you're asking specific to *nix; project structure is more of a generic python convention

opaque ginkgo
#

linux lite?

hidden nimbus
#

Hi guys! new to the community here. I have questions specifically about python pandas that no one I know seems to be able to answer. Is anyone willing to take a jab at my question? lemon_hyperpleased

fervent pier
#

Sure!

frail oasis
#

yo has anyone mounted /dev/shm successfully as shm on a kube pod

#

in docker i can shm-size but in kube you have to mount a volume there

#

issue is shm_open on the pod is creating files in /dev

#

instead of /dev/shm

#

and df -h isn't showing an shm filesystem mounted there

#

works on my container locally tho

neat epoch
#

Why am i getting this error?

root@JB1:~# ./start.sh
./start.sh: line 3: $'\r': command not found
./start.sh: line 13: syntax error: unexpected end of file
#

Nevermind, i was using windows line endings instead of unix

mortal badger
#

grub install error failed to get canonical path of liveOS_rootfs

#

facing to this while installing grub in void live

hard bear
#

Hi I'm new to bash script

#

but I'm working on sth

#

How do I filter the passwd user accounts and home directories?

#

what I get is this...but not sure if these are the home directories

harsh owl
#

KitadeAqua: those are not the home directories. if you run cat /etc/passwd you should see entries that are /home/$username - those are the home directories

cosmic pine
#

Hello people,
I am trying to use more vim in my daily development workflow, I am trying to add vim-ALE (especially to work with python in terminal-based workflow) and I am getting some error message when loading vim when vim . and opening a file from netrw.
when vim . :

vim .
Error detected while processing /home/eric/.vim/pack/ide/start/ale/plugin/ale.vim:
line   48:
E697: Missing end of List ']': 
line   49:
E10: \ should be followed by /, ? or &
line   50:
E10: \ should be followed by /, ? or &
line   51:
E10: \ should be followed by /, ? or &
line   52:
E10: \ should be followed by /, ? or &
line   53:
E10: \ should be followed by /, ? or &
line   54:
E10: \ should be followed by /, ? or &
line  195:
E10: \ should be followed by /, ? or &
line  197:
E10: \ should be followed by /, ? or &
Error detected while processing function ale#events#Init:
line   30:
E10: \ should be followed by /, ? or &
Press ENTER or type command to continue

once I press ENTER :

Error detected while processing function ale#events#ReadOrEnterEvent:
line    3:
E486: Pattern not found: \${OS}
Press ENTER or type command to continue

when trying to open a file :

Error detected while processing function ale#events#ReadOrEnterEvent:
line    3:
E486: Pattern not found: \${OS}
Press ENTER or type command to continue

Note: for more insights about my config, here is a link to my .vimrc as well as my other dotfiles, https://github.com/Blizter/dotfiles/blob/main/vim/.vimrc

harsh owl
#

Blitzer: what version of vim? theres also a python-ide channel

harsh owl
cosmic pine
#

@harsh owl, Thanks! I must be missing something when installing this package, I am using vim 8, here is the output of vim --version :

autumn parcel
#

Is it a bad idea to use both Xorg and Walyand on different ttys? I have been for a couple days and nothing has happened so far, but it sounds like there would be problems

harsh owl
#

ha, cant say ive ever tried that. if its working i guess its not a bad idea? ;)

main olive
#

Is it a bad idea to use both Xorg and Walyand on different ttys?

#

Why though?

fresh saddle
#

Hmmmmmmmm

#

I guess they may conflict at some point

#

But it should be fairly okay, I’d say

cosmic pine
#

Hey Guys, thanks for the help! I managed to solve my issue, it was due to a wrong install path inside ~/.vim/pack/... After changing the subfolders there it working without any issue! (you can check what changed inside my dotfiles repo on GH 🙂 )

azure portal
#

does anyone here knows how to combine all the contents of a found files into a one file.

Like I have schema.graphl files located in different subdir in my project. What I want is to bring all the contents of each schema.graphql into single file.

The only thing I know is that I can find all schema.graphql files by using the command find . -name 'schema.graphl'.

amber garnet
main olive
#

i'm trying to get access to the root folder in uBuntu :
sudo nautilus /root
but the terminal always crashes

amber garnet
main olive
#

i did btw i can't tell the version rn, it's a VM and i'm too lazy to launch VMware rn

main olive
#

nvm

#

its ok

supple harbor
#
$ cat /etc/*-release
main olive
#

yh thx ur golden

main olive
#

ok

burnt agate
#

when directories are listed, there is usually "." and ".."

#

there was also "..." and when i did "cd ..." i ended up entering the directory and seeing a text file

#

is that like a common thing? to have a directory called "..." to disguise files?

#

im new to linux btw and doing a bunch of challenges on this website called Cyberstart

main olive
#

. means current directory, .. means directory above and ... is the name of a directory

#

... is definitely suspicious

dull dock
#

All my files in my /etc folder are marked as "unwritable" and cant be changed even with root. This error occurs since I changed the root:x :0:0::... Numbers in /etc/passwd

main olive
#

Boot from an USB stick and change it back

fresh saddle
#

Manually editing /etc/passwd sounds like a really bad idea

main olive
#

Debian or Arch ??

#

i mean which one should i choose ?

fresh saddle
#

@main olive do you have any experience with linux?

main olive
#

yh

#

i was using uBuntu for a long time

fresh saddle
#

I'd recommend manjaro or arch then linkerguns

main olive
#

thx

#

manjaro looks hard to install so ima take arch

main olive
#

Um isnt manjaro an easy variant of arch?

#

Whats your reason from switching from ubuntu in the first place? Just testing something else?

fresh saddle
#

Manjaro is supposed to be an easier version of arch, yes

main olive
#

manjaro looks hard to install so ima take arch
gr8 b8 m8

main olive
#

@main olive
uBuntu got old for me

urban beacon
main olive
#

Ik

urban beacon
#

You just need to disable that annoying motherboard beeping thing manually

main olive
#

Ik

main olive
#

how different is it from say ubuntu

#

without the detailed installation

#

i stopped distro hopping a while ago so would love to know

urban beacon
#

With the archfi you have plenty of choices too

#

However it is not as free as normal installation

main olive
#

very related to unix thanks

#

and isnt it like 1500 usd

#

you can buy cheaper from scalpers on ebay

midnight pilot
#

sry wrong cat

#

chat

plush holly
#

.,

midnight phoenix
#

I'm a windows user currently, and I am very curious on using Linux, I'm also a student, so which Linux distro should I use?

amber garnet
midnight phoenix
#

would you recommend it?

prime magnet
#

Debian and Ubuntu are both good for starters

amber garnet
#

In my opinion Debian is worse option because you need to put more effort to install proprietary software

amber garnet
#

I have tried Ubuntu, Debian and Fedora so I am a kind of amateur

amber garnet
midnight phoenix
#

sorry, I'm a complete newbie to this, what does WSL2 mean?

amber garnet
narrow basin
#

Windows subsystem for linux

midnight phoenix
#

oh, thanks!

amber garnet
#

You have videos there so check them out

midnight phoenix
#

okay

narrow basin
#

It's all ready to enable in latest win10 releases

#

Windows store allows you to choose distro. It's all Linux cli

midnight phoenix
#

so WSL2 basically allows me to use Linux on windows?

narrow basin
#

Correct, cli though I don't think gui

#

If you want that then VM or dual boot ubuntu

amber garnet
#

But you can integrate VS Code with WSL or call explorer.exe path/to/directory to open specified location using Windows Explorer

narrow basin
#

VS code will hook to the WSL2 install

midnight phoenix
#

Is ubuntu good for students tho?

narrow basin
#

Ubuntu has great support yeh

midnight phoenix
#

the only thing that is throwing me off is Microsoft Office

#

I could use the online tools though, I would need to get used to them I guess

narrow basin
#

WSL2 is sitting inside windows so no pain.

midnight phoenix
#

is it like having a virtual machine?

narrow basin
#

More tightly integrated than a VM

midnight phoenix
#

does it take a lot of storage or ram or something?

narrow basin
#

Nope Microsoft have done a good job with this keeping resources down more efficient than VM

midnight phoenix
#

oh well

#

I was really curious because Ubuntu was like so customizable

#

I could even make it look like a mac if I felt like it lol

amber garnet
narrow basin
#

Like I said it's not ubuntu GUI if you want that then VM or dual boot

amber garnet
#

You still keep your Windows and call Ubuntu like a normal application

midnight phoenix
#

oh well

amber garnet
midnight phoenix
#

alright, thanks

amber garnet
#

Microsoft done good job with WSL and this page

midnight phoenix
#

I might check it out, I really appreciate your help! Thank you!

amber garnet
#

Good luck!

narrow basin
#

Yeh it's painless if it doesn't work out you can remove it and look at other options

midnight phoenix
#

Alright, thanks a lot!

kindred basin
split tapir
#

Does anyone know how to install kali linux and ubuntu dual boot uefi?

coarse shadow
#

I have kind of a problem with running code on Ubuntu Server, can anyone help me?

#

Basically, set up a venv, did pip to install a package I needed (pythonping) and then tried to run the script. On run, it indicates me there's no such module. Does anyone know why this happens? It's my first time running it on US

coarse shadow
#

Lemmea sec

#

Ok, cannot paste it, will write as verbatim as I can

#

sudo python3 myscript.py
Traceback (most recent call last):

File "myscript.py", line 3, in <module>

import pythonping as ping
ModuleNotFoundError: No module named 'pythonping'

#

@amber garnet

amber garnet
#

Are you sure that you installed module inside venv?

coarse shadow
#

Yyep

#

Pip3 answer with the module already there

amber garnet
#

Oh, okay

#

I see

#

You are calling using sudo

#

Your sudo is not inside venv

#

sudo bash -c "source venv/bin/activate; python3 myscript.py"

#

Something like that should works

coarse shadow
#

Yaaay, it does

#

Thanksalot mate

amber garnet
#

👍

burnt flax
#

my new favorite command

#
 sudo apt -y update && sudo apt -y upgrade
burnt flax
#

@granite aspen did you come up with an idea to fix your monitor or w/e the issue was?

elder sand
#

hey guys I am trying to come up with a source able shell script to be able to run some python scripts on a schedule. Say after I source this shell script source <name-of-script> and type in a command on the command-line(say execute) it should be able to run all my python scripts in order. Would this be possible? To get started on this I am trying to understand how to read commands from within the script, say when execute is typed on the command-line, the script should run without typing out the script name since we initially sourced it. I would appreciate some pointers on how to get started.

warped nimbus
elder sand
#

Thanks mark!

neat epoch
#

Why is this not working?

prime magnet
main olive
prime magnet
#

yeap, also leaving them in bash history

neat epoch
#

i need it for os.environ

main olive
#

Hash it at the very least

#

But that would require you to enter a password anyway, so back at square one

neat epoch
#

why would i hash it

#

that's one way

main olive
#

Just call MariaDB or use a SQL API

prime magnet
#

what I do. I still need to have then in os.env (e.g. containers), I create a .env and source it via bash script. Also, have in mind that is not good idea to place sensitive data into VSC

main olive
#

Storing unencrypted or unhashed passwords is bad practice

neat epoch
#

it's an environment variable, it doesn't really matter

#

but anyways @prime magnet's answer fixed it

main olive
#

I've decided to wipe my old Ubuntu server as card and try and set up a desktop or something from raspbian lite

kindred basin
untold abyss
#

can anyone guess the problem with ubuntu freezing up sometimes (idt its thermals) and not responding to keyboard including SysRq

#

it happens randomly

amber garnet
muted sandal
#

hey guys

#

is some one good with linux here ?

#

i need an urgent help

unreal totem
#

Struggling myself a bit at the moment :/ But whats your Problem?

muted sandal
#

uhh well it's complex tbh

#

for me xorg server isn't working

unreal totem
#

Hm, which graphics card do you have?

#

And which Distribution you are on?

muted sandal
#

well you don't freak right?

#

actually i'm developing Linuxfromscratch

unreal totem
#

omg

muted sandal
#

it's not horrible

#

TBH

unreal totem
#

Don't think i can help there, sorry

muted sandal
#

well

#

actually you can

unreal totem
#

Do you get any error messages?

#

I'll try

muted sandal
#
/usr/bin/startx: line 201: xauth: command not found
/usr/bin/startx: line 203: xauth: command not found
/usr/bin/startx: line 201: xauth: command not found
/usr/bin/startx: line 203: xauth: command not found

_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE) 
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE) 
(EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
(EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
(EE) 
(EE) Server terminated with error (1). Closing log file.


#

xauth command not found

unreal totem
#

Is xauth on your path?

#

Is it installed?

muted sandal
#

well i don't think so

#

i have installed libpam

#

i think the xauth is in the linux -pam

#

linux pam works fine

muted sandal
#

uhh dude?

#

damnn

unreal totem
#

As i said, i know nothing about lfs

muted sandal
#

there's xauth that's what fricked me out

muted sandal
#

the problem is attitude here it's either IDK or why not do it

#

well i'm not rude tbh

#

if you want to know then all you need to do is look what the shit is

#

and figure out something

#

that's how i code nowadays lol

unreal totem
#

Ok, on the page i postet there is a package xauth-1.1.tar.bz2

muted sandal
#

yeah i'm installing that

unreal totem
#

So it doesnt seem to be in libpam

muted sandal
#

yeah phew

#

libpam is the sudo tbh

unreal totem
#

Yea it stands for plugable authentication module, this is pretty much all i know 😛

muted sandal
#

😄

#

well installed that package

unreal totem
#

What happened?

muted sandal
#

well lemme enter the command startx

unreal totem
#

Fingers crossed

muted sandal
#

well

#

lemme enter that command in a different way

#

some errors happened

unreal totem
#

Thats unfortunate

muted sandal
unreal totem
#

What is in he log?

muted sandal
#

no screens found :/

unreal totem
#

Did you install any graphic card drivers?

#

Don't know which one qemu needs

muted sandal
#

well i have one simple problem

#

there's no /run/screen

unreal totem
#

I may be wrong, but screen has nothing to do with xorg

#

I'm confused 😄

muted sandal
#

well

muted sandal
#

tbh

unreal totem
#

As far as i know, screen is a terminal multiplexer. Used to give you more than one terminal over ssh for example

#

similar to tmux

harsh owl
#

screen indeed has nothing to do with xorg, x11 or wayland.

unreal totem
#

Your problem seems to be more on the driver site at the moment

muted sandal
#

well

#

driver side?

unreal totem
#

What does lspci | grep vga give you

muted sandal
#

damn i did shutdown it well wait a second

harsh owl
#

BATMAN: so what is exactly going on? you are trying to remotely connect to a server and run an xsession from it? or is this a local server (laptop, desktop) and trying to get X to start up?

muted sandal
#

actually i'm insatlling xorg into my Linuxfromscratch build

harsh owl
#

ah ok. well its good to learn. like Tenris said, you want to see which video cards your system sees, that lspci command ought to work

#

typically xorg doesn't require any configuration to start up these days. do you know what kind of video card you have?

unreal totem
#

It's a Qemu/kvm box i learned

harsh owl
#

ahh, yeah, that changes things.

muted sandal
#

yeah

shy yokeBOT
#

Hey @muted sandal!

Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:

• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)

• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:

https://paste.pythondiscord.com

harsh owl
#

qemu gets you an emulated graphics device. i scrolled up and saw an error message about X already running? when its back up, can you run ps faux | grep -i xorg ?

muted sandal
#

damn

harsh owl
#

if you see any processes running, x has already started

muted sandal
#

well how to paste a file here?

#

it has more than 2000 characters

harsh owl
muted sandal
#

yeah did that now what ?

harsh owl
#

you just click the save button on the left, then copy/paste the url into here

#

er save button the right

muted sandal
harsh owl
#

looks like a floppy disk

muted sandal
#

here is that

#

@unreal totem look at that link

#

that's the whole error

harsh owl
#

okay so what its saying is that it didnt detect a monitor. which makes sense if its a vm.

muted sandal
#

oh damn

harsh owl
#

[ 767.179] (==) No monitor specified for screen "Default Screen Section".

muted sandal
#

now what 🤔

#

here's somethin similiar

harsh owl
#

since its a vm, you're not easily going to be able to connect to it like you would a local Xorg instance. usually what people do is either vnc in, use ssh -X, things like that.

#

this is a vm right? qemu/kvm instance?

muted sandal
#

qemu/kvm

#

uhh well

#

look at this

harsh owl
#

can you post the output of lspci -v to that pastebin site?

#

linuxfromscratch is kind of 'hard mode' compared to stuff like ubuntu, debian, mint, pop_os et al. but not saying thats a bad thing ;)

#

i like arch linux a lot lately and its not super newb friendly

muted sandal
#

hmm well

#

i can back that

#

but

harsh owl
#

just lspci would work too, no need for -v if too much output.

muted sandal
#

this is my college project tbh

#
lspci: Cannot find any working access method.```
harsh owl
#

huh, that's a new one for me. what is the goal of this assignment?

muted sandal
#

well

harsh owl
#

how 'bout sudo dmesg | grep -i vga ?

muted sandal
#

didn't show any

#

actully this is in qemu

#

but i have used qemu-nbd

#

and loaded it in the chroot env

harsh owl
#

oh man ;)

#

what are you trying to achieve?

muted sandal
#

well i kind of wanted to make an os for my college final year project

#

and i'm doing it

#

the os is built

#

but now the xorg is fricking me up

#

@harsh owl you there ?

harsh owl
#

so like i said, your options for launching xorg in qemu are limited. you can do complicated things like pci passthrough so your qemu instance has access to manipulate the system GPU, but that is pretty troublesome

muted sandal
#

well

harsh owl
muted sandal
#

well different yeah

harsh owl
muted sandal
#

that's for the build having qemu

unreal totem
#

Just a question, would it be reasonable to convert the qemu/kvm box to virtualbox?

#

There you get a pci graphics card

harsh owl
#

i agree, virtualbox makes it much easier for this sort of thing. i use qemu/kvm myself, but generally launch a vnc server or use ssh -X in the guest.

#

on the rare occasion i need gui stuff

muted sandal
#

so what you guys are meaning ?

unreal totem
#

You could try it, if you aren't forced to use qemu

muted sandal
#

i'm not forced to use qemu

#

@harsh owl lspci works

unreal totem
#

I would give it a try. Install virtualbox and try to convert the image

muted sandal
#

well yeah wait a sec

harsh owl
#

when you did the ps faux | grep -i xorg, did anything come up? im curious if x already running like a previous error message indicated.

muted sandal
#

ps faux? command?

#

i did that but it was in chroot

#

now it's in the qemu

#

now say it i'll do it

#

@harsh owl it runs in the virtio

harsh owl
#

what is the output of ps faux | grep -i xorg ?

muted sandal
#

look at that

harsh owl
#

okay so xorg is not started in the vm. and we see your emulated vga device

muted sandal
#

wym?

#

well what now?

harsh owl
#

what is in /etc/X11/xorg.conf.d ? anything? or anything /etc/X11/xorg.conf ?

muted sandal
#

actually

harsh owl
#

cd into xorg.conf.d and ls

muted sandal
#

there is nothing in that

#

why there's nothing that 😢

harsh owl
#

try the instructions around the section that has the command cat > /usr/share/X11/xorg.conf.d/20-vmware.conf << "EOF"

#

you basically just select that whole block and paste it in, then try to startx and see what happens

#

what your vm is complaining about, is that it cant detect a monitor configuration, so xorg cant start.

#

i dunno much about qxl vga emulated driver. like i said, i just ssh -X or start up vnc either in the guest or as a qemu arg.

#

but your config is saying 'make the emulated VGA device use the qxl paravirtualized driver'

#

shrug

muted sandal
#

well

muted sandal
#

@unreal totem @harsh owl thanks for your help

unreal totem
#

How did you get it to work?

muted sandal
#

well

#

there was 2 libs not installed properly

unreal totem
#

Ok, nice that you got it 🙂

main olive
#

uBuntu KVM Terminal ?

muted sandal
#

nope

#

it's

#

an OS we're building

main olive
#

hows it called ?

muted sandal
#

no names yet 😄

main olive
#

awwwww

muted sandal
#

if you wanna learn how to build

main olive
#

nah thx

#

im working on mod menus for GTA 5

muted sandal
muted sandal
main olive
#

thx

daring trench
#

does anyone know how to loop through oracle sql results from a database in a linux shell? i need to get the required outputs in such a way that i can perform operations on each row 🤔

main olive
#

SELECT * FROM ...?

daring trench
#

No, after saving the selected queries on a file or something...😐🤔

unreal totem
#

Something like this?
while read l; do echo "Line: $l"; done <<< $(cat file )

daring trench
#

👁️ I will try this out, ty

untold abyss
harsh owl
#

BATMAN_: glad it's working, i got into the manhattans and passed out at some point last night lol

main olive
#

if I have an arg --foo that is required in argparse, I want to have arg --bar default to --foo's arg, is this possible?

#

or should I be using click or some other argparse lib that is more flexible

robust cave
main olive
#

yeah that's what I'm doing now

robust cave
main olive
#

was just wondering if there was a less manual way

robust cave
main olive
#

fair enough, thank you!

winter trail
#

btw

#

i

#

use

#

arch

#

ugh

elder sand
#

Hello everyone, I have a custom build yocto image here that I am using to deploy to an FPGA board. I am trying to run a python script on my image to be able to record devices for a project. Unfortunately I haven't been able to run this script after deploying to the board. There is some driver in the linux kernel(SDHCI) that is causing a bug and preventing the script from running. I have looked up this issue online and found out that I have to suppress these error logs somehow but I am not sure how? Here is the error message after I run my script. I would really appreciate some help on this as I have been stuck on this for a while. Ty!

#

I have also tried disabling that particular driver in the kernel but the problem still keeps persisting

thick drift
# elder sand I have also tried disabling that particular driver in the kernel but the problem...

Is the sd card the only storage you have on the system? Do you have lspci, lsusb, or dmidecode available to you? If so, you may be able to apply a quirk to the kernel command line. Otherwise, you can try blacklisting the sdhci module to see if that helps. I haven't done yocto before, but if you can interrupt the bootloader, you can apply quirks and blacklist or load modules at boot time to test things

#

Does anyone work with ansible much here? For $day_job, we use ansible to manage a pretty wide assortment of RHEL stuff. We use two or three different ansible versions with rhel 7 and 8 and python 3.6 and 3.8. We currently use virtualenvwrapper because some of our users are not super savvy with virtual envs. To me, it looks like the virtualenvwrapper projects is not very active. I've written some ansible and shell script stuff to replace some of the virtualenvwrapper functionality that we use. Is anyone else in the same boat? multiple Venvs for ansible? How are you managing the virtual env?

burnt flax
#

did my sd card just corrupt?

#
Message from syslogd @ raspserver at Mar 15 10:45:25 ...
 kernel:[52470.826529] EXT4-fs (mmcblk0p9): failed to convert unwritten extents to written extents -- potential data loss!  (inode 371, error -30)
W: Problem unlinking the file /var/cache/apt/archives/libtiff5_4.1.0+git191117-2~deb10u2_armhf.deb - Keep-Downloaded-Packages=false (30: Read-only file system)
fresh saddle
#

It sounds pretty bad

kindred basin
#

Reboot to a live iso of some sort, and try fsck'ing it

main olive
#

It remounted in read-only, that means something went horribly wrong

warped nimbus
#

That's the reason I got an SSD for mine. I also noticed issues while trying to run updates.

main olive
burnt flax
#

@kindred basin @warped nimbus so I manually pulled the power and it seems to work now

#

but I have an extra sd card, should I switch sd cards to the new one?

warped nimbus
#

Depends on the size you need. Small ones are pretty cheap these days. I got a 120 GB one for like $25

burnt flax
#

what company?

warped nimbus
#

The SATA to USB3 cable cost me around $10 too

#

Kingston. I can send you the model numbers if you're interested

burnt flax
#

ye sure

warped nimbus
#

Kingston SA400S37/120G is the SSD. StarTech USB3S2SAT3CB is the cable. You need to be mindful of which cable you get since some don't work very well or at all. This one is known to work. However, I should note that my cable went bad after about 1.5 years of use. Thankfully it was under warranty so I got a free replacement. A bit disappointing though since this was supposedly one of the best cables to get. See this article for more details on products https://jamesachambers.com/new-raspberry-pi-4-bootloader-usb-network-boot-guide/

The new Raspberry Pi 4 bootloader has finally come out of beta and made it’s way into the official latest Raspbian! This guide will show how to configure it.

burnt flax
#

ah okay

#

👀 a blue raspberry pi smh

thorn thunder
#

Has someone knowledge why my Kubuntu just now installed the package "python-is-python2" automatically? Didn have it before and changed nothing. Just a sudo apt upgrade like evry now and then.
I looked the package up and there where no recent updates on the package itself... afaik.

silent stag
#

i need help fellow nerds. I am trying to setup an rsync script, but i need to type a password every time ```bash
#!/bin/bash

rsync -au ~/Desktop/public_html user@domain.tld:/home/user

I cannot use ssh key pairs.
Remote server will not run the rsync daemon, (--password-file method doesn't work)
I don't care about security, so don't concern yourself with it in a possible solution.
warped nimbus
#

I've ran into something similar when sftp for automated deployments

#

I found a utility called sshpass. It may fit the bill for you too.

silent stag
#

is sshpass needed for the receiving server?

#

or is it client only?

warped nimbus
#

It's for the client.

#

It enables you to automatically enter a password in interactive mode (i.e. when something is waiting for you to type it manually)

harsh owl
#

+1 for sshpass - tho as this is the python discord you could use a python script with something like paramiko

silent stag
#

im all ears on how to convert this to python

warm prawn
#

i think

spice delta
solemn valve
thorn thunder
#

It will not cause anything because i kicked the death shit out. Was just a symlink.
Thanks for answering anyway.

opaque ginkgo
#

just because it works doesn't mean its a good idea

jade ermine
summer trail
#

Do you mean to say that IronPython isn't a good idea?

bold nymph
#

how to connect wlan0?????????

main olive
molten venture
vapid quarry
#

Where's the win+v command history in linux?

wanton token
#

@vapid quarry do you mean in a terminal? ctrl-r normally let's you search through your history.

vapid quarry
rugged swift
#

On GNOME, you can get a shell extension named "Clipboard Indicator". On KDE, it has clipboard management already.

nimble panther
#

which distro and DE do you use?

vapid quarry
#

Any good solutions?

nimble panther
#

@vapid quarry Looks like Zorin uses GNOME, just like vanilla Ubuntu.

On GNOME, you can get a shell extension named "Clipboard Indicator"
try this

#

check out Glipper- it's similar to "klipper" in KDE

fleet scroll
#

is there a way to dockerize google earth pro?

amber garnet
#

I suppose yes

fleet scroll
#

I could use some help

#

@amber garnet

#

how do you launch it inside a container

#

i am new to docker so bear me
I installed the .deb package inside a container using wget. How do you launch it? Or is there some other way to go about it?

delicate fox
#

How can I start a python script using screen?
I already tried
screen -S test 'python test.py' -> File not found
screen -S test -X 'python test.py' -> No screen session found

amber garnet
wooden tiger
#

anyone have experiance w asterisk?

#

i'm stuck on extensions.conf and idk how to fix it

real swan
#

hey guys

#

can you tell me what is debian?

#

any thoughts or suggestions about in which group i have to message

sudden mirage
sick marsh
#

How do I pip freeze to a file in Linux? (Manjaro KDE if relevant)

nimble panther