#unix
1 messages · Page 23 of 1
You can try newer or more light-weight kernels too
seems like it loads a lot of services.. it makes sense it takes so long
is this your physical machine or from a vendor
it's my machine but I connect remotely
why is this called #unix ? Don't most people use Linux? Linux was inspired by Unix, but they aren't the same software, so what gives here? I don't see a #linux
is the server owner confused??
Unix refers to all "Unix like" systems as well
Unix includes Linux kind of and macOS
Unix (/ˈjuːnɪks/; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, development starting in the 1970s at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and others.[3]
heh
i have 2 schoolkids sitting next to me at work with a raspberry with raspbian
i gave them the task to set a random wallpaper
showed them the archlinux wiki, told them about feh and openbox
and they are down the rabbithole
i'm seeing them looking at the conky page
man'ing it up
lol
why does sort not work properly on this text file?
475.66
0 20 1 6 13 7 8 19 21 22 5 17 11 16 10 28 4 25 9 23 18 3 24 14 29 26 2 27 15 12
after running sort with -o and -g
i get
0 20 1 6 13 7 8 19 21 22 5 17 11 16 10 28 4 25 9 23 18 3 24 14 29 26 2 27 15 12
475.66
i would expect the first line to be sorted too
How are you sorting it?
If you're just sorting the lines, then it won't try to sort within the lines itself
The lines will be compared on lexicographical order as well, not the numeric values, since they're probably strings
Oh, you're not using Python to sort the files
Will that not just sort the lines of the file? Not the text within a line? I'm not on linux right now, so i can't check myself
yeah it sorts only the lines
but i want to sort the text within a line too
i think it detects if there are newlines and sorts by lines
i think if there are no newlines then it sorts whitespace delimited
if there are no newlines it's just one line
i only want to sort lines
i want to sort data within the lines
is there a way to do this with sort?
you could use sed, awk, or tr, to break it into lines, sort, then rejoin the lines
if you also want more than one line, you have a bigger problem though
yeah I want more than one line :\
do you want the lines sorted too, or just each line sorted separately
just each line sorted separately
i mean if i want the lines sorted i could rerun sort like i do now
sorting each line is more critical
anyway it'd probably be easiest to write a python script - sort is good for large datasets, but not flexible enough to do what you're trying to do
(and if your dataset fits on one line it's probably not that large - you can do this one line at a time if the file is large)
Is there a .jar file that could install python
why jar, of all things? 
jar is a java archive. Python is its own language, and the standard interpreter is written in C mainly (CPython).
There is Jython, a Python interpreter implementation in Java, but that project is basically dead, I believe.
any mac users know how to use pyinstaller on mac, please ping me!
whats the equivalent of touch in python
p = pathlib.Path("...") ; p.touch() maybe?
@deft raft Do you have wpa_supplicant installed
Idk
First time using anything linux like properly besides rasbian, and its a fresh install without internet
Like open a terminal and run wpa_supplicant --help
That differs slightly per school aswell it seems.
oh hm
Mm
Not to long ago I was at one that required you to install a cert aswell.
I read their wiki, claims i should not need a cert
Okay so looks like you need to make a file in /etc/wpa_supplicant with
network={
ssid="eduroam"
scan_ssid=1
key_mgmt=WPA-EAP
eap=TTLS
anonymous_identity="anonymous@ox.ac.uk"
# adjust the following CA line as required to match your filename
ca_cert="/etc/ssl/certs/AddTrust_External_Root.pem"
phase2="auth=MSCHAPV2"
# in the following line, replace <username> with your University Remote Access account username, without angle brackets
# Remote access account is described at http://www.oucs.ox.ac.uk/network/remote/
# (not your SSO). Append @OX.AC.UK after your username so
# that eduroam knowns the authentication home site
identity="<username>@ox.ac.uk"
# in the following line, replace <password> with your University Remote Access account password, without angle brackets
password="<password>"
}
But for my uni then.
yeah with the <things> edited
Then find out what your wifi device is called with ip link list, it'll usually be something like wlan0 or wlp2s0
What text editors ship with majaro
What version did you get?
Some weird mix of 4 letters
xfce
Yes
Mousepad iirc
Thats a texteditor?
leafpad is probably installed
Do you have root?
Probably?
Start it with sudo leafpad if you're in the terminal
sudo nano would probably be easier since you're going to need to run commands in the terminal anyway
Got that part going
I ran wpasup like they instructed. But missing driver madwifi
Or actually, ath0: unsupported driver madwifi
Gotta do the famous phoneshot to share 🙄
Oh hey its me
okay
Starting with the linux kernel 2.6.14, madwifi and wpa_supplicant can communicate using
wpa_supplicant's ”wext” driver using the kernel's “wireless extensions”.
For older kernel versions, you will need wpa_supplicant's ”madwifi” driver```
That's really old
What do you get when running sudo wpa_supplicant -B -i wlo1 -c /etc/wpa_supplicant/that_file_you_made
WLO1 lowercase
Is there already another wpa_supplicant process running?
How do i check
sudo killall wpa_supplicant
It successfully ran
But now there are no available wifis to connect to
Device not ready it says
Also what does systemctl list-unit-files --type=service | grep NetworkManager give you
I don't know what it is eduroam does. But at most schools it seems to be a problem with unix systems.
ah
hmmm, I'm not sure what manjaro uses for wifi
maybe someone more experienced with it will be able to help out
You could always usb tether your phone
do you not have wifi-menu?
I did have a gui for wifi
If thats the thing
Im on foot to my lecture atm so cant check
I'm back on a fresh install, cause .. I'm booting of a usb
My wifi is running a iwlwifi driver
from what I can tell
When i try to connect with my username/pass through the gui i get
Authentication required by Wi-Fi network
Passwords or encryption keys are required to access the Wi-Fi network "eduroam"
Eduroam? Our University networks are called that here. It's a shared auth thing with a lot of Universities participating
I always need to remember to log in with an alternative username [username]@institute.tld
you might be dealing with an 'enterprise' authentication system or like kerberos.
looks like some possible spec names are: WPA2 Enterprise, PEAP, RADIUS
if you can figure out which one they use, we can help figure out the settings/extra software needed for it @deft raft
Enterprise would make sense
as its what it defaulted to as well when i oped the wifi gui
http://kb.mit.edu/confluence/display/istcontrib/Ubuntu+Linux+-+How+to+connect+to+MIT+SECURE+wireless
MIT has some specific settings they use it looks like
I can't really try it until tomorrow either as i've gone home
so while i dont know anything about your school, you might need that info or we will have to see if there is a way to make it query it
Huh, did a google search to find the wiki i was on earlier
found this https://it.uib.no/en/Eduroam_for_Linux
Seems a bit more.. up to date?
found a bug report where out of date tls versions on their radius server make linux mad and you need a custom config file https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/1104476
their symptom was that it kept asking for a password
and they talk about eduroam specifically
but does it apply to manjaro '?
Also this was reported in 2013 
yeah i think its that linux by default refuses to connect to an older tls version without explicit permission
either via a trusted cert or a config setting
i cant for the life of me figure out how to get mysqlclient to install on ubuntu for python3
https://github.com/PyMySQL/mysqlclient-python#install
i have python3-dev and default-libmysqlclient-dev but running a python shell and importing MySQLdb gives me an error saying that the module couldnt be found
@fervent vortex doesn't pip have it
yeah but i was looking to install it system wide
it would be more convenient to manage for me
what does sigterm do.. and where is it from
SIGTERM stands for Signal Termination, it's a Signal sent by the system to a process or a bunch of processes to request it's Termination. It can be caught by the process itself, so the process can do custom functions (save state, free resources) before exiting nicely
does that answer your question? @main olive
sorry for the late reply.. my mac locked out my keyboard lol
I understand this much.. trying to figure out why my python env is being killed..
are you doing something memory intensive?
for the keyboard?
hmm I'm thinking it might be a network issue..
I launched a python env in my instance.. then ssh'd into it while it was still connected..
might need a bit more info because i really dont know what your situation is
i was thinking your program might have been using too much memory and it was reaped by the kernel
Hi, I have a question:
Device: ID 1d6b:0002 Linux Foundation 2.0 root hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0002 2.0 root hub
bcdDevice 4.15
iManufacturer 3 Linux 4.15.0-42-generic xhci-hcd
iProduct 2 xHCI Host Controller
is this usb 2.0 or 3.0?
I found informations that if there is xHCI that means USB 3.0, but bcdUSB says 2.0 and there is 2.0 root hub in device description
This is also information about this same device:
Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/12p, 480M
480M suggests that it is USB 2.0, but I can't check it, becouse it is USB type-c port
2.0 root hub USB 2.0
I thought type C had to be USB 3
That's a common misconception
So USB Type-C may or may not support:
USB PD 19V 5A charging
USB 2.0 speeds
USB 3.0/3.1 Gen 1/3.2 Gen 1 speeds
USB 3.1 Gen 2/USB 3.2 Gen 2 speeds
USB 3.2 2x2 speeds
Displayport
Thunderbolt 3
VirtualLink
Audio Adapter Accessory Mode
MHL
HDMI```
from buildapc discord
type c is a bit of a mess
USB is a mess
Naming schemes are stupid
Thunderbolt x looks like the next gen thing we should be switching to
Better then usb in every way
Hey guys.
Hello
can i not ssh tunnel onto a port which is already in use? i was able to do it for the rethinkdb UI but not on the coder VS Coder instance🤔
you can not bind to an already used port, i.e. if you use -L to listen on your localhost and forward requests through the tunnel to anything reachable from the server, your local port must not be used yet
but the remote port you forward requests to can of course be used already - it should even, otherwise nothing will respond
hi! i get this is a bit weird but does anyone know how to setup the tor proxy for all apps? ive tried torsocks but it wont open certain apps e.g discord?
im on ubuntu 18.04 LTS btw
What do flags do in a terminal command? (I've looked around for an answer I understand but cannot find it.)
flags are arguments passed to the command to alter/modify the output/usage of the command
Okay. Thanks @robust cave
@cedar matrix maybe you want whonix
if I have a multiline command
is there a way to echo from a text file..rather than typing line by line from the shell.. or using an editor from within shell
I like my external editor better
could write a bash script maybe
oki
woo it worked
what is the difference between echo $cmd and eval $cmd
like im trying to copy some files from a location
is there a way to restrict copying of only some filenames..
maybe I just use python hmm
copying of only some filenames? so glob?
yep.. that's what I did:)
wow.. I need to manage time better
taking forever between problems
well, echo is just what it sounds like, echoing some symbols
eval is evaluation the symbols
Okay, calm down. What's up with the aggression?
I wasjoking lol
Pointing guns, combined with flipping tables and angry faces is not okay
ono
wait a minute..
I put that table back..
who deleted it..
someone deleted the table i'm not crazy..
@main olive I don't know who deleted it, but going by your description, it was probably completely off-topic to this channel.
Hi guys I need some crontab help
I have a cronjob set up to run a python script on reboot. I used
ps -ef | grep python and got the following output
pi 443 438 0 18:32 ? 00:00:00 /usr/bin/python3.5 /home/pi/Desktop/stuff.py
pi 969 917 0 18:48 pts/2 00:00:00 grep --color=auto python
Can I assume that there is a single instance or is that 2 instances?
it seems the first entry is the parent of the 2nd entry
I'm just not sure if it's actual 2 parallel running scripts or a single one
the first one is the sh process, the second one is the python process
I don't know if it's a good place to ask here but I have two drives, one with linux and one that has windows. I am unable to access the rest of the drive via command line unless if I open up an application like nemo and click the drives and such
Is there a way to do this from command line
🖕 pwd
/media/ouji
🖕 ls
🖕
This is a sample output when I'm in the drive location
once I open nemo and click both drives I see:
🖕 58D2433BD2431C9E 9CB88C1CB88BF356
those being my drives
so this is because stuff like gnome or whatever desktop environment you have is mounting it for you when you access the drives via their gui
Should I be mounting them into a location or?
you can set up fstab to mount that drive on boot
Okay
i dont remember the syntax off the top of my head, but youll want to use partition type ntfs and set it to auto mount
i usually do something like /media/drivename eg /media/windows_c
linux always expects /media to have multiple sub directories that are each a different partition so its a good place to do it
Okay, then generally, what do people use the /mnt/ directory for?
This article seems to place the mounts in /mnt
Explained guide for mounting a (windows) partition or any other device using fstab in Ubuntu.
its for a single drive iirc , its for you to temp mount something as needed
so /mnt is for the sysadmin to do work on the computer or temp mount a cd or usb drive
its basically not used much
what package is fstab part of?
its a core part of linux in general. its in /etc/fstab
it has a special syntax but every init system should run something to parse it for you as needed
yea
Do I just add in the other drives?
Also, is there a safer way to edit fstab or are you just supposed to text editor it
Does this seem right?
UUID=9CB88C1CB88BF356 /media/WINDOWS_C_DRIVE/ ntfs
for formatting?
@grave jolt
you need the options too
eg
/dev/sda3 /media/windows ntfs defaults 0 0
you can just use /dev/sdaX?
though you can use UUID instead of a drive path
yea
uuid is more reliable
its the actual partition id and if your drive order changes it continues to work
the drive path fails if your drive order changes
well next you gotta make the system mount it
you can do mount /media/WINDOWS_C_DRIVE/ to test it
and if it works it should work on reboot
yeah you might need to specify what user has access to it once mounted, since windows partitions dont have the same user ids as your linux install
It refused to mount becuase window is hibernating
oh rip i remember that being annoying to clear
I probably just have to boot in and not restart when I want to get to linux but instead shut down
yea
Could that be it?
and make sure windows doesnt do some weird hybrid sleep thing instead of shutdown
psure it can choose to hibernate INSTEAD of shutting down depending on your settings
Got it working
nice
does python xlib play nice with other window managers?
i'm trying to make window decorations in xlib for i3
so i want to create a qt window that has butytons on spawn of a window
however, i get X protocol error: <class 'Xlib.error.BadAccess'>: code = 10, resource_id = 323, sequence_number = 15, major_opcode = 2, minor_opcode = 0
so idk
you might need ntfs-3g or whatever the package is called in order to write to ntfs on your distro
your distros documentation should have a bit more info about mounting ntfs
when I run sudo ntfsfix /dev/sda4 I see that windows is hibernated
Is there a setting or something that is making this difficult
my pc was off moments ago
I imagine that shouldn't made the windows shut down
got it
How would i permenantly disable the bios speaker from going doot doot every time i press backspace one too many times or search for something that doesn't exist.
sorry.
Is this everywhere or just specific applications/terminal?
Check if the system sound settings have anything regarding alert sounds that you can disable
If terminal, there might be a setting to disable the terminal bell in its configuration
Otherwise, you can e.g. blacklist the pcspkr kernel module if it is actually loaded
Actually, I can't seem to find any sounds?
Lemme confirm that rq
Not the case I do have sounds, and my computer nearly choked from opening youtube. So that was fun
It's not when i press backspace in discord, but appears if i cant find a match searching in firefox (ctrl + f) and when i backspace in the file search
I am also on Manjaro-xfce, can't find any rc.local file in /etc
don't make the rmmod script
blacklist it properly
$ grep -B2 pcspkr /etc/modprobe.d/blacklist.conf
# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr
Ubuntu has this in its modprobe configs
No such file
idk how arch exactly handles blacklisting
would # echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf work?
and yes, if that is a root shell it should work
nano
Oh~
this isn't vim ffs, quitting is trivial 
Yeah i figured, had a restart and it all works
👍
I'll gladly accept that title, if you insist.
Is it possible to change xterm's colours depending on processes running inside it?
urxvt can do that prob way easier but your shell is likely a good place to do it if you just want to change like the bg
cause xterm prob just sees the shell itself
but urxvt has indepth scripting
if your program sets the terminal title then it should be really easy with urxvt
Any idea why my keymap has ø and æ swapped?
Every other key seems correct, but those are switched compared to what's printed on my keyboards. (Norwegian)
Danish has them swapped like that
Check your keyboard layout settings
And check if your keyboards æ is to the right of your ø
It is, but they keyboard layout says NO-nn or something?
Is there a NO-nb?
Should be, I believe i have both on the machine
If anyone knows how to use Supervisor in Unix let me know
hello
is anyone who aware of debian/buntu preseed file, why to use it instead of basic shell script?
because its way easier to use the config file format designed for the installer than to try to figure out how to insert text in to an installer or hook in to its internal private methods
using the config file will be easier to maintain long term as the installer changes between releases
there are also standard tools and techniques for deploying the config file to make automated installs faster, eg pxeboot / custom cd images
its similar to using ansible/puppet etc over ssh + shell scripts, it gives you access to a stable environment and a widely supported ecosystem
Hey, so how would i use sudo to install a module with pip to the user directory?
Would sudo -H pip install -U pandas work?
no, just pip install --user pandas, no sudo
that you are running it as a module
ahh i see
@sullen lynx the repo is named bionic-pgdg, not 18.04-pgdg(http://apt.postgresql.org/pub/repos/apt/dists/bionic-pgdg/)
find the line that configures this repo in /etc/apt/sources.list or any file in /etc/apt/sources.list.d/ and change that part
@oak shell 👍🏻 that worked, thanks
you're welcome 😃
So I've been trying for hours now, with help from Mr.Hemlock, and he had to go, he pointed me here, so I'll summarise#
I am trying to get pip to install modules to python 3.7 but they're installing into python 3.5.3 and I'm on raspbian on a raspberry pi
so when you call python3.7 -m pip install <module> they actually are installed to 3.5.3?
or does only your python3 point to python3.5.3 and not your python3.7?
only what GunShip already suggested 🤷
Somebody help me
@gritty bobcat can you tell me the output of python3 -V and set?
Frick my life
Does anyone know why Raspberry pi's go into a logg in loop?
I type my password in and then I get a black screen and right back into the log in page
What OS are you using? Raspian?
Yeah
I'm not sure if it uses lightdm, I have to check
Raspbian from NOOBS
can you at least use <ctrl>-<shift>-<F1>?
Yeah could be a lightdm-gtk-greeter, screen
What does that mean exactly? :D
That it is possible that lightdm has a problem from time to time with it's xorgconf thingy
especially if it hasn't been run properly ( or killed )
What can I do to remedy it?
If you can't login, you need to have to use the terminal
There you should still be able to login
Right, how do I do that? :D
if you press the key combination from above, you should get a black terminal, if not please try to press all the at once (from F1 to F7)
and tell me if you get one
None worked ):
give me a second, maybe I have a raspian here somewhere
Everyone here is so nice ❤
ok it's booting now
you boot directly into the raspbian login screen, right?
@gritty bobcat and do you have anything important on the raspiberry (data wise)?
I mean
I could restart, but I've been trying to get discord.py working on it for hours, so I could do that
Pip just never seems to use 3.7, which is my original problem,
I'm trying to use it to run a discord bot
Ok, Imma reload NOOBS and get Raspbian on it again
I just say that because I often de-installed the UI and it may be easier to just do it once more if you really can't access not even a single terminal.
Ok, I'm copying it over
I was directed to this:
https://gist.github.com/SeppPenner/6a5a30ebc8f79936fa136c524417761d
Is this very good?
All I need is python 3.7 that has "requests", "MySQL Connector" and "discord.py" and I'll be all golden
Otherwise I have this script to potentially fix the lightdm problem
#!/bin/bash
# This "package (single-file)" will fix the problem, that you may be unable
# to login after the lightdm-gtk-greeter. This may be caused after a corrupt
# lightdm-close.
MESSAGE_PREFIX="INFO:";
ERROR_MESSAGE_PREFIX="ERROR:";
EXIT_MESSAGE="The script will close now...";
HOME_DIRECTORY=$(echo ~/);
echo "$MESSAGE_PREFIX Running fixit for no-stable-session-after-login";
TODAY=$(date);
echo "$MESSAGE_PREFIX Script execution takes place at $TODAY";
if [ -e "~/.Xauthority" ]; then
echo "$MESSAGE_PREFIX Found .Xauthority trying to rename";
else
echo "$ERROR_MESSAGE_PREFIX No .Xauthority found in user directory ($HOME_DIRECTORY).";
echo "$MESSAGE_PREFIX This fix needs the .Xauthority file to run";
echo "$EXIT_MESSAGE";
exit;
fi
DATE_STRING=$(date +%F);
if [ -e "$HOME_DIRECTORY.Xauthority.bak" ]; then
# overwrite by 'maximal' daily backup
mv "$HOME_DIRECTORY.Xauthority" "$HOME_DIRECTORY.Xauthroity.$DATE_STRING.bak";
fi
mv "$HOME_DIRECTORY.Xauthority" "$HOME_DIRECTORY.Xauthority.$DATE_STRING.bak";
echo "$EXIT_MESSAGE";
exit;
But pip isn't being friendly ):
So in a sec, I'll load up NOOBS and do I want Raspbian with recommended programs or just Raspbian?
I would just go with something very light, like raspbian without UI
It's very low usage so it's fine I think
Ok
It's almost done copying over to the SD
The terminal hotkeys should be working but the reinstall won't take too long either
ok, can you login this time?
It's just initialising, one second please :D
Ok, I'm just installing raspbian with NOOBS
@plain bramble We have Raspbian back up and running, do these look right for getting python 3.7?
sudo apt-get update -y
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
tar xf Python-3.7.0.tar.xz
cd Python-3.7.0
./configure
make -j 4
sudo make altinstall```
Ok, Python 3.7.0 @plain bramble
Now to install pip so that it installs the modules in 3.7 🤔
Don't you already have pip, again what is the output of the command I gave you. Call python3.7 -m pip list
Yeah, 10.0.1
So if I install modules using pip, will it apply them to 3.7?
@plain bramble Do I have to change anything about pip?
This is why I advise you to use python3.7 -m in almost every command I suggested. To make sure you install with the right pip version from the right python instance
Is that what -m does?
Your default pip (3.7) should be fine to let you install the modules you want
-m runs the arugment as a module
The steps you posted above for example don't make sure that the python version is the one that is always used when you enter python
I'm just following directions from Mr. Hemlock
So will pip3 install requests not be what I want? How do I do python3.7 -m with that? :D
Your pip3 may still point to 3.5.3 not 3.7 as python3.7 was installed but not set as the default
you can call pip3.7 directly if you want
if it's in your path of course
I'm not sure if we can do that without problems (as other packages of raspbian may expect an older version of pip or different target), though it's either where python3.7 and the result of that is to be entered in .bashrc, as alias python='<the result of that>' so you use python3 as default which is maybe what you want or echo "${PATH}:<and then the result of where pip3.7>" and export PATH; But there are other ways I can imagine too
Is there no way for me to just did it temporarily
Just to install 3 modules and then be done?
python3.7 -m pip <your pip command> is the same as pip3.7 <your pip command>
alias is temporary for the current shell session
so you could do alias pip3.7="$(where pip3.7)"
I think you will get the rest of the stuff without me having a raspi running
so I shutdown my raspi
@plain bramble Thanks so much for the help, everythings working amazingly :D
do you guys know what are these ^L things?
I'm trying to make a systemd file for starting my discord bot, but am encountering problems running pipenv (/usr/local/bin/python3.6: No module named virtualenv)
Terminal output here: https://hastebin.com/xupasujohi.rb
Any help on resolving this?
what i do is set the user to the one that created the environment, ensure the working directory is the directory you'd activate pipenv, and ensure you're executing pipenv itself
[Unit]
Description=Eevee
After=network.target
[Service]
User=scragly
Restart=always
Type=simple
WorkingDirectory=/home/scragly/Bots/Eevee
ExecStart=/usr/local/bin/pipenv run bot
[Install]
WantedBy=multi-user.target
@mortal fjord
O.o I'll try the WorkingDirectory option, seems useful
oh hey it's working!
Thanks!
no probs
Any suggestions for getting getting all the current mice?
https://github.com/Zer0897/linux-touchpad/blob/master/src/touchpad.py
I'm using xinput atm but I can't reliably tell which devices are the USB ones. It does have an event id to match in /dev/input, so now's as good a time as any to get familiar with it I guess.
what info do you need about them @somber stirrup ?
if you want to basically detect when a mouse or anything like that gets connected, you should probably learn about udev and make scripts for that
(other) things to look at might be the udevadm command, /sys/class/hidraw/hidraw*/device/uevent, /sys/class/input/mouse*/device/uevent, ...
https://www.kernel.org/doc/html/latest/admin-guide/sysfs-rules.html
https://linuxconfig.org/tutorial-on-how-to-write-basic-udev-rules-in-linux
https://askubuntu.com/q/670197/367990
does anyone know how sed works in bash?
@rose cairn I know a few things about it, what exactly do you need?
sed -i 's/\"\"/\"/g' file1.txt
sed -i 's/\"\"/\"/g' file2.txt```
if i these 2 commands at the same time
is there a possibility that one of the file is overwritten by contents of another cos sed -i makes temporary files with the same name?
why would it, you have two different input files there
@oak shell I had found udev but I didn't know about /sys/class/input/mouse*/device/ueven. Thanks!
@oak shell yes, but when i run both of them in parallel and if bot the input files are in the same folder, it overwrites
not always
but sometimes
i saw that the temporary file created by sed always had the same name
which makes me believe that this issue is being caused by that
hmm, dunno about that. That would surprise me tbh, but I haven't investigated that detail so far
I'd have assumed it uses something safe like mktemp...
I think I know the answer, but anyway to be able to run commands on my raspberry pi from my iPhone?
And also, I can Remote Desktop from my Windows 10 pc, but I can’t see any running apps and stuff, what do I have to change to get this?
if you get an ssh client for your iPhone you should be able to ssh into your raspberry pi
is this the right channel for asking about aliases in zsh?
whats up?
if it's relatively simple to answer, i might be able to help
@white solar
ok
let me paste a code i added in .zshrc
if you're sending whatever entry you put in the config, use a codeblock
pv() {
if [$1 == '-a']
then
source venv/bin/activate
elif [$1 == '-d']
then
blkdeactivate
elif [$1 == '-c']
then
python3 -m venv venv
elif [$1 == '']
then
echo 'Error : no arguments given'
fi
}
and i entered source .zshrc in terminal also to apply changes
this doesn't look like an alias 
it should work like a command since i was a bit tired with 3 different aliases
but whenever i type pv -a or pv it says it cannot find the commmand
first of all you'd have to give more information on what you are actually doing. That message alone holds near to no information without context.
how do i launch something as daemon? or background process when i ssh onto server? currently using & at end of command but not sure if that works once i exit
ok i think & works
Try & disown @queen lance
what does disown do?
you can also look at screen detach
thanks seems like & disown works
I'm running ubuntu and I want it to open a terminal on startup, is there a way to just turn that on, or can I write a program to do it? Etc lol
Lol I figured it out with the GUI it's a crutch
What are some good free resources to start learning Linux or more specifically Kali in general
honestly i started with youtube and a virtual machine
honest recommendation: start with a user-friendly distro like Ubuntu. Once you know your way around that and are familiar with administrating it through the command-line and know stuff like services, networking, etc, you can continue and look at what Kali offers.
It's a highly specialized distro with the only purpose of forensics, pentesting and such stuff. It is in no way meant to be run by newcomers, or as a daily desktop driver.
I mean, sure, you can install it and click a bit through some of the GUI tools without understanding anything and then go back disappointed. But that doesn't help you much.
Oh okay
I'm looking towards getting the OSCP so I thought I'd start with Kali but I can start with whatever as long as I learn the basics. Which version of Ubuntu do you recommend?
@oak shell
either 18.04 LTS for stable and long term support until 2023, or the latest is 19.04 which has support till next January.
which flavour is purely subjective and depends on which desktop you like better, or if you have an older/weaker computer, you might want to take a lighter one
if you can’t decide, there’s nothing wrong with going for the LTS version and sticking with that
I'm mad I was downloading the file and it disappeared from my queue randomly
i was halfway into installing ubuntu 18 onto a server, when the power went out
now the server wont send a signal to the monitor
dont even know if it still works
any1 know how to fix it?
@dull vigil please don't cross post questions across help channels.
If the monitor is not getting anything even on POST, such as the BIOS splash screen or boot status, then you may have hardware issues. Perhaps contact your local IT specialist to have a look at it.
its an old machine
from 2007 i believe
when i called they said they might not be able to help
it wasnt used for 12 years
but it existed for 12 years
Remove all power
Reset CMOS
Basically pop the case, look up the motherboard model, read the manual, and see how to reset it
Then try powering it on again
If you have a gpu laying around you could also try that
The default screen device might have gotten set to something that isn't active
And /or the internal gpu is dying
If it was working fine prior to a power outage, sure, it might be the BIOS settings... but old hardware misbehaving after a power outage often means something died. Old capacitors tend to go if there's unexpected power fluctuations. Somewhat helpfully, what often dies first in that case is the power supply, and that's relatively easy to swap out and try another one, so might want to start there.
That's assuming that you're not getting lights/fans. If you are, could be a number of things. Graphics card is a good place to look, but you said "server", and they often don't have dedicated graphics cards in expansion slots, so...
How do I change permissions so that people can only delete their own files?
sticky bit
RESTRICTED DELETION FLAG OR STICKY BIT
The restricted deletion flag or sticky bit is a single bit, whose interpretation depends on the file type. For directo‐
ries, it prevents unprivileged users from removing or renaming a file in the directory unless they own the file or the
directory; this is called the restricted deletion flag for the directory, and is commonly found on world-writable direc‐
tories like /tmp. For regular files on some older systems, the bit saves the program's text image on the swap device so
it will load more quickly when run; this is called the sticky bit.
from man chmod
So pretty much if i want "sticky bit" to disallow people deleting other people´s files i should just do "sudo chmod +t /path/to/file
the directory should be rwx for the users who have to write things there plus t to prevent deleting of other users' files, yes
like /tmp
but it has to be on the folder, not the individual files contained
So i should add the "t" to group? So like sudo chmod +t "group"
group?
So pretty much i have a file which if you´re in a specific group you get the rwx permissions, and should i add the t to that group?
t is independend of owner and group
just slap it on the directory where people have write access to create files, but shall not delete those created by others
it should be /path/to/directory, since you're restricting file deletion in a directory
so the ll should look something like this, keep in mind i want "others" to have no access or permissions. drwxrwx--T
look good, I think
Could I get some help completely wiping PyCharm from my Mac? I'm getting the most heinous errors trying to graph simply exponential functions with matplotlib and I'm just about to toss my Mac and buy a new one.
Aren't macOS applications self contained?
Presumably all you'd have to do is delete PyCharm from the applications folder
Well, maybe the configuration is stored elsewhere
Anyway, I think wiping PyCharm is a bit of a drastic measure.
If you describe the errors you're getting in one of the help channels (or #tools-and-devops if this really is a PyCharm-specific problem rather than matplotlib/Python), maybe someone will know what's wrong
It stores stuff in /Library/Application Support/ as well
So other than LPIC-1 what are other good resources for learning Linux
$(docker pull ${IMAGE_TAG_CLOUD})
How do I stop this erroring while keeping the exit code
wdym stop erroring? suppressing output?
Yeah
2>/dev/null
I don't want it to make the script stop when it fails
or &> for both stdout/stderr
But I want to use the exit code
why would it stop?
CircleCI
do they set that exit on fail shell option? 🤔
2>/dev/null is it not >/dev/null
2 is stderr only
but that is only output, nothing to do if it stops or not
idk to which stream it outputs errors
what is the whole command/script anyway? context would help
source $BASH_ENV
docker login -u $DOCKER_USER -p $DOCKER_PASS
test=$(docker pull ${IMAGE_TAG_CLOUD}) 2>/dev/null
if [ $? == 0 ]; then
docker tag ${IMAGE_TAG_CLOUD} ${IMAGE_TAG}
else
docker pull ${DOCKER_USER}/${CIRCLE_PROJECT_REPONAME}:master
docker tag ${DOCKER_USER}/${CIRCLE_PROJECT_REPONAME}:master ${IMAGE_TAG}
fi
test is a builtin, not very nice to shadow that with a variable. do you need to save its content anyway?
it's never used in here though
If I remember correctly
Idek tbh
Circleci shell is strange
Lemme try
source $BASH_ENV
docker login -u $DOCKER_USER -p $DOCKER_PASS
$(docker pull ${IMAGE_TAG_CLOUD}) 2>/dev/null
if [ $? == 0 ]; then
docker tag ${IMAGE_TAG_CLOUD} ${IMAGE_TAG}
else
docker pull ${DOCKER_USER}/${CIRCLE_PROJECT_REPONAME}:master
docker tag ${DOCKER_USER}/${CIRCLE_PROJECT_REPONAME}:master ${IMAGE_TAG}
fi
Error response from daemon: manifest for sharp6292/sharpbot-discord:bugfix-mining-roles not found
That code errors
you can just if docker pull ${IMAGE_TAG_CLOUD} ; then
I'm still struggling to find documentation on how circle detects "errors"
Yep. CircleCI docs are a nightmare
But its super fast so I deal with it
CIRCLE_SHELL_ENV=/tmp/.bash_env-5cc8b8ab49516100080a7111-0-build
Yep that worked
ty byte.
what is this $BASH_ENV file anyway?
i'm using sh
And I need a env
$BASH_ENV is circle CI's pre-configured one
So I thought I'd use it
content?
echo export BRANCH="${CIRCLE_BRANCH}" |sed 's#/#\-#g' >> $BASH_ENV
source $BASH_ENV
echo 'export IMAGE_TAG="${CIRCLE_PROJECT_REPONAME}:${BRANCH}"' >> $BASH_ENV
echo 'export IMAGE_TAG_CLOUD="${DOCKER_USER}/${IMAGE_TAG}"' >> $BASH_ENV
git clone -b ${CIRCLE_BRANCH} https://github.com/Sharpz7/sharpbot-discord.git
🤔
I assume anything anywhere is calling set -e
which exits the shell on any non-zero returning statement
but having your potentially failing command inside the condition part of an if block suppresses that
so that should work
Yeah
looks like its saying that its just going to format that one partition
and not modify the boot loader
So the 100 GB parition I made with Disk Management it going to be written to?
as long as its partition 5 of sda yea
it looks like you also have 'install alongside' checked, so with that and the lack of it listing anything in the mbr, id say that should work just fine
if you are actually really worried, back up your data and write down your windows key
then it doesnt matter what goes wrong
True
I already did a backup... however I didn't write down my Win key
I got my winkey...
But it automatically boots to Windows and doesn't give me a option to boot to Ubuntu, even though it said successfully installed.
Oh wait...
I'm really confused. I went through the installation process and selected the empty partition but it still didn't install and autoboots Windows
Does this mean I did it right? I'm confused as all heck
you might have to hit some key to bring up the windows boot manager
otherwise youll have to install grub and tell it to chainload windows
Chainload?
its how grub load another bootloader, in this case you could use grub to give you the option of starting linux or switching over to windows bootloader [to boot windows]
generally when you install grub it will set that up for you, but I dont know how to make that installer do it at this point
So I allocated 50 GBs for Ubuntu and here is the parition I made for it but it doesn't seem to boot Ubuntu without the USB in. I am awfully lost.
ur probably booting in through a live usb
and i never rly like dual booting cuz it always messes up with windows and such
so if you are using windows boot manager, then its likely going to intentionally not want to boot linux
Yeah but while I had the USB in I clicked the button install Ubuntu on the OS and it went through the steps
if its listed in the windows boot manager, then you need to figure out the key you hold during boot to make windows boot manager menu come up
if its not listed in the windows boot manager, then you either need to add it and do the above, or install grub so that you can more easily configure your os booting
Okay so boot from the flashdrive and install grub via command line of the Ubuntu live boot session?
since you told the installer to not modify the boot loader, it likely didnt add anything at all and youll need to edit the windows boot manager or install grub
yeah, you might want to chroot inside of your actual ubuntu install on the hard drive though
that way you also are configuring the os itself
Hmm chroot. I don't know enough Linux about that one... but if chmod changes permissions generally I'm guessing it means change root
grub can manage the windows boot manager so that you can dual boot pretty sure
https://help.ubuntu.com/community/Grub2/Installing has a few options
chroot changes what your session of linux considers the 'root' of the file system
you can mount your drive and chroot to that mount to make your terminal act like it, and all its children, are running off of that drive
that page has a recommendation that just installs grub from the live cd and also has a section on chroot
i dont know if ubuntu has grub installed by default when you have not selected to use it in the main installer, so you might want to do the chroot method
Live CD == USB in my case?
yea
and yeah grub install or update-grub should find your windows install and create an entry for it
Ah shit
It auto selected try Ubuntu without installing
That menu changed so fast
I guess that's okay actually
I think I'm confused.
the boot loader goes on the hdd outside of the partition table, then it also installs some extra stuff in /boot
i tried doing all this noise too and its such a mess, i recommend you just use a virtual machine if you can
i ended up with 7 partitions on my main drive, and since i have an extra 3 hard drives, it was a huge mess to look at lol
Well I tried to do it as a learning experience of how to dual boot but ):
Take a look at using refind as a boot manager
I've never tried it for Windows, but it worked for dual booting macOS and Arch
It can be customised to look a lot sleeker than grub too, if you care about that sort of thing
might be but tbh im not sure what the actual issue is in the screen shot. looks like its ready to install a bootloader to that drive
Hell yeah
rEFInd is super nice
It scans your drive for bootable kernels automagically, so you don't need to generate any configs when you change partition sizes and stuff
And rEFInd themes are 👌
I've started going to systemd-boot for a simple boot loader and refind when I need dual boot
yep, same here
So I might get a Linux machine
But imo Windows looks better
Is there like a modern Linux?
I don't know anything about linux
Linux's desktop environment can be customised a fair bit
a lot more than Windows lets you for a start
Linux is modern so I don't understand that question
That taskbar looks a lot like Windows's
is this the new trend in linux desktop aesthetics
waiiiti
you can customize it yourself?
is there some sort of like theme shop
where you can get pre made designs
I want a more modern looking windows
in linux
also can chrome canary run on linux
I am new to that sort of stuff
so theres ubuntu
mint
fedora
like whats the difference
actually better question
is there some sort of super tutuorial to getting to know linux?
also if you start off with a windows computer, can you just install linux on it?
Yeah if you set it up correctly
Depends, are you wishing to make Linux your main OS?
I failed at dual booting, however I have previously over-wrote my Windows OS with Linux very easily
So if you would like that, I can help.
It may benefit you to use a VM like how it was suggested me to, since Windows is a little baby.
The most effective way of learning for me was to just jump into it
You could start by installing it in a VM to play around with it
You could choose to use the Linux VM for programming instead of Windows, so you get familiar with the development workflow
Eventually you'll feel comfortable enough to completely switch over.
And at that point, it's perfectly fine to keep using it in a VM; some people dislike dual-booting (assuming you'd still find a use for Windows occasionally)
As for install instructions, different distros have different instructions. So first you'll need to figure out which distro you want. @main olive
I want linux to be my main os
wait
so my pc right now
I can install linux
ok can someone give me a super tutorial
on using linux from the start
Read what I said in the end
Yup, start by looking up some articles on distros to get a feel for which one you want
Yes, Ubuntu is a distro.
ok I want that
cuz thats what I get if I get a dell xps developer edition
what are the differences between them?
Have you used ubunutu much?
is one more capable than the other?
well no i haven't even installed it yet, thats why I want a super tutorial
I was going to say you should look into either ubunutu... or maybe manjaro
Like I said, look up some articles on distros.
Mark, is manjaro to advanced? that's my issue.
Don't know, never used it.
You get a GNOME version
that's Arch based, right?
I think that's pretty nice.
Yeah
But without all the ackward installs
It does the hard work
@main olive https://distrowatch.com/ check this site out too
News and feature lists of Linux and BSD distributions.
you can browse distros and compare them for yourself
Actually this page is better https://distrowatch.com/dwres.php?resource=major
News and feature lists of Linux and BSD distributions.
hmm
which is the newest linux
or the most modern
yeah which distro is the most modern
define modern
Lime some distros don't even have a UI by default
Ok. I'd go with manjaro
It's quite a learning curve tho
if youre new you maybe dont want to configure it
please, I want a super tutorial into linux
can ubuntu look modern?
Customizeable
everything can look modern
the desktop which you see on the screenies is the default one
you can always exchange it
yeah, slap enough aluminum on it
im having choice paralysis
I might stick with ubuntu
since im getting a laptop which comes with that by default
can I make ubuntu UI look modern
like I see photos of crazy linux displays that look like a 2099 computer
not going to do that but CAN ubuntu do that
Lime does that image I sent look modern to you?
You can basically completely ignore the default look
You can install a different desktop
This applies to most distros
That's a bit advanced don't you think?
Sure but my point is that from an aesthetic point of view, the distro you choose does not matter at all
And this person is only focusing on appearances when deciding which distro to use, which is wrong
there are more important considerations than that
in fact, like I said, appearances aren't a consideration at all
Yeah.
yeah indeed linux has been designed to be modular and any distro you would actually use has a package manager. this makes it super easy to swap the theme and core user experience around on any distro. they just happen to come with a default set of software.
ok
ubuntu im going with
well phew
I got that out of the way
now how the hell can I change the desktop to look amazing
lmao
but srsly, is there a super tutorial for getting started with ubuntu
Ubuntu's entire wiki could be considered a super tutorial
Not sure what you mean
Just take the time to read the resources
Before you worry about how to make it look nice first you need to manage to even install Ubuntu
like a youtube playlist or something
I only know of text material, the wiki
Have a look for yourself for videos, shouldn't be difficult to find something
Just make sure it's not outdated information
ok
@oak shell pinging resident ubuntu master here, maybe you have some input?
the arch wiki is also relevant regardless of distro
was asleep
input on what @robust cave ?
other than "whichever Ubuntu flavor looks best to you" (or one of the lighter flavors like Lubuntu/Xubuntu/Mate, if you have an old machine), I don't really have any recommendation
I also don't think there exists any "super tutorial" - you have to piece together the guides for all the things you want to do
but srsly, is there a super tutorial for getting started with ubuntu
Xubuntu if you have an old machine
and just get Ubuntu
if u have a good pc
Ubuntu is great for starters
its all the same
or at least I don't know any "super tutorial" that explains "everything" (because that would be a bible and you'd never need 80% of it anyway)
xubuntu is ubuntu with xfce DE
and still, I recommend the Ubuntu default Gnome DE since its the best for starters.
The best guide is to use it
use it , play around
explore stuff
get used to the terminal
hmm, that link looks nicely structured at least
maybe I'll have a closer look when I got some time
but looks like something that can indeed be recommended to people, thanks for sharing
Is there anyone here willing to help me a bit with linux ubuntu commands?
!t ask
Asking good questions will yield a much higher chance of a quick response:
• Don't ask to ask your question, just go ahead and tell us your problem.
• Try to solve the problem on your own first, we're not going to write code for you.
• Show us the code you've tried and any errors or unexpected results it's giving
• Keep your patience while we're helping you.
You can find a much more detailed explanation on our website.
How do i add groups and make them so that if you´re in a specific group you have access to a specific file, and how do you add people to them
Use groupadd to create groups
Use usermod to change a users groups
Use chgrp to change group ownership of a file and maybe chmod too
Use man to see how to use these commands
But if i want the user to have full names but also have a typical short username for them
you mean you want the user to have two usernames for the same account?
Figured it out
I want to add users with a bash shell, a home directory and i want them to have to change password when they log in
you should be able to do all of that with 1 useradd command
When invoked without the -D option, the useradd command creates a new user account using the values specified on the command line plus the default values from the system.
actually you might need to expire the password manually
Yeah, i´m struggling putting that line together
How would i go about doing that long line?
command*
if bash is the default on the system you shouldnt need to specify i believe
So the command would go out how?
I also want the user to have comment with their full names
yikes
I am trying to get linux to install without a usb or cd
https://askubuntu.com/questions/484434/install-ubuntu-without-cd-and-usb-how
My system is UEFI and I am having some trouble
what methods specifically have you tried, what went wrong, and what system is it? [eg laptop model]
windows 10, and its a lenovo
Now, follow the below steps to install rEFInd[source], so that, you have a boot menu to boot to Ubuntu Live environment. Summary of the installation process given in the source is as belows:
Open cmd with Administrator privileges.
Then,
mountvol S: /S
(you may change S: to any available drive letter)
Type cd in cmd and then drag and drop the extracted folder to the already open cmd window. E.g.,
cd "C:\Program Files"
here is where I got stuck
I did the BIOS method and it worked
but it didnt load
so I did the directions correctly, but it couldn't load
this one seems very complicated and hard to do but I really need to do it
you might be having secure boot issues
which is a thing that forces you to have a signed bootloader
you can generally turn it off in the bios
the 'bios' is just the configuration and loading software built in the motherboard
in this case even if it can boot uefi stuff people still call it the bios menu
you can likely boot with either legacy bios mode or have it boot via uefi mode
ok
you might also need to google your specific laptop model in case there is something extra you need to do to get it to boot other partitions or show the uefi boot menu
uh gosh
I'd search the arch wiki
it's not just arch-related stuff and is arguably the most comprehensive linux-related wiki on the net right now
im guessing this isnt a thinkpad
I'm confused. Why can't you just run a installer?
Get a usb stick. It's wayyy easier
Yeah... Just get a USB. They aren't expensive.
It's very easy if you do it that way. You usually don't install operating systems without an installation media.
ok ok
so I got a flash drive
I have the .iso installed
so I just used etcher to put the iso file in the flash drive
now what
so once you have the contents of the iso on there, you should be able to just stick it in and reboot then tell the bios to boot off of it
ok
ill tell you how it goes
Umm what do I choose
There's Windows 10, and unetbootin from my previous attempt to install Linux
(ping me pls)
@main olive that looks like a windows boot loader. figure out what key your bios wants you to press
when the computer first turns on, it will say. if not spam del f12 f2
and one of them is the correct one
thatll at LEAST get you in to the bios i guess
Ok, cuz it doesn't say when I boot
Can you get into windows?
Wait I think if I click the advanced I can get it to load the bios
then you have to go in and choose prob both the boot order AND possibly the order of each device type
Is it the really old looking techy window with arrow keys to move
Like bright blue and tan
yes thats the bios
iirc the command is
shutdown /r /o```
to reboot into bios
I got into that before, but what's i do from there

