#unix
1 messages · Page 50 of 1
I believe it is the same as Linux, since they are both posix compliant
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?
This is a weird implementation tbh
You should get an handle to the virtual console and clear it instead
so how to do this?? im a beginner still learning python
Hmm I'd use a library for that
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!
not sure if handles and low-level stuff is the correct start place for beginners. But if he or she wants to do it properly, getting handle is the correct way.
On linux that would be the termios lib or ctypes.windll.kernel32 on Windows to get the console handle with GetConsoleWindow()
on linux cant you just print an ansi escape
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.
Hello, is there a way to send a process to background after a certain time
I love that you can grep emoji
never gets me a job anyways, might as well name it that
What do you mean "send a process to background"?
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
Can you give more details?
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
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
client.connect(('198,168.1.1', 55555))
Same here
yeah sory i just swiched it so i didnt have my public ip up there
Right
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?
What do you mean by "crashes"? Have you got Python exception?
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
isn't it better to write os.name in ["nt", "win", "dos"] and os.name in ["unix", "mac", "osx", "linux", "bsd", "posix"]
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.
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
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?
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
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
Is there any way to name the tabs in my terminal?
tmux?
which terminal
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.
@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
seen in the docs https://docs.python.org/3/library/os.html#os.scandir
Open directory and iterate contents example
I am Running a python script to run download commands using shell script and subprocess
import subprocess
script = download.sh
log = open(logfile.txt,"a")
subprocess.run(script,shell=True,
i usually set the stdout and stderr to subprocess.DEVNULL
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?
@fallow narwhal this is unix not windows, duh
eh the same thing applies to linux with .sh files
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.
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?
@nimble gale open a second shell and send kill to the process?
nope. answer apparently is to use sys.exit(), only thing that works in my case. 🙂
anyone familiar with numpy?
When accessing a numpy array, and you pass [-1] what does this actually do?
$pnt (hi)
Okay, I got things all sorted out, thanks all. 🙂
guys does someone know how to run multiple ssh commands with paramiko?
Can somebody tell me what unix is?
It is a family of operating systems
The most known Unix implementation is Linux RT, and its derivates
?????
any question?
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?
Do you have a typo? I can’t find fg_kasrl on google
^^
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
oh , I was wondering if its possible to detect fg kaslr during runtime with some command
It usually set a capability, so you should be able to check for that
oh is it?
Patches usually do, but it is by no mean required
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
If grep CONFIG_FG_KASLR= /boot/config-$(uname -r) returns something, it should be enabled
oh thanks alot!
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
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..
You should symlink your main file to /usr/bin
no symlink to /usr/local/bin
/usr/bin is for system stuff
/usr/local/bin is for your stuff
@eager quail
😦

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'')
@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.
Yeah. I just thought I'd share the tidbit I discovered that python's platform builtin module addresses this need
are you french
or using a keyboard layout with accents
I added US international kbd layout
It messes up quotes
I should try again with that turned off
@sharp perch with French Azerty the backticks are on ALT GR + é
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
Yeah, that was it. To post code i’ll need to switch out of US international
@sharp perch you can do ` + space to get only 1 backtick
Oh! Thanks!
Is anyone used Linux?
Yep, what's up?
What's your operating system?
What is the question? I am using Ubuntu
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
Hello to the world of penguins
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?
Are you using Linux as a host system or inside VM?
What do u mean?
I have several virtual machines (VM) under VirtualBox
I used VMWare too and sometimes drivers for VMs are buggy
20.04
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?
Good point
Setting
Even I am trying to open the setting using terminal ( gnome-control-center).....
But it's not worked
Have you seen this question? https://stackoverflow.com/questions/56626950/cannot-open-settings-on-19-04
There is an answer marked as solution
I already used this command
In spite of my setting is not opened....
I don't understand that where is the problem actually....
What about logs? Is there something useful?
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
It's hard to say for me what can be wrong with your OS
Anyway thanks a ton!
R u student?
Nope, I was
Your welcome
Good morning here!
Oo
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?
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?
You can add shebang like #!/usr/bin/env python3 in first line of your script, update chmod with +x and then you can use your script like ./script
All required packages you can write in requirements.txt or setup.cfg - then pip install . installs your package with all requirement libraries
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
wsl is linux and linux is a "unix or unix-like system" so i'd say you're good
anybody know if python 3.9.1 will be supported for ubuntu linux
hirsute already has it
@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
@obsidian portal yes
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?
Looks like it could be repo used an incompatible python version @sweet relic what repo and python versions are they?
@inland gulch repo version v1.12.16,
python 2.7
python 3.6
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
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
wait hirsute is released
i need to get an update
ok thx
@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
#!/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
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
are are the event files in /dev/input?
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)
I could probably modify an existing "official" package and make a new source package in a few days.
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?
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
oh ok. How would I set the adequate permissions for nginx?
0755 (-rwxr-xr-x) should be the permission set for PHP and CGI scripts
so chmod 775 filename?
Yeah, give it a try
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
Php timeout maybe a problem. Also check your code under .htaccess
For any logical errors
Ah pardon me, you said you're doing an nginx project. . htaccess is not supported in nginx
oh ok
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
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
where are the paths specified? In the html templates?
Yes
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
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
Well, you shouldn’t try to run i386 executables on x86
what should I be doing then? I have this jar file which throws the error while opening
Try asking in a Java forum or server.
$ 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
solved it, I used java -jar <jar file name>
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
Hi! Can somebody help me? I want to run an exe with mingw32 on linux x86-64 how I can recompile it?
you can't without the source code
i have the source the
It's not my code https://github.com/PascalPons/connect4. I modified the main file a little bit.
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
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?
@granite aspen you probably just need to boot into a windows iso and install it?
That should get the job done
is that something one can put on a flash drive or does it still exist somewhere in the bowels of my machine?
random question: why is visual studio code so ugly (like the text) on linux but then looks nice on windows
Same way you installed Linux
You flash the iso to a usb to create a bootable device
I assume there's going to be some money or licensing involved?
Not really?
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
@cursive holly might not have the right font installed?
any recommended font?
@cursive holly default on windows is Consolas
linux has droid sans mono as default https://github.com/microsoft/vscode/blob/main/src/vs/editor/common/config/editorOptions.ts#L3680
ah ty
unix is nice!
@azure jacinth got your voice verification yet? 😄
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
might be caused by EINTR or something... I guess I have to loop my call to .join()
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
get x scoped
Looks like that ppa is broken
That should work, maybe try without the line break
Okay, there’s no line break
You should try with an auth header then
@silent stag not {}
$(cat ~/TOKEN.txt)
or just $(< ~/TOKEN.txt)
if the newline messes it up do $(echo -n "$(< ~/TOKEN.txt)")
i think what was messing me up was the fact that i am useing powershell
Hi, anyone using i3 and i3 status bar? The battery status on my macbook behave weird
@burnt flax 120GB is pretty small - Also this is more of an off-topic question
I use i3 and polybar. imo the default i3 bar (if that is the one you are referring to, i.e. the one at the bottom) isn't very capable. What do you mean by "behave weird?"
https://bugs.archlinux.org/task/69563 (╯°□°)╯︵ ┻━┻
Flyspray, a Bug Tracking System written in PHP.
Hi
I downloaded Xubuntu
and I have 16 GB flash
How to install xubuntu in this parttion ?
sorry if I make anything wrong
@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
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
try (echo canary; cat) | python -i getstdin.py
b/c currently stdin is closed when echo finishes
echo will append a newline at the end, unless you use the -n flag. Try with echo -n canary.
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
What do you mean by "access the hard drive?"
Also, does anyone have a recent guide on how to setup a aarch64 vm with qemu and preferably libvirt
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
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)
do tty in the other terminal
then redirect output to the file that it shows
eg > /dev/pts/1
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
@fallow totem https://stackoverflow.com/questions/21772271/unicodedecodeerror-when-performing-os-walk might help
What are linux-headers?
anyone use virtual machines? I genuinely don't understand the point behind these settings
Like why does version matter, what is the point
Presets, probably.
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.
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
!!!
...?
Post the contents of the makefile
Its looking in the wrong directory for some reason
Makefile does not have containers.
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$
Guys
how do I turn a Python File to An App in MacOS Catalina
pyinstaller --onefile -w "filename.py"``` Dosent seem to work
Yes I installed it thanks
guest additions cd is my guess
The guest additions CD contains everything though
Does anyone know winsound module equivalent for Linux?
For Linux audio look at ALSA, pulse or jack audio packages if winsound is what i guess it is
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
Does anyone here use WSL?
Yes
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?
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
Hi, short question → where to announce a new python library?
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.
get an external drive and mess around with that so you don't f up the internal drive.
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.
@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?
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.
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
What hardware? Optimus? What did you do that broke it?
True
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
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
If possible use pop os by system 76
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
you can make it persistent to the usb or to an external hardisk
but it will not solve the graphical issues you are facing, it's just a back up
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
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
my idea was @granite aspen would boot seperately, and then mess around on that to figure out how to fix it, then do it on the real drive
I could also make a VM of the same operating system?
but idk if that will let me touch the gpu
that's why I would use a seperate drive
idk what that means. separate drive?
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
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)
Virtual Machines don't virtualize hardware?
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
@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
I think reinstallation is faster
Just boot from live usb copy your data and do a fresh install
@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 :)
anyone here use debian?
StevenTalking: i have for many years, currently ubuntu 20.04 and archlinux for the most part
Yes
ok
yeah python3 filename should work
ok so where did you save the file?
so try cd Desktop/ when you first open the terminal
ok
and then python3 filename
hm
i dont know whyyy
i dont know how to work in command line
ok try ls to list out all the folders from the main folder, which you start out on when you first open the terminal
do them in separate commands
?
how to run it
np :)
wdym
"what do you mean"
a ok
Use cd ~/Desktop and then run the file with python3 filename
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?
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
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
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
how would one diagnose Chromiun constantly getting sigtraps?
how to run bigger programs in linux lite
i docd Desktop/ filename.py
for smaller programs
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
linux lite?
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? 
Sure!
heyyy, try asking in #databases 
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
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
grub install error failed to get canonical path of liveOS_rootfs
facing to this while installing grub in void live
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
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
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
Blitzer: what version of vim? theres also a python-ide channel
Blitzer: i recreated your scenario with that config - that didnt load ale properly. the official instructions seem to work fine; https://github.com/dense-analysis/ale#standard-installation
@harsh owl, Thanks! I must be missing something when installing this package, I am using vim 8, here is the output of vim --version :
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
ha, cant say ive ever tried that. if its working i guess its not a bad idea? ;)
Hmmmmmmmm
I guess they may conflict at some point
But it should be fairly okay, I’d say
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 🙂 )
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'.
Try it
$ find . -name 'schema.graphl' -exec cat \{\} \+ > newfile
i'm trying to get access to the root folder in uBuntu :
sudo nautilus /root
but the terminal always crashes
Which version of Ubuntu do you have? Have you tried nautilius $HOME? What then?
i did btw i can't tell the version rn, it's a VM and i'm too lazy to launch VMware rn
So I am too lazy to help
$ cat /etc/*-release
yh thx ur golden
ok
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
. means current directory, .. means directory above and ... is the name of a directory
... is definitely suspicious
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
Boot from an USB stick and change it back
Manually editing /etc/passwd sounds like a really bad idea
@main olive do you have any experience with linux?
I'd recommend manjaro or arch then 
Um isnt manjaro an easy variant of arch?
Whats your reason from switching from ubuntu in the first place? Just testing something else?
Manjaro is supposed to be an easier version of arch, yes
manjaro looks hard to install so ima take arch
gr8 b8 m8
@main olive
uBuntu got old for me
You can install arch easily with archfi
https://github.com/MatMoul/archfi
Ik
You just need to disable that annoying motherboard beeping thing manually
Ik
isnt the main benefit of arch is its installation process
how different is it from say ubuntu
without the detailed installation
i stopped distro hopping a while ago so would love to know
With the archfi you have plenty of choices too
However it is not as free as normal installation
very related to unix thanks
and isnt it like 1500 usd
you can buy cheaper from scalpers on ebay
.,
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?
I started with Ubuntu and it is quite easy
would you recommend it?
Debian and Ubuntu are both good for starters
In my opinion Debian is worse option because you need to put more effort to install proprietary software
Definitely however I don't have experience with other distributions
I have tried Ubuntu, Debian and Fedora so I am a kind of amateur
Ubuntu via WSL2
Oh, right. It can be nice introduction
sorry, I'm a complete newbie to this, what does WSL2 mean?
Windows subsystem for linux
oh, thanks!
You have videos there so check them out
okay
It's all ready to enable in latest win10 releases
Windows store allows you to choose distro. It's all Linux cli
so WSL2 basically allows me to use Linux on windows?
But you can integrate VS Code with WSL or call explorer.exe path/to/directory to open specified location using Windows Explorer
Yep that's the beauty
VS code will hook to the WSL2 install
Is ubuntu good for students tho?
Ubuntu has great support yeh
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
WSL2 is sitting inside windows so no pain.
is it like having a virtual machine?
More tightly integrated than a VM
does it take a lot of storage or ram or something?
Nope Microsoft have done a good job with this keeping resources down more efficient than VM
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
WSL is just a terminal
Like I said it's not ubuntu GUI if you want that then VM or dual boot
You still keep your Windows and call Ubuntu like a normal application
oh well
Just check videos at https://aka.ms/wsl
alright, thanks
Microsoft done good job with WSL and this page
I might check it out, I really appreciate your help! Thank you!
Good luck!
Yeh it's painless if it doesn't work out you can remove it and look at other options
Alright, thanks a lot!
But that's like installing Gentoo with bin packages only
Does anyone know how to install kali linux and ubuntu dual boot uefi?
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
Can you paste whole error?
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
Are you sure that you installed module inside venv?
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
👍
@granite aspen did you come up with an idea to fix your monitor or w/e the issue was?
Not yet
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.
What you can do is defined a function: ```sh
execute() {
python script1.py
python script2.py
}
and then when you source it, the `execute` command will become available in your current shell session. Then you just enter `execute` and it will run your function.
Thanks mark!
Why is this not working?
Exporting passwords is a bad idea
yeap, also leaving them in bash history
what do for an environment variable then?
i need it for os.environ
Hash it at the very least
But that would require you to enter a password anyway, so back at square one
Just call MariaDB or use a SQL API
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
Storing unencrypted or unhashed passwords is bad practice
it's an environment variable, it doesn't really matter
but anyways @prime magnet's answer fixed it
Naturally
I've decided to wipe my old Ubuntu server as card and try and set up a desktop or something from raspbian lite
Kali isn't a good choice of Linux distro, unless you're a pentester.
can anyone guess the problem with ubuntu freezing up sometimes (idt its thermals) and not responding to keyboard including SysRq
it happens randomly
Do you have any errors in syslog?
Struggling myself a bit at the moment :/ But whats your Problem?
omg
Don't think i can help there, sorry
/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
well i don't think so
i have installed libpam
i think the xauth is in the linux -pam
linux pam works fine
As i said, i know nothing about lfs
there's xauth that's what fricked me out
you want to know ?
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
Ok, on the page i postet there is a package xauth-1.1.tar.bz2
yeah i'm installing that
So it doesnt seem to be in libpam
Yea it stands for plugable authentication module, this is pretty much all i know 😛
What happened?
well lemme enter the command startx
Fingers crossed
Thats unfortunate
What is in he log?
no screens found :/
well
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
screen indeed has nothing to do with xorg, x11 or wayland.
Your problem seems to be more on the driver site at the moment
What does lspci | grep vga give you
damn i did shutdown it well wait a second
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?
actually i'm insatlling xorg into my Linuxfromscratch build
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?
It's a Qemu/kvm box i learned
ahh, yeah, that changes things.
yeah
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:
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 ?
damn
if you see any processes running, x has already started
you can use the pastebin for text output, https://paste.pythondiscord.com
yeah did that now what ?
you just click the save button on the left, then copy/paste the url into here
er save button the right
looks like a floppy disk
okay so what its saying is that it didnt detect a monitor. which makes sense if its a vm.
oh damn
[ 767.179] (==) No monitor specified for screen "Default Screen Section".
now what 🤔
here's somethin similiar
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?
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
just lspci would work too, no need for -v if too much output.
huh, that's a new one for me. what is the goal of this assignment?
well
how 'bout sudo dmesg | grep -i vga ?
didn't show any
actully this is in qemu
but i have used qemu-nbd
and loaded it in the chroot env
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 ?
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
well
https://wiki.gentoo.org/wiki/QEMU/Options is a good link on the subject, albeit for a different distro
well different yeah
did you poke around with this? http://www.linuxfromscratch.org/blfs/view/svn/postlfs/qemu.html
that's for the build having qemu
Just a question, would it be reasonable to convert the qemu/kvm box to virtualbox?
There you get a pci graphics card
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
so what you guys are meaning ?
You could try it, if you aren't forced to use qemu
I would give it a try. Install virtualbox and try to convert the image
well yeah wait a sec
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.
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
what is the output of ps faux | grep -i xorg ?
okay so xorg is not started in the vm. and we see your emulated vga device
what is in /etc/X11/xorg.conf.d ? anything? or anything /etc/X11/xorg.conf ?
actually
cd into xorg.conf.d and ls
okay in this doc - http://www.linuxfromscratch.org/blfs/view/svn/postlfs/qemu.html
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
well
How did you get it to work?
Ok, nice that you got it 🙂
uBuntu KVM Terminal ?
hows it called ?
no names yet 😄
awwwww
if you wanna learn how to build
awesome
thx
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 🤔
SELECT * FROM ...?
No, after saving the selected queries on a file or something...😐🤔
Something like this?
while read l; do echo "Line: $l"; done <<< $(cat file )
👁️ I will try this out, ty
idts
BATMAN_: glad it's working, i got into the manhattans and passed out at some point last night lol
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
I'd use the regular default of None for --bar, then set it to --foo's argument in code.
if args.bar is None:
args.bar = args.foo
yeah that's what I'm doing now
That is up to you, it's personal preference mainly
was just wondering if there was a less manual way
not as far as I can tell, no
fair enough, thank you!
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
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?
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)
It sounds pretty bad
Reboot to a live iso of some sort, and try fsck'ing it
It remounted in read-only, that means something went horribly wrong
That's the reason I got an SSD for mine. I also noticed issues while trying to run updates.
Uh, that's bad
@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?
how much would an ssd cost?
Depends on the size you need. Small ones are pretty cheap these days. I got a 120 GB one for like $25
what company?
The SATA to USB3 cable cost me around $10 too
Kingston. I can send you the model numbers if you're interested
ye sure
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/
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.
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.
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.
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)
+1 for sshpass - tho as this is the python discord you could use a python script with something like paramiko
im all ears on how to convert this to python

to make upgrading the default in Ubuntu a big time sink for to fix an issue that isn't an issue yet. The long support cycle for Python 2.7 means things should just work for at least another five years.
Until then, it's not causing conflicts or problems so let it lie. It's just another dependency
It will not cause anything because i kicked the death shit out. Was just a symlink.
Thanks for answering anyway.
py2 is EOL, but ok
just because it works doesn't mean its a good idea
did u say IronPython lol
Do you mean to say that IronPython isn't a good idea?
how to connect wlan0?????????
wpa_supplicant -B -i wlo1 -c <($SSID $PASSWORD) && dhclient wlo1
Where's the win+v command history in linux?
@vapid quarry do you mean in a terminal? ctrl-r normally let's you search through your history.
clipboard history. It's a necessary function thats surprisingly missing...
On GNOME, you can get a shell extension named "Clipboard Indicator". On KDE, it has clipboard management already.
it depends on your DE
which distro and DE do you use?
Zorin Lite and Zorin, so basically Ubuntu under the hood
Any good solutions?
@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
is there a way to dockerize google earth pro?
I suppose yes
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?
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
If you are not familiar with Docker you should start with something simpler
anyone have experiance w asterisk?
i'm stuck on extensions.conf and idk how to fix it
hey guys
can you tell me what is debian?
any thoughts or suggestions about in which group i have to message
Debian is a Linux distribution
How do I pip freeze to a file in Linux? (Manjaro KDE if relevant)
The same way you'd do it in windows