#unix

1 messages · Page 8 of 1

neat jasper
#

But is any of Unix source Linux source ? if not what makes it UNIX ?

#

A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-like application is one that behaves like the corresponding Unix command or shell. Although there are gen...

#

If that tree is true then Linux is distinctly not UNIX

#

but its unix like 🙂

lavish storm
#

ah yes

neat jasper
#

So no Linux question please on this channel 🤣

shrewd stratus
#

see the channel description 🙂

neat jasper
#

UNIX is dying

shrewd stratus
#

(on mobile, so can't copy the text)

neat jasper
# shrewd stratus

not a big deal just trying to highlight a fact that UNIX is not what people typically chat about here. Mac is an outlyer in todays world of servers that we typically called 'linux servers' not 'unix servers' so channel name should reflect reality that im aware of perhaps #unix-like

humble falcon
#

In all honesty I'm pretty sure this is just #not-windows but "unix" fits better

neat jasper
#

#FREE-UNIX might be a nice name 😄 and for window #unix-IS-FILTH

summer trail
#

There have existed Unix certified Linux distros, though I'm not sure if there are any modern ones

neat jasper
summer trail
#

Inspur K-UX is a Linux distribution based on Red Hat Enterprise Linux produced by Inspur, a Chinese multinational company specializing in information technology. Inspur K-UX 2.0 and 3.0 for x86-64 were officially certified as UNIX systems by The Open Group.

neat jasper
#

I read most of the 2 links you present but they dont Legally define what is UNIX and what is more important also what is not UNIX.

#

we know what Linux is because its legally defined

#

but UNIX is lose

#

More than that why do i care that they are UNIX complient ? (reword) Linux is what most of our financial flux plus most of our PnL is worked on today.

#

what does it mean to say MySql Is UNIX complient these days. what is the standard to install MySql in UNIX ?

summer trail
#

There's absolutely no good reason to do this, which is the reason that UNIX certified Linux distros aren't common. I'd expect any distro could get certified easily if it wanted to, but there's no tangible benefit to doing so, and there's a significant monetary cost to pay for that external audit

#

If I had to guess, those 2 UNIX certified Linux distros probably got certified because they had some big contract that hinged on whether or not Linux is UNIX - probably some customer who was only allowed to use a "real UNIX" because $reasons, so they had to pay someone to say "yes this is a real UNIX" in order to land that contract

neat jasper
#

so the the challange is that unix is not linux and apart from big money it stands true ?

summer trail
#

If your question is "is Linux UNIX", the answer is "sometimes", as these distros show.
If your question is "does it matter if Linux is UNIX", then no, not really

neat jasper
summer trail
#

Very low

#

That doesn't seem relevant, though. Clearly Linux can be UNIX, and if it was worthwhile for Linux to be UNIX, Linux would be UNIX more often. The only reason why Linux is rarely UNIX is that it's rarely worthwhile to go through the certification process

neat jasper
#

Gotcha. Well for what its worth i think most Linux users know that ill-informed people will refer to it as UNIX even though it totally not and legally separated from UNIX because of good reason. and the only reason that there is not a GNU version of an OS is because they gave up, and that was the movement of free software that we all pay nothing for today ...

#

its good to be not UNIX

summer trail
#

It's not "because of good reason" - that's exactly my point. It's totally arbitrary. The people who legally are allowed to grant you permission to call your operating system "UNIX" will let Linux OS's call themselves "UNIX" as long as you pay them to audit your OS. There's no good reason why Linux isn't usually UNIX, just a silly one

#

If it was free and accessible, every Linux would be UNIX. Because it's expensive and not very accessible, the overwhelming majority of Linux systems aren't UNIX, because they meet all the requirements to be UNIX but the UNIX authorities haven't confirmed that.

neat jasper
#

ok not sure you understand the legal standing of UNIX vs Linux. if a company can site a code pattern in your code-base that they hold a US or other patent on (under UNIX aka bell labs or att ) and you profit from that code, you are going to be in a civil case in the US. This is a regular thing and its a business for lawyers to make money on. so the founders of free software has dissected itself totally from UNIX to guard us all from this.

#

So its good to be not UNIX

summer trail
#

You're talking about copyright violations, I'm talking about trademark violations. Something can use the UNIX trademark even if it has no code from the original UNIX OS's, as long as the people who own the trademark (originally AT&T, later SCO, now The Open Group) say that you can

neat jasper
#

Ok so we aggree its totally not something that we care about. its just some business man who wants to check off a UNIX complient box.

#

i mean if you have a 25 year old solaris 5 box its not running linux is it ?

#

yeh its not

#

Yet that box is UNIX complient

#

lets take that further is is SUNos 3 complient that is UNIX

#

its meaningless

summer trail
neat jasper
#

they are not totally different but they are protected by law to be differnt

summer trail
neat jasper
#

Solaris is only in existance because no devs have actually made the cutover to Linux

#

there are lots of cobal devs that are dying and that is the only reason there is dev time to convert that code too. UNIX is dying dude

#

Linux is dormant

#

totally separate and legally distinct from UNIX system

summer trail
#

Sometimes 🙂

neat jasper
#

is systemd a UNIX standard?

summer trail
#

The UNIX standard doesn't require any particular init system

neat jasper
#

so what is the UNIX standard distro ?

summer trail
#

There is no standard UNIX distro

neat jasper
#

so there is no concrete UNIX distro ?

#

in any generic form ?

summer trail
#

Correct

#

There's a set of requirements, anything that meets those requirements can be certified to be a UNIX

neat jasper
#

ok but Linux does not meet them in any form

summer trail
#

Linux meets all of them

neat jasper
#

no its does not

summer trail
#

If it didn't, there couldn't be any Unix certified Linux distros

neat jasper
#

i remember solaris 3 having /run

#

that is not in later versions

summer trail
#

The fact that some Linux distros have been Unix certified proves that Linux distros can meet the requirements to be called a Unix

neat jasper
#

sunos 3 i mean

summer trail
neat jasper
#

Linux

summer trail
neat jasper
summer trail
#

The authorities who define what the word "Unix" means say that Linux is one

#

I suppose "goat" is different because there is no authority who can officially decree what is and isn't a goat in any sort of legally binding way

neat jasper
summer trail
#

I did, above

#

That's what started this whole conversation

#

You seem to have an idea of what "Unix" means that's different than what the owners of the Unix trademark say it means

neat jasper
#

there must be some merrit to it other than that

summer trail
#

It is really serious. The business men that say that Linux is Unix now are the same ones who sued Novell for calling itself a Unix 20 years ago

#

Not literally the same people, of course, but they bought the rights to the name from those people

neat jasper
#

code base and the dna of that is what makes the name for me. if you want to argue that the name is transferable then ok but im not really into that .

summer trail
#

Ok. Well, the courts disagree with you. 🤷‍♀️ Legally, you can get sued if you market your OS as Unix without The Open Group saying you can. Legally, The Open Group has said that some distributions of Linux are allowed to market themselves as Unix.

neat jasper
#

as they can under the free copyright but they cant then close the code .

#

close code is forbidden under GNU and Linux have similar stuff

summer trail
#

Something with AT&T/Bell Labs Unix code in it that's not Unix certified by The Open Group can't legally use the Unix name. Your "DNA* argument doesn't hold any water legally, the trademark does

neat jasper
#

ok maybe but i thin Linux is not UNIX hehe and it might be an opinion but its mine

#

i also dont think you presented a valid argument to why Linux is UNIX

summer trail
#

How is "the people who are legally authorized to decide what is and isn't Unix have said that some Linux distributions are Unix" not a valid argument?

#

You seem to have an understanding of all of this that's anchored in the dot com era. You seem to have missed 20 years of evolution here, and new positions taken by new owners of the Unix name. But it seems like we're not getting anywhere, so I'm gonna drop this discussion and head to bed.

neat jasper
#

So if i have a few years i suddenly know nothing. Im up to date man :-). ask me an up-to-date question. but you have not presented any reason why Linux is UNIX but you say that if a court said its has name rights it must be UNIX

#

it seems funny

opaque ginkgo
#

linux is unix-like

summer trail
#

Yes, the owners of the Unix name say that Unix is a set of behaviors and a standard, and Linux follows that standard and has those behaviors

opaque ginkgo
#

if you're going by the definition of "unix is anything certified as UNIX"

summer trail
opaque ginkgo
#

yes

neat jasper
#

and yet the Gnu is so adamant that its not UNIX. as its name implies can you explain why that is in the linux distro ?

opaque ginkgo
#

strictly speaking gnu isn't necessary for a linux distro

neat jasper
#

ls in linux is not UNIX

#

correct its nto but its the basis of all bash tools

#

and it GNU

#

hehe

opaque ginkgo
#

im fairly certain that busybox doesn't use anything gnu

neat jasper
#

mistaken

summer trail
neat jasper
#

ps ls dir are GNU tools

opaque ginkgo
#

some implementations of ps ls dir are part of GNU, yes

#

but there are also non-GNU implementations of unix utilities that are found in some linux distros

jade cairn
# neat jasper ls in linux is not UNIX

The acronym comes from a different era. Software vendors created maliciously compliant Unix systems to ensure that you couldn't switch to different system vendor. The acronym was born in that era, where Linux ran contrary to this, not focused on vendor lock in. These days, Unix vendors are all but dead, so the name doesn't mean a whole lot.

opaque ginkgo
#

iirc alpine uses busybox + musl instead of gnu coreutils + glibc

neat jasper
#

okk disregard

jade cairn
#

Alpine is the big one

opaque ginkgo
#

depending on your definition of "Linux", I think android also counts

jade cairn
#

To my knowledge the only gnu bits of alpine is gcc

#

Maybe they compile it with clang now, not sure

neat jasper
#

ok so what is the reason to break from GNU ?

jade cairn
#

Musl and BusyBox are smaller, and have more permissive licenses.

opaque ginkgo
#

isn't busybox also gpl?

jade cairn
#

Oh yeah, so just the smaller thing for busybox

neat jasper
#

permissive licenses ?

#

what does it mean

jade cairn
#

Musl is MIT rather than GPL

#

Which doesn't really matter for a libc

summer trail
#

GNU coreutils are GPL 3, busybox is GPL 2 - so, slightly more permissive, at least 🙂

neat jasper
#

so again is Linux in legal tems UNIX ?

summer trail
#

Sometimes. Not every distro, but some distros. The ones that bothered to pay for it.

neat jasper
#

considering the tree of development

opaque ginkgo
#

iirc the linux kernel was basically written from scratch

jade cairn
#

But it was explicitly designed to be Unix compatible.

summer trail
#

The interesting thing is that the only hurdle is the cost and time to get certified. Any Linux distro that wanted to get Unix certified could, they'd just need to pay a bunch of money

neat jasper
jade cairn
#

No, Unix has a very clear definition. Some Linux distros meet it

neat jasper
#

i know and yes i have a few years on me that it totally not

jade cairn
#

Linux is not an operating system unto itself, rather it is a kernel, forming a complete operating system only with a distribution that provides the userspace etc.

#

It is generally a pedantic distinction to make, but in this case it does matter

neat jasper
#

if you do an ls -s it does seem same and it has /etc/passwd and such but it starts to diverge in a lot of ways after these superficial things

jade cairn
#

It matches all behaviors and has all APIs described in the single Unix standard.
The fact the SUS is awful and pathetically weak, due to Unix vendors wanting to get their lock-in cash, and thus being Unix compliant is not enough to give you clarity in all but the most superficial things is a separate matter.

#

Writing software in a way that it will work on every Unix compliant system is nightmarish, and occasionally impossible due to optional APIs. But hey, at least you get CHAR_BIT==8

neat jasper
#

does mac os have /proc/* ?

#

im not even sure does solaris have that ?

jade cairn
#

Linux has plenty of things beyond the unix standard, as do all unixes, and all real-world unixes did historically

neat jasper
#

why cant it be in itself a Linux system Distinct from UNIX i mean

jade cairn
jade cairn
jade cairn
#

Where is what defined?

tired remnant
#

Unix is a specific standard that you have to meet and get certified to be able to specifically call your OS Unix
Unix-like is more of just a term for anything that behaves like Unix, though maybe not entirely conforming to the spec, or maybe just out of lack of certification
Linux was designed to be Unix-like, which it is, but certain distributions of linux may or may not go through the process of fully conforming and certifying themselves as Unix

jade cairn
#

To be clear, the fact most Linux distros are Unix compliant is not at all useful, and you should just write code specifically for Linux systems to preserve your sanity.
But hey, if you want to write your program in a way that makes it run on both BSD and Linux and every historic Unix, and your program is extremely uninteresting, you can.

neat jasper
jade cairn
# neat jasper so launchd may be a reason to say that is systemd UNIX or not. Is docker a unix ...

xcode-select --install this is a script that will succeed on Mac, and fail on BSD and Linux. (also, MacOS is not BSD, though historically it was).
The simple reality of the matter is that the Unix standards are intentionally very forgiving and as such, even between two unixes, there will be significant, major, differences, that make it quite difficult to write portable code between them. MacOS is notorious for this.

neat jasper
#

'Unix standards are intentionally very forgiving ' where is this standard dictated. wiki or a citation is needed because we disagree that a paper standard even exists,

fallow tusk
#

The link to the specification has been given twice already

jade cairn
#

POSIX is technically not the single Unix specification, though the differences are mostly academic and legal

neat jasper
#

what seems obvious is not always

#

A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-like application is one that behaves like the corresponding Unix command or shell. Although there are gen...

fallow tusk
#

I don't see why you wouldn't take it seriously. It's the requirements set out by the group that controls the UNIX name, on their site.

neat jasper
#

i will post my one again

#

its not on the same code path as UNIX as was the intended path of the founders

opaque ginkgo
neat jasper
#

my citation seems clearer than the unix standars that is very vauge

neat jasper
jade cairn
#

I am sorry but a Wikipedia infographic is not a better argument than the open group saying that a Linux distribution was Unix certified.

#

On the page about unix

neat jasper
#

ok you guys win then

#

its a UNIX system

#

Maybe its me but i really cant sand discord anymore. its becoming exactly like stack abuse only with a thousand cuts

#

i bet you noone cares to ask why. i dare you 😉 lol

#

im going to bed so here is why ... you are selfish. you cant be in the middle. its why we have stupid wars. ridiculous race we are

neat jasper
#

I've read what I can of this linkable now and it's not very open to the public. You have to login to actually read a spec which who on this thread has tried to read read? That is exactly what I would expect from a corporate Unix. I bet Noone even cares about open source here but that is what Unix was trying to kill and it took effort to keep it open.

neat jasper
#

Other than some corporate grift

south verge
#

Anyone using arch?
Discord just released a new update
And i downloaded .deb converted it into .pkg.tar.zst
And tried installing it
Now it is downloading "intel-oneapi-baskit-"?
And it is 2gb? What is going on

#

Fk I totally missed what happend above

tired remnant
# neat jasper Other than some corporate grift

"Corporate grift" is a very strongly way of wording it but... yeah, being able to advertise your OS as being UNIX is very much something very corporate and legal.

The Open Group are the organisation that hold the trademarks to the UNIX name, and so get absolute ultimate authority deciding what does and doesn't count as it. How do they do that? By having a standard laid out that you have to meet, and then going through their process and terms of certification.
It's a standard that is made up of a handful of other standards, but the main core of it is the POSIX standard, which is referred to on that page, and was also linked to you yesterday in chat: https://pubs.opengroup.org/onlinepubs/9699919799/

Most linux distributions don't bother going through all of the work of meeting the UNIX specification, but they usually aim to be all or mostly POSIX compliant - hence why many distros are then called Unix-like (or *nix, among other labels)

jade cairn
# neat jasper I've read what I can of this linkable now and it's not very open to the public. ...

Unix has always been a corporate thing (as was just about all software for quite a while). At the height of its popularity, it was free for universities, but very much a commercial product for most users. Open source unixes were only really used by hobbyists, with production deployments using software vendors. Unix predates open source being all that popular (mostly predates the fsf), and the standards not being readable for free is very normal for standards (ISO C and C++ are also not free, though you can get drafts). Even unis used the commercial distros afaik, they just got them for free.

neat jasper
jade cairn
#

I honestly never really cared about what the standards actually say beyond a school project where we had to be unix compliant. it's more of a cool trivia thing than something worth investigating deeply. POSIX is freely available and it is like 99% the same thing as the SUS if you care to find out.

#

there is a bunch of trivia you can find, like -r vs -R for most commands, or c99 vs cc, but most of the time, you just care about linux, rather than some theoretical other unixes

neat jasper
jade cairn
neat jasper
#

My question was what does it mean to be compliment not some fluff for corporate head that has no understanding if what it means.

jade cairn
#

This is the standard the single unix specification refers to for the actual OS definition stuff. They are different names, since the standard body defining POSIX is not the one that owns the unix trademark

neat jasper
#

So that means linix is not Unix then

#

Which is what the whole point was

jade cairn
#

it is, there is a linux distro that is fully compliant with SUS, and thus with posix.

#

or well, linux itself is not an operating system, but with the proper (read most used in practice) userspace, it is a proper unix

neat jasper
#

Most are not posix complient though

jade cairn
#

GNU+Linux without some truly exotic configs would pass the certification

#

as they have done twice before

#

GNU does care about posix compliance to some degree, as does busybox et al.

neat jasper
#

Gotcha. Well tanks for the debate but linux can diverge quite easly from unix propper and has done and will do again. Some fringe cases may exist that stay in line exactly with what the corporate peeps want but everyone can and will move on if it makes sense.

#

I certainly don't expect my code or any c code to compile on Linux if it does on Unix os.

jade cairn
#

if you have 100% unix compliant C, it will compile

#

most useful programs do not get to do that, however

#

you generally need system-specific APIs, even if you have the unix standard backing you

neat jasper
#

Yeh and if we had to wait for Unix to say what we can do in the kernal then we are not getting anywhere. Many modify the kernal for different reasons and don't have to pay a toll to any Unix lawyer grifting off a century old patient. We really need to disconnect from the tm

jade cairn
#

Oh yes, absolutely, Unix is a relic and is not worth putting effort into, just make a good OS, not like anything short of BSDs will ever even interop, and BSDs are very good at running linux software by necessity.

#

but well, no one ever stopped making features for their OS because it wasn't part of UNIX. That's how the whole situation of many closed source mutually incompatible unixes happened.

tardy stream
#

welp, straight up can't reproduce my issue. It works perfect inside of docker

#

guess I'm using docker now XD

wise forge
rotund girder
#

I want to create a slideshows with say 20 pictures, and on each slide the picture is slightly different. It would make sense to draw the first picture and then describe each subsequent picture as a diff. (that way if I change the base structure in the 1 st image, I would automatically get the change in the next pictures.) this reminds me of

  1. git commits (since each commit describes a change) but it's describes the history of a file and not changes in a series of files
  2. Sprites moving on top of a background (as in a video game)

What would be some awesome tools to create such a slideshow? Last time, it took me 24 hours to create 30 minutes of presentation 😩🙏

fallow tusk
#

Not sure, but LaTeX for the presentation and Tikz for the graphics. since, iirc, you can write Tikz functions, which would be ripe for modification down the line.

rotund girder
#

Thanks, I haven't userd tikz and only latex for my thesis.. I will take a look.

fallow tusk
#

Might be more of a learning curve than you want, and I'm not entirely sure how you write a slideshow with LaTeX, but I believe it's possible

lavish storm
#

beamer 😄

fickle granite
#

Used to be a LaTeX package for that -- https://tex.stackexchange.com/a/693953

lavish storm
#

||```
% SLITEX VERSION 2.09 <25 March 1992>
% Copyright (C) 1992 by Leslie Lamport

fickle granite
#

eww, NSFW; do not click

fallow tusk
#

Written by Lamport, eh? :)

gilded basalt
#

Are there any python libraries for parsing the output of common unix commands like arp, ifconfig, uname, etc? I've had a hard time finding anything that's general or modern (found one library that can do some stuff from /proc but it's python 2 and not pip installable).

fickle granite
#

I'd hope you could get that same sort of information without having to run a subprocess at all

formal schooner
formal schooner
#

parsing text is much less of a challenge than writing platform-independent code to interact with the OS

main olive
#

how would you make a new directory, put the contents of a different directory into it?

shrewd stratus
main olive
#

yes

#

but

#

instead of putting the directories content into the new directory you create a file inside of that directory

#

and that file will receive the content

#

so directory a gets changed to directory b and the contents of directory a gets put inside of a new file named c inside of the newly made directory b

shrewd stratus
#

content of a directory… into a file?

main olive
#

yeah

#

so

#

like

#

the directory already has a file

#

you change the directory to a new one and you change the file to a new one pretty much

shrewd stratus
#

not sure I get what you mean
I don't see how the contents of s directory are put into a file

main olive
#

so

shrewd stratus
#

do you mean they're concatenated and written to that file?

main olive
#

ill send the exercise to you

#

hol don

shrewd stratus
#

and which part are you stuck on?

main olive
#

all parts

#

i made it inside of ubuntu terminal

#

but i have to make it inside of a bashscript

#

and i dont know how to do that

#

been racking my brain for a few hours for what its worth

shrewd stratus
main olive
#

yeah

#

almost completely

#

missed a part

#

but yeha

shrewd stratus
#

then put those commands in a bash script

main olive
#

they dont work

#

bashscript has different words for them

shrewd stratus
#

are you not using bash in your Ubuntu terminal?

main olive
#

its not the same

#

i have to make a script for it

#

not just write it out

#

yk?

fallow tusk
#

Except for some things, you should be able to directly use what you type in a bash terminal prompt in a bash script…

#

What's the script you've written that's not working?

main olive
#

hey yall, could really use some help

lethal trail
#

I just installed linux in dual boot, but when I restart linux after the installation it's showing this screen

#

How to get to the desktop

crystal crescent
#

log in?

humble falcon
lethal trail
#

Yes I login

lethal trail
humble falcon
#

Usually mint should come with cinnamon, weird it didn't go to a login manager

lethal trail
#

I installed this one

slate crypt
#

what DE did you use? cinnamon, kde, gnome?

humble falcon
humble falcon
lethal trail
slate crypt
#

any errors in journalctl?

lethal trail
slate crypt
#

run sudo journalctl

humble falcon
#

Read only fs?

#

Did you set the partition filesystem type to be readonly?

lethal trail
#

Um I forgot

slate crypt
#

run df

lethal trail
#

Looks like I need to reinstall it correctly

humble falcon
#

Reinstalling might be easiest yeah

slate crypt
#

fastest may be to edit the /etc/fstab

lethal trail
#

Ok thanks

lapis cloud
#

huh, that's a pretty weird problem

fallow tusk
#

Might just need a reboot

fickle granite
#

in Ye Olden Days, linux would run "fsck" on a filesystem, and might bring it up read-only if there were errors

fallow tusk
#

It still does. ;)

main olive
#

I use arch

lethal trail
#

Does anyone know how I can swap windows key with space key in Linux mint operation system

#

I broke my space key 💀

lethal trail
#

Ok so first I need to install both packages

shrewd stratus
#

from the PPA, yes

lethal trail
#

🤔??

fickle granite
#

that means that the people who maintain Mint haven't "packaged" interception-tools to work with apt

#

so you'll have to install it manually

lethal trail
#

Ok

rotund girder
# lethal trail

No problem now, but take care to not printscreen any secrets, like keys/passwords. 🙂

#

(And always prefer to paste actual text rather than pictures)

lethal trail
shrewd stratus
lethal trail
#

Problem solve:)

#

I just created a .Xmodmap
Write keycode 133 = space
Then
Run command: xmod .Xmodmap

#

@shrewd stratus thanks for giving me your time

shrewd stratus
#

np

south verge
#

One day I'll find out what is the difference between unix and linux. Right after i find meaning of life

main olive
#

question

#

extract_tasks.sh archive-with-student-submissions.tgz

#

what does this do?

south verge
#

pass the 2nd file name to first bash script

main olive
main olive
#

question

#
read VOORNAAM
read GEBOORTEDATUM

CUR_DATE=$(date +%D)
BIRTHDAY=$(date +%D --date=$2)

if [ "$BIRTHDAY" = "$CUR_DATE" ]
then
    echo "Happy Birthday ${VOORNAAM}"
else
    echo "Hello ${VOORNAAM}"

#

why does this not work

fickle granite
#

what is $2 here?

#

and what does doesn't work mean?

#

and why do you read GEBOORTEDATUM and then ignore that variable?

#
read VOORNAAM
read GEBOORTEDATUM

CUR_DATE=$(date +%D)
BIRTHDAY=$(date +%D --date=$GEBOORTEDATUM)

if [ "$BIRTHDAY" = "$CUR_DATE" ]
then
    echo "Happy Birthday ${VOORNAAM}"
else
    echo "Hello ${VOORNAAM}"
fi

# (echo fred; echo 2023-10-22) | bash ayoub.sh
# Happy Birthday fred
main olive
#

i fucked it up g

#

hold on

#
read VOORNAAM
read GEBOORTEDATUM

CUR_DATE=$(date +%D)

if [ ${GEBOORTEDATUM} = "$CUR_DATE" ]
then
    echo "Happy Birthday ${VOORNAAM}"
else
    echo "Hello ${VOORNAAM}"
fi
#

this is the new code i wrote

#

but that still doesnt work

fickle granite
#

what are you typing when you run it?

main olive
#

i want to ask for your birthday and if it is your birthday today you'll get echo "Happy birthday..." else

fickle granite
#

mine works fwiw

main olive
#

nothing

#

it won't even run

fickle granite
#

you're using windows; that's your first problem

#

seriously, your text editor isn't designed to work with bash

#

it's putting "carriage returns" at the end of each line, which is dumb. Also, bash is dumb: it pukes when it sees those.

#

maybe try WSL, and use a Unix text editor?

main olive
#

ok

#

it

#

WORKs

fickle granite
#

💐

main olive
#

well yeah

#

i can't do much about it my

fickle granite
#

you can get a cloud-based Unix system for free, or very cheap

main olive
#

i already installed Ubuntu on my laptop but i lent it to my brother so i can't use it rn

fickle granite
#

are you using WSL?

main olive
#

and i don't want to also install it on my pc

#

nah

#

online bash shell

fickle granite
#

you're using Cygwin?! 🤮

main olive
#

idk what that is

#

but

#

probably yeah

#

shits ass

#

does get the job done tho

#

ill have to endure until tommorow!

main olive
#

i have this exercise that i've been having trouble with for the past 2 weeks can u help me with it?

fickle granite
#

I don't know; you haven't asked the question yet

main olive
#

ive asked another guy for help and it did help but im still not sure how it fully works

fickle granite
#

what in the world is "inginious"? Is that important?

main olive
#

no

main olive
#

just think of it as in "this website"

fickle granite
#

well that assignment seems pretty easy to me. Is there some specific part of it that you're having trouble with?

main olive
#

i know how to do it all i just don't know how to write it out

#

i don't know how to format it all i guess

#

i can tell you how to print something out but i don't know where to put it for example if that makes sense

fickle granite
#

no, it doesn't

main olive
#

hm

#

okay

fickle granite
#

do you have some code written already?

main olive
#

so

fickle granite
#

if so, what about it isn't working?

main olive
#

no i don't

fickle granite
#

ah

main olive
#

i don't know how to start it

fickle granite
#

hard to help if you've got nothing

main olive
#

ill give u an example

#

im assuming you know python

fickle granite
#

of course, this is a python discord

main olive
#

yeah

fickle granite
#

is this a python question? if so, open a channel in #1035199133436354600 , so we can leave this channel for Unix-specific stuff

main olive
#

its not im using it as an example so u can understand whats wrong with my brain

fickle granite
#

I don't want to psychoanalyze you 🙂 I just want to help you fix your code. If you don't have any code, then ... maybe write some?

main olive
#

I can't 😭

#

okay so, if you want to print something out its simple, print("...")
if you want to use a loop you use, for i in ...
and if you need a list you do list = [....]
but now lets say you want to combine them all, well thats my issue i can't do that cause my brain can't wrap its head around it

fickle granite
#

I doubt I can help with that

main olive
#

hopefully you'll understand this

fickle granite
#

well, I understand that you're confused about the basics of programming. But I'm not good at teaching the basics.

#

that's what your class is for.

main olive
#

:/

#

i didn't get a class

#

i got a file and told to figure it out

#

so now im here

fickle granite
#

who is asking you to figure this out, if not a teacher?

#

is this a job?

main olive
#

no its a teacher alright

fickle granite
#

then ... ask them

main olive
#

its a task i'm not allowed to ask questions

fickle granite
#

you need someone to physically sit next to you, and talk; discord isn't great for that

#

oh.

#

and yet here you are, asking questions.

main olive
#

funny how life works sometimes 🙂

fickle granite
#

we're not supposed to help with exams, so ... 🤷

main olive
#

exams?

#

this is not an exam lol

#

ill just ask questions on code ive already written and figure the rest out myself

#

for FILE in $(ls -a) what does -a do here besides show displaying hidden files ?

prime magnet
#

also man pages provide details about that

main olive
#

okay ill try that

untold socket
#

You should get help in one of the off-topic channels. Read the topic of this channel, it isn't catered at explaining basic bash programming

main olive
#

with code

#

filename=$(basename "$1")
VAK=$(echo "$filename" | awk -F_ '{print $3}')
TITEL_VANTAAK=$(echo "$filename" | awk -F '{print $4}')
mkdir -p "$VAK/$TITEL_VAN_TAAK"

rotund girder
hollow lotus
#

Hello everyone!

I'm using Ubuntu 22.04.3 LTS and have Python installed on it.

I do get Python 3.10.12 when I enter python3 --version in the terminal.

But when I run scripts that are located on my external HDD, it shows

/bin/sh: 1: python: not found

[Done] exited with code=127 in 0.045 seconds```
fickle granite
#

python != python3

hollow lotus
#

Oh,

#

How do I get this to work?

fickle granite
#

type python3 instead of python

hollow lotus
#

Yes, it worked!

#

Thank you @fickle granite

#

The thing is, I did run the script using Code Runner extension in VS code. How do I configure this to use python3 instead of python?

fickle granite
#

maybe it's in one of those JSON files under .vscode

hollow lotus
#

okay

#

thanks

main olive
#

Hey everyone

#

Wondering if there's somebody who knows how to extract content and put said content in a different directory? Do i use a variable?

fallow tusk
#

You can use tail to see the most recent lines, like head shows just the initial lines

shrewd stratus
#

tail -f for following the… tail

main olive
#

this is my code mkdir -p InleidingProgrammeren/Huistaak1-HelloWorld
tar -xzf assignment_UA_InleidingProgrammeren_Huistaak1-HelloWorld_2019-11-11.tgz -C InleidingProgrammeren/Huistaak1-HelloWorld --strip-components 1

#

but i was supposed to use regular expressions so i have to convert this into regular expressions but im not sure how?

fallow tusk
#

Neither do I. What you've shown has no relationship to needing regular expressions

main olive
#

the exercise my friend gave me is for regex

#

i can't hardcode it

fallow tusk
#

Nothing there is going to use regex

main olive
#

yeah i have to convert it

#

the code is correct but i wrote it poorly

gilded cove
#

im new to ubuntu and linux in general and coming from windows, i have this question:
is sudo apt update && sudo apt upgrade similar to windows update?

fickle granite
#

yep

#

although it will update your Ubuntu packages, as well as the operating system

gilded cove
#

what is the stackoverflow equivalent for linux stuff?

kindred basin
#

Or superuser (maybe)

gilded cove
long burrow
fallow tusk
#

tail is the newer messages - the ones at the end of the file

gilded cove
#

how do you exactly build from source in linux? i rarely succeed because most of the times the deps aren't available or "can't be installed"

im on ubuntu 22.04 LTS, if that matters.

is there an article/doc i can read about this?

#

i know that different application would have different deps, and therefore different steps, but is there something they all have in common?

fickle granite
#

I'm talking about building python from source, not arbitrary programs

#

the build-essential package is, well, essential 🙂

gilded cove
#

thank you guys

fickle granite
#

the tip about apt-file is useful -- I use that a lot

gilded cove
fickle granite
#

it solves this problem:
You know you need a file named "bloviate"
You have no idea what package provides it -- there's no package with that name
So you type apt-file search bloviate and it says /usr/bin/bloviate: oration-utils or something, so then you do apt install oration-utils and there it is

gilded cove
#

that's pretty cool

#

or rather the parent package where the file comes from

gilded cove
#

what are recommended lightweight browsers for ubuntu?

i've been using epiphany for the last 2 days, but looking at the cpu usage (it's probably not correlated since my cpu is not that fast) it's pretty resource hungry.

#

actually it's not really epiphany that is using a lot of cpu, its WebKit

wise forge
#

those aren't really compatible things.

#

we are forced into ecosystem of using Chrome/Chromium, with trying to catch up Firefox + apple's smth

gilded cove
wise forge
#

Anything else will not be able to parse it correctly, if uses any different engine (because it is... mindbreaking complexity)

#

or will be having unauthorized inclusions of smth else.

#

use pure Chromium or Firefox if u want most default linux friendly option

gilded cove
wise forge
gilded cove
#

also another question
sometimes when I try sudo apt install <package> it doesn't found it and instead suggested me installing through snap

how many package managers (is this what they are called) exist for linux?

#

and which should i trust?

wise forge
# gilded cove also another question sometimes when I try `sudo apt install <package>` it doesn...

Ergh... ubuntu is usually using next options:

  • snap, for installing up to date packages with autoupdate. Most laziest option useful for... some stuff u don't want to take care of at all.
  • apt, has remote packages available too. It installs things frozen dedicated for your OS version, like ubuntu 22.04 for example.
    • Useful to install most stable options. as downside they can be often out of date.
    • useful for Docker as u prefer stable/frozen versions installing there
  • apt with added new remote sources. Instructions like for Docker Engine usually have commands to link apt to their most latest version installation, and u get your apt update updated to new remote packages. Then it has no downside regarding outdating, but instructions are a bit more lengthy usually.
  • sudo apt install ./package.deb. U can download and install in offline way any Debian package
  • u can just download and install on your own already compiled binaries with little curl/wget and moving binary to any appropriate bin path. Useful for single file programs. Some the best programs are made like this.
  • u can download source codes and compile them and install fully manually

may be there are other options/other managers but i dont know their usage for Ubuntu distro

#

i usually use Snap for long time desktop used stuff that has good Snap support.
Otherwise i fallback for apt for difficult things (like Docker). or for temporal stuff i fallback to remote apt or deb packages.
i like using curl/wget installed binaries too though

gilded cove
#

i still don't really understand how linux installs applications, most things i have installed are from apt and snap. i haven't really used docker so i don't really understand how that works.

.deb packages are like .exes so there's no problem there.

i still cannot comprehend how to build from source 😂

#

i read the manual on ubuntu from a link someone here gives, but as that is quite general (which helps), some applications are just so obscure

#

but i feel like if i know how to build from source, things are gonna be so much more flexible

#

also do i need an antivirus on ubuntu

#

that's one less thing running on my slow laptop

wise forge
# gilded cove but i feel like if i know how to build from source, things are gonna be so much...

i build from source only if developers were lazy in all criterias

  • to make snap package
  • to make apt remote available package
  • and did not compile .deb package
  • and did not provide even compiled binaries for downloading/installation
  • and there is no even easy to install python pip/golang installable package
  • thing i seek is not available as Docker image for downloading from Docker Hub/AWS docker registry
    • this is my default for postgres/redis/mongo/nginx/apache and other web stuff
#

you know... i remember only one time some year ago when i needed compiling program from sources directly 😅 tried to use some obscure Git GUI.

#

p.s. that's actually a thing to remember. some common programs are just installable via pip/go/rust cargo stuff. Kind of yet another atlernate program managers

gilded cove
gilded cove
#

i can install and use things from the PyPi index

wise forge
#

otherwise i use docker containers and virtual machines to experiment with dangerous fragile installs

gilded cove
wise forge
#

if u use some snowflake unique distro in experimental/newest versions, then it is your own fault 😊

gilded cove
#

i was also thinking about using the "beginner-friendly" distros, but idk if it's worth it for me to not just use a distro that has already been widely adopted

#

relatively to, other linux distros of course

wise forge
#

everything from web becomes available to be run without installation

#

just docker run stuff (it will pull stuff from remote docker registry automatically)

gilded cove
#

lmao "docker captain"

#

also aint that kubernetes logo

wise forge
#

nope. that's docker logo. Kuber has... ship steering wheel as logo

gilded cove
wise forge
#

and docker and kuber are veeeeery connected

gilded cove
wise forge
#

kuber essentially is running docker built images

#

container scheduling and lifecycle regulating multi server system 😊

gilded cove
#

i have a .py file that i want to run by double clicking. this file already has the subprocess stuff to allow it to be double-clicked. however it just opens the pyfile in gedit.

the deps are inside .venv which has to be used to run it in a virtual environment:

from subprocess import run
from pathlib import Path
from sys import platform
PROJ_DIR = Path(__file__).parents[0]
python = PROJ_DIR.joinpath(".venv", "bin", "python3")
if platform == "win32":
    python = PROJ_DIR.joinpath(".venv", "Scripts", "python.exe")
app = PROJ_DIR.joinpath("src", "read_temps.py")
run([python, app])
#

how do i do it in linux?

untold socket
#

The recommended way to get the current Python executable program is with sys.executable

#

Oh you need to use the venv's executable, right

#

Activating the virtual environment will change your shell’s prompt to show what virtual environment you’re using, and modify the environment so that running python will get you that particular version and installation of Python.

#

So you need to run three commands in one subprocess:

  1. activate the venv (platform dependent)
  2. run python on the venv's main program file
  3. deactivate the venv
wise forge
untold socket
#

Activating a venv is an alternative to specifying the interpreter path yourself

untold socket
#

I like how the tutorial says

Once you’ve created a virtual environment, you may activate it.
but not that it's unnecessary to run a program in it

untold socket
#

Ah, my bad again, those are activation scripts

#

The path to the Python executable program for venvs is <venv>/bin/python for POSIX and <venv>\Scripts\python for Windows it seems

gilded cove
untold socket
#

Use those as python

gilded cove
#

my venv is inside the project folder, not in user though

untold socket
#

So you should be good to go with that

#

The documentations don't cover Linux specifically, so it's probably like POSIX

gilded cove
#

not a double click, but whatever

untold socket
#

I mean I see the code

#

But I can't believe my eyes

gilded cove
untold socket
#

That's not the problem I thought you were having

#

Open the file with the venv's executable

gilded cove
#

i did chmod u+x <thefile.py>, in the context menu Run as a program.. pops up, and every time i try it it just closes straight away. it's a behaviour i have seen before and i can probably figure it out

untold socket
#

Double clicking has a different file association it seems. Regardless, running a project which should be run in a virtual environment by double clicking the main program file isn't guaranteed to run it in its intended virtual environment

untold socket
untold socket
gilded cove
#

the only thing i have setup is my python dev stuff kek

silk herald
silk herald
#

well that sounds like its running but crashing

#

so run it in a terminal

#

also you will prolly want a shebang at the top if you want it to run as a script

#

you have to tell the system what interpreter your script should be run from

#

so just change it from the path to bash to the path to the python interpreter binary you wish to use

silk herald
gilded cove
gilded cove
#

i was looking for tutorials on how to install ffmpeg, i was going to try to build from source but some deps are unavailable from apt so i just gave that method up.

i landed on a page that says "add the universe repository to your linux and install ffmpeg from there.". a bit of reading reveals that ubuntu has 4 main repositories namely main, universe, restricted, and multiverse.

kinda weird how I didn't get notified by atleast ubuntu itself of the existence of these 4 main repositories kek

#

huh it's all in software & updates
well that's my bad i guess

#

maybe now my problems with uninstallable deps can be resolved since i just added the universe repo

formal schooner
lapis cloud
#

ffmpeg is in the repos, yes

#

though actually, question of my own: is there a way to get latest ffmpeg from the ubuntu repos if I'm not on mantic ubuntu? the last available version in the repos for my ubuntu release (linux mint, so ubuntu jammy) is old.

gilded cove
gilded cove
#

im on 22.04LTS if it matters

humble falcon
#

Snap might be more up-to-date tho

lapis cloud
#

no snaps on Mint, though I could allow it in theory

#

different question then: if I want to stop using the ffmpeg package and instead install ffmpeg manually from the binaries, what do I do with fact that some packages depend on it?

formal schooner
kindred basin
#

Or use some sort of environment manager

humble falcon
lapis cloud
#

i'm aware, i mean that I don't want to allow snaps.

lapis cloud
gilded cove
#

seems like i have been running ubuntu with secureboot off 💀

#

idk what that implies but mokutil says i was in setup mode

kindred basin
gilded cove
#

I see
I needed it to install linux amd graphics

#

Its fun when you're trying to install drivers and it errors out, and turns out I tried to install 20.04 drivers on 22.04

#

i can't read apparently

gilded cove
#

one of the main reason switching to linux is to finally get away from incessant 'update to the latest version' nagging

what happens to a linux distory when it is no longer supported? for example im on ubuntu 'jammy' and it is supported up to 2032. what happens after that?

violet dove
#

I've recently decided to start off with Linux. For this, I am going to intall Ubuntu. However, 23.10. as the latest version or 22.04.03 LTS as the previous version?

vestal turret
#

LTS is the long term support release, it's supported untill june 2027, while 23.10 is only supported untill july 2024

#

It's a choice between newer packages and longer support.

violet dove
vestal turret
#

Most professional use is on LTS

violet dove
#

I heard of Ubuntu 24.X LTS coming 2024. Wouldn't it make sense to update then?

vestal turret
#

What is your goal?

violet dove
vestal turret
#

There are a lot of different distributions.

#

But wether you want to use more up to date packages, or the LTS release that's something you'll have to decide for yourself here, there's arguments for both.

violet dove
#

Will you be updating to 24.X LTS as soon as it is released?

vestal turret
#

I'm not using ubuntu myself, I'm using a rolling release distribution that doesn't have versions.

#

But ubuntu is a good place to start, and switching to the next lts once it comes out seems like a good idea if you want to get more familiar with it.

vestal turret
#

It just means that it's constantly updating\

violet dove
#

Alright, it was a nice chat with someone from the Moderation Team. Have a good one! 👍

vestal turret
#

That doesn't mean I'm actually knowledgable at things though 😅

formal schooner
#

if you want long term stability, use upstream debian imo

#

or red hat or suse, being backed by companies that primarily serve "enterprise" clients

#

freebsd seems pretty stable too but i haven't used it much

gilded cove
#

also can i just say tty is a blessing

#

i f'd up something earlier in the day and it only took me under half hour to fix and get back to a working boot

formal schooner
#

and yes, if you're tinkering with your system at all, knowing how to get around in a purely text console environment is essential

gilded cove
gilded cove
formal schooner
#

i personally do not like ubuntu at all (snaps suck, they tend to customize things so you end up having to deal with a lot of ubuntu specifics, and they do some really weird things with how they pull in upstream debian packages) -- but it works for a huge number of people and it's hard to argue with that

formal schooner
gilded cove
formal schooner
#

the linux console is a variety of terminal aka terminal emulator

#

what desktop environment are you using?

gilded cove
formal schooner
gilded cove
#

or are you talking about gnome?

#

yeah gnome

#

i dont really know what that is

formal schooner
#

yeah, so there's a program called GNOME Terminal or something like that

gilded cove
#

but its everywhere

#

aaah

formal schooner
#

that's also a terminal, it's in the name

gilded cove
#

im probably using that right now

#

i haven't really customized anything on this distro

formal schooner
#

GNOME Terminal, KDE Konsole, urxvt, etc etc all are "terminals"

gilded cove
#

i see

formal schooner
#

they basically just relay text back and forth between your user interface / keyboard and other programs

#

usually when you open a terminal, the program you see is called a shell

gilded cove
#

there's gnome-shell in my processes so im probably on gnome terminal

formal schooner
#

Bash is a shell

#

i believe gnome-shell is actually what runs your graphical desktop

gilded cove
#

oooh

formal schooner
#

that's also a "shell", albeit a different kind. very broadly, a shell is any program that allows you to interact with your operating system. think of it like a shell on a seed or a nut. inside is the "kernel" -- the inside parts of the operating system. users usually don't want to interact with that directly, so they are provided with some form of a shell around that kernel.

#

usually when technical people say "shell" without further qualification, they mean a text-based shell like Bash

#

and often they'll say "graphical shell" to mean something like GNOME Shell or the Windows shell

#

hopefully that gives you a clearer sense of what you're working with

silk herald
jaunty pine
#

What is the “GNOME Shell”, then?

gilded cove
#

uhh why is the driver i installed yesterday doing this
im doing nothing at all

#

is it compiling something

fickle granite
#

sure looks like it

gilded cove
#

i did run apt update

fickle granite
#

I don't *think * apt update builds stuff from source

#

trace the "ancestry" of those processes -- i.e., find the parent of 55519, and its parent, &c

gilded cove
#

which is weird
was trying to install flatpak and got a message that something it needs is being held back by unattended upgr

#

so it's probably that

fickle granite
#

that's a bit too deep in the Ubuntu weeds for me 😐

gilded cove
#

seems like it's done

#

the heck was that

#

well lets see if i can install flatpak

kindred basin
#

unattended upgrades is a service that runs every so often to keep your computer with up-to-date packages. That CPU usage is probably from one of those upgrades. The compilation is from building the drivers (see: dkms).

gilded cove
#

i appreciate unattended driver installs, but dang that almost prompted me to reboot my machine because i assume something was glitching out

violet dove
#

I have a problem with my terminal in Ubuntu - I cannot start it!

royal wasp
violet dove
#

The normal way to open the terminal is by double clicking at the icon or using the command Ctrl+Alt+T, however none of these methods work!

royal wasp
#

try rebooting.
if you already did that, then you can try this:
press alt + f2
type in gnome-terminal and press enter

#

if this doesnt work either, you can use the tty console

violet dove
royal wasp
#

you can download another terminal emulator... maybe in ubuntu software there is one

#

such as terminator or xterm

violet dove
#

What about TTY console?

royal wasp
#

you could press ctrl+alt+f2 to enter your tty CLI... to go back to graphical you press ctrl+alt+f1

violet dove
#

I cannot even see my password when typing. Is that a normal behavior in Linux?

violet dove
#

Alright, let me just try that...

royal wasp
#

you can run sudo apt-get -y install xterm

#

this will install xterm, another terminal emulator

#

then go back to graphical (ctrl+alt+f1)
press alt+f2 and type in xterm

violet dove
#

Is there a way to copy + paste commands into the console?

royal wasp
#

not really

#

sudo apt install xterm works as well

violet dove
#

It says "{my_username} is not in the sudoers file. This incident will be reported"

royal wasp
#

huh. is this your personal PC?

gilded cove
#

oh wait you can enter tty from the gui desktop
TIL

violet dove
fallow tusk
#

That's normal for a fresh install. You should log in as root and add yourself to the sudoers file

violet dove
#

It says: "84 updates can be applied immediately. 60 of these updates are standard security updates."

fallow tusk
#

Not sure...I would have expected Ubuntu to sort that out in the installation setup

spark mulch
#

Ubuntu generally puts the first user into the sudoers file.

violet dove
#

It's not even been 24 hours since I can call myself as a Ubuntu user. That all seems too complicated all at once

gilded cove
#

i installed ubuntu 3 days ago and i don't think i had the problem you have right now
are you on jammy as well?

royal wasp
fallow tusk
#

(The Arch wiki is a great resource, even if you're not using Arch! Just ignore anything to do with pacman - the Ubuntu equivalent is apt, but the syntax is different)

violet dove
#

I've only downloaded: VirtualBox 7.0.12 + Ubuntu 22.04.03

fallow tusk
violet dove
fallow tusk
#

It's not a big issue, I'm just surprised that there are that many updates for a newly installed system. I'd have expected a newly downloaded installer to have less...but tbf, I'm sure I've had the same in the past.

royal wasp
#

the weird thing is that your user doesn't have sudo permissions out of the box

fallow tusk
#

Unless you added the user later

royal wasp
#

did you install ubuntu from scratch? or you downloaded a VB image?

violet dove
#

I clicked on Download

fallow tusk
#

So from scratch. Into a VM?

#

Or dual booting?

royal wasp
#

the username you specified during the installation of ubuntu is the same you're using right now?

violet dove
royal wasp
#

what do you mean by {my_username}_vm?

#

in the tty, you could run su root
and try to put in your password...

violet dove
#

What are the next steps I should take?

royal wasp
#

is there a user named puvude?

violet dove
#

Now it says: root@ubuntu-vm:/home/puvude_vm#

royal wasp
#

nice =)

#

now you have full access...
but remember, with great power comes great responsibility

royal wasp
#

to include your user puvude_vm in the sudoers file

royal wasp
#

then you can use sudo normally

violet dove
#

What would be the next ideal command to type? I guess it's sudo apt install xterm

spark mulch
spark mulch
violet dove
spark mulch
violet dove
spark mulch
violet dove
#

I've typed the exact same command again EDITOR=nano visudo: it has saved my changes

spark mulch
#

Great

#

Then you should be able to go back to the normal GUI mode, and try to open xterm there

violet dove
#

It says "Save modified buffer? Y: Yes, N: No, but I cannot type Y for Yes

spark mulch
#

What do you mean by "cannot type y"?

violet dove
#

Yes, xterm has finally opened itself 👍

spark mulch
#

🎉

violet dove
#

Will I never be able to open Terminal?

spark mulch
#

You can try installing gnome-terminal

#

I'm guessing that's what that is

violet dove
#

Is the command sudo apt install gnome-terminal?

spark mulch
#

Yes

violet dove
#

It says that gnome-terminal is already the newest version (3.44.0-1ubuntu1)

spark mulch
#

Yeah, that's both strange (why can't you start it then) and not strange (it should come pre-installed)

#

What if you start it with the same method you use for starting xterm?

violet dove
#

So what do I have to do about it?

#

Whenever I click on the icon of Terminal, it loads on the left upper corner (next to Activites) for about 3-5 seconds and then disappears without opening the application.

spark mulch
#

You can at least pin xterm to the sidebar thing, and remove Terminal from it

#

If you do alt + f2 and type gnome-terminal, does it work?

violet dove
#

It does not work, it does not open

spark mulch
#

I have another idea: Start xterm and run gnome-terminal from there. Then you might see an error message that could help us further.

royal wasp
#

you might try sudo apt remove gnome-terminal
then sudo apt install gnome-terminal

#

to reinstall... maybe it works

fallow tusk
#

I wonder if the initial installation process was somehow not completed - that might explain the two oddities - not having sudo access, and not being able to launch terminal

violet dove
#

There is an error I see

violet dove
#

How to copy text from xterm?

spark mulch
violet dove
#

Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached

spark mulch
#

Google tells me that's a problem with your locales... it really seems like the installation somehow didn't finish..

violet dove
#

Isn't there a way to completely reboot the system as a whole?

royal wasp
violet dove
#

You mean I can remove/reinstall that?

royal wasp
#

yes

violet dove
royal wasp
#

I have reinstalled ubuntu countless times lol

it happens

violet dove
#

You know what? Let's give it a try!

royal wasp
#

that's the spirit :D

violet dove
#

Here we go again... Wish me luck! 🙏

#

With or without Guest Additions?

fallow tusk
#

With

#

The guest additions allows you to use the clipboard between the host and the guest (among other things)

violet dove
#

What about the checkbox?

fallow tusk
#

Either way - that just decides whether you can use an EFI partition or just GPT (iirc). I would enable it, personally. But the installer should handle either way

violet dove
#

Is that necessary for me?

fallow tusk
#

They're just two different ways to organise your disk - the EFI is the more modern form, but it won't make much of a difference for your VM install

violet dove
#

What about this?

fallow tusk
#

Give it enough for the system and your user area, at least. I'd want at least 100GB, but that will also depend on how much of your host system's hard drive you can afford to use

violet dove
#

What about Pre-allocate Full Size?

fallow tusk
#

I generally do. If you don't pre-allocate, it will grow dynamically, which can cause issues if you fill your host's hard drive and don't leave enough space for the dynamic allocation to happen in the VM later on

violet dove
fallow tusk
#

I would, yes

violet dove
#

I removed my Ubuntu and reinstalled everything: Conclusion: Terminal does not open

fallow tusk
#

That's odd.

violet dove
#

As if someone would have hacked my machine or something...

royal wasp
#

my man, I think your download got corrupted smh.

violet dove
#

😭

royal wasp
#

your Ubuntu ISO

#

you could try to get the hash and check

violet dove
#

ubuntu-22.04.3-desktop-amd64.iso

violet dove
royal wasp
#

a hash is function that calculates a unique integer for some data.
and it should be the same every time.
it's like a fingerprint of your file.

violet dove
#

What is the solution to all these problems I somehow have?

royal wasp
#

Each ISO has it's hash. You can check on the ubuntu mirrors:

#

it's the sha256sums there

royal wasp
#

or if you just want ubuntu working you can use a already preinstalled imagel

violet dove
royal wasp
#

you just remove the old one

violet dove
#

I'm currently reinstalling ISO. What is the alternative, in case it does not work again?

fallow tusk
#

What's your goal for installing Ubuntu?

violet dove
#

How long did the installation process (after setting the configuration) take on average?

royal wasp
#

30min sounds about right

fallow tusk
#

Mine's just finished installing; I started it about 20-odd minutes ago

violet dove
#

What I just did is installing the same ISO again, so ...(1).iso and setting all the configurations as usual. Let's hope, it will work out this time

fallow tusk
#

gnome-terminal started for me from ctrl-alt-t

#

My user is not in the sudoers file, though, so that might be normal

royal wasp
#

although I think Debian is like this

#

and gnome-terminal should always open, yeah

formal schooner
royal wasp
#

I have not yet used the 2023 version though

violet dove
#

I've got something to say: It does not work

#

However, I've watched a youtube video, where they told about the same problem. You need to change the language once and restart it. After logging in, the Terminal should open as intended...

royal wasp
#

huge L

violet dove
#

I've wasted so much lifetime, I could be more productive

royal wasp
#

I don't consider it a waste of time.
You have learned much and did many things you never did before

#

;)
that's learning

#

linux is like that, and working as a sysadmin I assure you, it could be much worse lol

#

I recommend you to try out other terminal emulators too, besides gnome-terminal...
I personally use terminator, but there are so many others.

but in the end of the day you just need a black screen to access your shell

violet dove
#

I thank anyone, who followed along my path solving the problem 👍

gilded cove
#

is the terminal problem related to them installing it inside a vbox?

jaunty pine
#

KDE Konsole is the best terminal emulator. Themes, tabs, split windows, monitoring for activity/silence ... what can’t you do?

kindred basin
#

It has a dependency on Qt for theming and other dependencies that need to be pulled (parts of KDE and some other misc libs). Otherwise, it is quite a featureful terminal emulator.

wise forge
#

i prefer to use Konsole due to being nice default though

jaunty pine
kindred basin
#

no why would anyone need an exotic te?????

#

or any productivity software

#

lol

gilded cove
#

@green tinsel so why it bad

green tinsel
#

tldr snaps are slow

#

and controlled by canonical

gilded cove
green tinsel
#

and the OSS community generally doesn't like that

gilded cove
#

my laptop's already slow so what's another year of waiting

green tinsel
#

anyway

#

you were asking about how to install vbox on ubuntu

#

turns out there's an apt pkg for that

#

sudo apt install virtualbox

gilded cove
#

i shoulda apt-cache search beofer asking

kindred basin
#

Using qemu+libvirt+virtual machine manager gui is pretty good for virtual machines imo

#

I believe qemu/kvm is more performant

slow lake
#

@dusty willow What do you need help with?

dusty willow
#

What does the crontab configuration file look like?

slow lake
#

Typically they look like this:

* 2 0 * 4 /root/backup.sh
dusty willow
slow lake
#

then put in your config and save it

dusty willow
#

Nice.

slow lake
#

run:

crontab –l

To confirm that it worked

main olive
#

hi y'all

#

for those on Windows machines who write python scripts

#

do you link your developer enviro to your WSL/Ubuntu python install?

#

do you uninstall python from windows?

rotund girder
#

plotting directly inside/into the terminal, anyone got something dumb-simple? Like bargraph with ascii, for example

silk herald
rotund girder
#

@silk herald I ended up using wezterm, that way I can use the same terminal in windows if I need to. Is there any high level objective comparison between the "best"/popular terminals?

royal wasp
#

The main problem is, I ssh into many legacy systems. So the TERM xterm-kitty doesn't function properly

rotund girder
#

oh, and u can't stop kitty from setting that envvar?

#

I do work on my workstation 99% of the time. I'm thankful. 👼

ember quiver
spark mulch
main olive
#

For starting?

#

Doesn’t wsl limit you to like, not being able to display or view files

rotund girder
#

If I'm working remote from my windows laptop, I just start wezterm and ssh to my Linux machine. (I use neovim as my editor)

spark mulch
main olive
#

Any data vis or graphical output of any sort?

spark mulch
#

Not really, no. There were some web services, but IIRC I could use those from the browser in Windows-land

main olive
#

It’s driving me nuts that there is no unified approach to how windows users overcome this problem. I think the short answer is they don’t, they give up and buy a mac

#

Or just replace windows with Ubuntu as their primary OS

rotund girder
#

vscode is available on windows, I guess a lot of people use that

fallow tusk
#

VSCode also has a remote access addon that allows you to work in WSL, I believe. So, just like using it to access an ssh server, you can run VSCode on Windows, but actually be writing code on your WSL instance. (You can probably run an xserver and run Codium on the WSL and display it on the Windows via an X Server. I had various success with that in WSL1; WSL2 was supposed to be better at that)

silk herald
# rotund girder <@433027688534376458> I ended up using wezterm, that way I can use the same term...

ah cool
ummmmm, not that ive heard of,
I just get hints now and again

kitty is good for me and it can render images v well
alacritty was a little more janky but still good
vte based terminals ( like gnome terminal) should be getting better rendering soon
the kde terminal is good if you dont mind the gui at the top
foot terminal is pretty good

as for shells, it doesnt work well as a system shell, but nushell is really nice for day to day use, the key concept is that it replaces the strings passed through pipes with custom types
you can always read those half robotic autogen comparison articles but they are shit, just hearing different perspectives over time is probably the best

rotund girder
#

I think you see right, thanks for your insight.

#

I'm using wezterm, but I'm a bit worried because it's mainly a 1 person project and the number of issues is growing. It's working well for me now at least! 🙂
And it was the first open source project I donated to 🙂

main olive
#

Do you have to save it and view it through windows? What if it is an html file?

#

Err

#

HTML based image

silk herald
#

ig a lot of projects have little staff, ig it depends how often they work on it

#

and what their economic situation is

#

bye

fallow tusk
#

You serve it from WSL and display in in Windows, like Lev said. Or you run the webbrowser via the XServer

royal wasp
quartz cobalt
#

Personally, I have not noticed any difference in my VSCode experience between accessing a remote server and WSL

#

Back when only WSL1 was available, I had difficulty making my GPU available to ML libraries. However, this problem seems to have vanished with the introduction of WSL2

main olive
main olive
# quartz cobalt yes

I don’t understand. I only use VScode to write Python. I never look at files or directories in it

fallow tusk
#

How do you write Python in VSCode without seeing what file it's being written to? :)

#

...or start a project without specifying what directory it's in?

quartz cobalt
#

If you didn't know before, now you do xD

ember quiver
#

Emacs a bit too but the GUI when launching from WSL is a little glitchy and annoying

silk herald
#

you can probably wrap vscode in a script that will make files in /tmp

#

otherwise, i like to use ipython interpreter,
then i can use a nice prompt with highlighting and autocomplete
and if you press f2 then it opens the current entry in the editor defined with the env var $EDITOR, then you can run that

fallow tusk
# silk herald just for testing lil scripting snippets?

I think you missed my meaning here. I was suggesting that it's difficult to not see files and directories in VSCode (without, as I think you're suggesting, going out of your way to do so). Perhaps it's easier not to see directories, but it does expect you to create a file for your script to be run - and perhaps overkill if you're not doing that.

silk herald
#

scripts are designed to be written roughly at the time of initial use

silk herald
#

if guis ever get as good as scripts at being able to perform complex behaviour at a whim, then they will just begin to resemble scripts

fallow tusk
silk herald
outer orbit
#

Hello, I see an interesting command in a conversation. It's :()(:);:. When I execute it on my phone, I got this. Can somebody explains it to me what it means

kindred basin
#

Simple explanation: That’s a function that calls itself. It keeps calling itself, but then the system ran out of memory and it couldn’t call itself anymore.

outer orbit
#

But how it defines a function here

kindred basin
#

That’s a pretty malicious command and it would have exhausted your computer memory had you ran that command on bare metal, potentially locking up your computer for a while

kindred basin
kindred basin
outer orbit
#

Ah, I will be more careful next time

violet dove
#

On settings on Windows Terminal, I've got two versions of Ubuntu. One is 22.04.03 with the Ubuntu icon and one is 22.04. with the Linux icon. What does that mean exactly? Should I delete one?

gilded cove
#

I know 22.04.03 is the current LTS
22.04, is idk

violet dove
#

It looks like this

safe solstice
#

Tux is a penguin character and the official brand character of the Linux kernel. Originally created as an entry to a Linux logo competition, Tux is the most commonly used icon for Linux, although different Linux distributions depict Tux in various styles. The character is used in many other Linux programs and as a general symbol of Linux.

violet dove
safe solstice
#

i dont know why you have something installed on your computer

#

thats probally a question that you should be able to answer

violet dove
safe solstice
#

maybe, i dont use wsl so im not sure why would updating install a new one and leave the old version

royal wasp
violet dove
royal wasp
#

That command should go into your PowerShell (probably as admin). Sorry for not being specific.

violet dove
violet dove
royal wasp
violet dove
# royal wasp nein speak German XD

On settings on Windows Terminal, I've got two versions of Ubuntu. One is 22.04.03 with the Ubuntu icon and one is 22.04. with the Linux icon. What does that mean exactly? Should I delete one?

royal wasp
royal wasp
# violet dove

Well, if you're not sure, I'd avoid deleting either of them. Maybe your WSL instance has been updated to 22.04.3, but the image hasn't.

violet dove
#

It looks like this. I do not know what Azure Cloud Shell is used for

royal wasp
#

Azure is MS's cloud computing service. It may come preinstalled, like any other MS crap

violet dove
royal wasp
#

I don´t know if they have a free tier, and have not used azure that much personally.

#

AWS has a free tier for a year, if you want to learn cloud

violet dove
#

Do you recommend anything else I should get for WSl 2?

royal wasp
#

If you want to learn docker you could try out docker desktop... Although my experience with it on windows was pretty terrible lol

violet dove
#

I heard that Docker is useful in terms of reliability between users.

royal wasp
#

docker is amazing. have you used github codespaces?

violet dove
#

No. What is that?

royal wasp
#

github has a feature that you can deploy a container (it's free for a limited amount of hours/month) to run the code in your repo

#

and it has a VS code instance builtin so you can connect directly your VS Code to the codespace

#

however it can be a bit tricky to configure if you don't know what you're doing

violet dove
royal wasp
#

do you know git/github?

violet dove
royal wasp
#

so they use a JSON config to build a container ready to run your app. it all resides in your git repository.
in practice, yes, the docker container deployed will have a directory with all your code

#

there are some templates for python, react and other stuff

#

you can access the container's terminal freely as well

#

pretty neat

violet dove
#

But I can do all of that by just downloading Docker and configuring it by myself, right?

royal wasp
#

yes you can... but on windows it's weird

#

docker desktop for windows uses WSL to instantiate your containers

#

it should work though

#

if your VM is still working, I'd recommend that you install docker on it to play around instead

royal wasp
#

I mean your VirtualBox VM 😅

#

if that is still up

violet dove
#

I'm kind of confused right now! Your mean my Ubuntu-shell?