« first day (1893 days earlier)      last day (3367 days later) » 

14:00
Hm. I'm doing OK on most courses
This is only possible, if you study plan isn't rigidly organised though. Only very few courses had formal participation requirements (e. g. "must have passed Statistics I to take Statistics II").
Although my grades are good, Electronics I'm pretty bad at (grades still passable though)
But last week for linux / scripting I got my first failure
the thing is, we only have labs. No exams for this so i can't pull back my grades unless I ace this assignment
Got a question though
You guys got 'stuck'(for lack of a better word) at the softlink part right? What exactly is wrong with it / am I doing wrong?
@MaartenWachters 1) it doesn't make much sense since you haven't told us what it's supposed to be doing and ii) it's a function that you are calling in your script but haven't defined it anywhere.
I understand
ln -s /usr/bin/bar /opt/foo
so I just need to create another function for the softlink now if I'm not mistaken
Yes. But what are you supposed to be linking?
14:06
create a softlink between a user and a group
he hasn't really explained it (like usual) but from my understanding if I delete the group it also deletes the users
I think like that
or if you're in the file path of that user, there is a file in there that once run it just opens that one group
Ran into an error fixed it :)
Um. None of that makes sense I'm afraid.
You can't create a softlink between a user and anything. Soft (or hard) links are for files/directories.
What does the assignment say?
Create softlink between group / user
I swear I'm not doing this to piss you off. His instructions are just mega unclear
@MaartenWachters I didn't think you were :)
I got a question though
But you can't link a user to a group, so he must have meant something else.
14:14
its again with calling the script to execute a case
Yeah?
When I do sudo ./scriptname.sh -u maarten (for the add user case in u)
it just does nothing
@MaartenWachters What does the script look like now?
Well I was getting the syntax errors out
Nvm. Need some time to think how to phrase this
This works:
while getopts "ugb: " opt; do
 case $opt in

 u)
    read -p "Wat is de naam van de user die je wilt toevoegen?: " username
    [ "$username" == "" ] && echo "Geen usename meegegeven!" && exit 1
    read -p "Wat is de groepsnaam voor de gebruiker?: " group_name
    [ "$(getent group $group_name)" == "" ] && echo "De groep bestaat niet, exiting"  && exit 1
       echo  adduser -m -g "$group_name" "$username"
   ;;
 esac
done
14:18
Yeah that's what I've got now
$ a.sh -u
Wat is de naam van de user die je wilt toevoegen?: foo
Wat is de groepsnaam voor de gebruiker?: terdon
adduser -m -g terdon foo
So when I do sudo ./scriptname.sh -u
Wat is de groepsnaam voor de gebruiker?: terdon
the issue is there
if i want it to add to stackoverflow (a group i dont have yet)
just gives me the exiting echo
@MaartenWachters Then it will exit.
That's what this line does:
so I need to call the make group bit first(-g)
[ "$(getent group $group_name)" == "" ] && echo "De groep bestaat niet, exiting"  && exit 1
14:23
It also doesn't help that I think he made some typo's in his slide
@MaartenWachters The script is structured so that you run it once to create a group and then again to create a user and add it to the group.
@MaartenWachters Which slide?
onetime he uses $group_name the other $groupname
Needs to be all the same if I'm not mistaken
I made it all group_name and it works, except it throws me error
mk_shared_folder : command not found
@MaartenWachters Yes, well, the mk_shared_folder is another function.
And yes, he has a typo there. It should always be $group_name.
I feel like I'm getting to understand it more and more. I really do
I see what you mean now
With the create softlink
user136984
If I were to install an AV in WINE, could I get it to also scan outside of its virtual drive?
user136984
14:33
And what I mean by that is, could it actually scan outside of the virtual WINE filesystems, and actually scan my entire computer?
@terdon is it possible to make a case that triggers when you do ./scriptname.sh help?
right now i've put my help inside case v
That's usually done with -h. Or in the absence of arguments.
I will do that, sounds easy enough :)
Hmm sudo ./scriptname.sh -h throws an error
weird
{
        echo "Druk -u om een user aan te maken"
        echo "Druk -g om een groep aan te maken"
        echo "Druk -b om een backup aan te maken"
        echo "Druk -x om een backup te restoren"

}
        h)
                display_help
        ;;
doesn't work
user136984
I am wanting to get the Comodo AV for Linux as I hear that apparently it is good, however I can only seem to be able to get it in rpm format, is there anyway I can install it on Ubuntu with that format? Or do I have to get a different one?
\o/
14:48
@ParanoidPanda alien is your friend if only rpms are available...
But what's wrong with clamAV? (that's what I use)
Hello :)
@cl-netbox good meowning
user136984
ClamAV isn't really for detecting Linux malware, is it? I mean, they apparently don't know of much, and I don't really trust the heuristics of ClamAV...
@Serg good ... my friend ! :)
14:50
Is terdon still here?
@terdon ^
@MaartenWachters Yes, back now.
@Fabby Hi old ... :)
I can just use echo's in my function right?
Yes but what you posted isn't a function. You need:
14:51
Hi @terdon :)
functionName(){
    echo foo
}
@cl-netbox hi!
I've done that
@cl-netbox fart? ;-)
display_help()
{
echo
echo
echo
}
Or function myName { echo CARP }
14:52
@ParanoidPanda Hi :) what linux viruses ? do you know any ? =)
@Fabby YES ... SIR ! :D (your way older ...) :D
So, I'm going to be getting raspberry pi . . . And my friend's sister in law has a son . . . Yesterday we were talking and she was saying she wants her son to kind of start learning the same stuff I do, so he has technical skills early to start . . . So I
@MaartenWachters Yes, that should work:
#!/bin/bash

display_help()
{
echo "I'm not much help"
}

display_help
user136984
@cl-netbox: Well, I don't think that I've come across any which are specific to Linux, but I have come across browser specific ones, and cross-platform ones...
I'm considering teaching him with raspberry to use Ubuntu and stuff. . . set up a minecraft server
user136984
Though there is a Linux-specific ransomware...
14:55
@ParanoidPanda so then with ClamAV you are good to go ... :)
@terdon For some reason it doesnt though
@MaartenWachters What are you running?
'option requires an argument --h'
sudo ./scriptname.sh -h
@MaartenWachters Did you add h: to getopts or just h?
user136984
@cl-netbox: That's mostly for Windows viruses though... I'm not sure if it detects any Linux ones or if its heuristics are good enough to pick up any new ones...
14:56
h)
display_help
;;
@MaartenWachters the : means the option needs an argument. You have used this: while getopts "ugb:h:" opt; do instead of while getopts "ugb:h" opt; do
It works. But why :o
we don't do u:g to call a group either?
@Serg Good idea!
yikes apple at it again claiming they invented everything:
@Serg I'd pay to join that
14:59
"Apple, the first major computer company to make Open Source development a key part of its software strategy..." stop. Stop right there.
@ParanoidPanda ClamAV was acquired by Sourcefire, which later was acquired by Cisco ... so I think they most probably will have reasonable heuristics ... :)
@cl-netbox I agree and said the same thing a few seconds before you! CC: @ParanoidPanda
@MaartenWachters What?
@terdon Why does the h need to be outsude ugb:?
@MaartenWachters I rarely take money as payment, but i do love when people give me delicious food :p
14:59
@Mateo Depends on your definition of "major"... ;-)
@Serg I'll make you a cake inside Minecraft \o/
@MaartenWachters It doesn't. It can be anywhere but it can't have a : after it. When you use h:, it tells getopts that -h should have an argument.
:) that might work
so now they are calling Google "minor"?
and RHEL, and IBM, and Microsoft, and Canonical, and Sun, and Oracle.
15:01
@Mateo How about IBM, Novell, RedHat, Canonical etc?
@Serg I like it when they pay me money and allow me to go shopping for the food and cook it for them!
yeah, those too
(shopping includes choosing) @Serg
Welp I live in Belgium so it's not like I can just walk up to @Serg and give him a cookie
@terdon so a h can never have :h
@Mateo Google gives back less to the community then Apple.
At least Apple gave us CUPS...
15:02
@Mateo I do respect Apple for taking Unix-like system, and putting it on a world map . . . but this whole business shark behavior is just . . . makes my respect for them drop down by 50%
@Fabby :3 I am not much of a cook, so i mostly enjoy my friend's cooking, and playing with their kids . . . .
They're so adorable !
@MaartenWachters What? No! Look, adding a : after an option tells getopts that the option needs an argument. So, h means a switch, no argument, just on or off. h: means an argument: -h foo. :h means nothing.
@MaartenWachters yeah, Belgium is a little far from Denver, CO
Ehh I think I get it terdon
@ByteCommander: Happy +200! ;-)
Congratz
@terdon can I haz a shell question now ?
nevermind, got it
15:10
shell question?
I got plenty XD
It's more of a rant . . .
I was reading /bin/which source
#! /bin/sh
set -ef

if test -n "$KSH_VERSION"; then
        puts() {
                print -r -- "$*"
        }
else
        puts() {
                printf '%s\n' "$*"
        }
fi

ALLMATCHES=0

while getopts a whichopts
do
        case "$whichopts" in
                a) ALLMATCHES=1 ;;
                ?) puts "Usage: $0 [-a] args"; exit 2 ;;
        esac
done
The author creates function called puts . . . which checks for korn shell version . . . if it's not korn shell that is default, printf is used, otherwise print
But . . . why not just use printf regardless of the shell ?
it's defined in every shell pretty much . . .
user136984
Could someone else please downoad this and just tell me what the SHA256SUM is? :)
user136984
@Fabby: Is there any way of changing a rpm to a deb then using alien? Because seems to only want to convert the other way round?
@ParanoidPanda I have read some time ago that installing this Comodo thing generated a lot of issues on many users' machines ! :)
How do go about restoring a backup in the same script @terdon (last piece of script :D )
15:19
@Rinzwind @terdon @muru well, since I am still on the roll here, I still haz a shell question . . . So, is there a sort of general guide on how to make POSIX-compliant, portable shell scripts ? Is there a sort of general rule on what to avoid and what to use ?
user136984
@cl-netbox: What kind of issues?
@ParanoidPanda system things ... AV apps are known for spreading their code deep and widely over OSes.
user136984
Anyway, I can't find its hashsums for it, nor can I figure out how to convert it into a compatible installation file so I probably won't install it...
user136984
@Zacharee1: Does your icon look fat to you too on one side?
user136984
On the right...
user136984
15:23
Because it looks so to me and I had the issue earlier...
user136984
Oh, not any more! :D
What do you mean?
user136984
I see @NathanOsman fixed the bordering :D
I'm gonna be back later folks, i forgot my laptop charger in another building
brb lol
user136984
15:24
If you look in the screenshot above your icon is slightly fatter on one side, not any more though... It goes back to normal when you type something.
@ParanoidPanda ¯_(ツ)_/¯
I've got an issue with my getopts
Since we did the ugb:h the b has the same erorr as the help function had beforehand
broke my script
@Serg The POSIX specs, I guess.
@terdon I fucked up my script
hang on
@MaartenWachters show me
15:33
how do I copy everything inside my vim
it won't scroll down when selectin,
@MaartenWachters on what OS?
Ubuntu
  #!/bin/bash

[ $(whoami) != "root" ] && echo "Run as superuser" && exit 1

display_help()
{
        echo "Druk -u om een user aan te maken"
        echo "Druk -g om een groep aan te maken"
        echo "Druk -b om een backup aan te maken"
        echo "Druk -x om een backup te restoren"
}


restore()
{

}

add_user()
{
        read -p "Wat is de naam van de user die je wilt toevoegen?: " username
        [ $username == "" ] && echo "Geen username meegegeven!" && exit 1
        read -p "Wat is de groepsnaam voor de user?: " group_name
@MaartenWachters Why did you add a : before u?
That's the problem.
When i remove it it gives me syntax error
What error? Come on, help me out here!
15:41
So whenever I run any of the cases now
Does it say line 18: syntax error near unexpected token }'`? That should give you a hint about where the error is.
line 17 : systax error near unexpected token '}'
So?
Where is the error?
Duplicate restore function?
No, empty restore function.
And duplicate but the error is because it's empty.
15:43
Okay but then I still have the illegal option all over again
on every singly case
Did you remove the : before the u?
You need this:
while getopts "ugb:xh" opt; do
The b needs the colon, none of the others do. It works fine like that.
One more thing, you don't want the `` here:
        [ "$(getent group $group_name)" != "" ] && echo "De groep bestaat, exiting" \ && exit 1
Remove it:
        [ "$(getent group $group_name)" != "" ] && echo "De groep bestaat, exiting"  && exit 1
It shouldn't make a difference, just ugly.
while getopts "ugb:xh" opt; do
doesnt work
Yes it does.
15:47
still gives me the illegal option
Look, don't tell me "it doesn't work". That's useless. Tell me the error.
WOW. Nvm i just brainfarted
@MaartenWachters Then you are probably trying to run it with a flag that doesn't exist:
$ sudo ~/scripts/a.sh -p
/home/terdon/scripts/a.sh: illegal option -- p
yah
I brainfarted
Just need to figure out how to make a restore function now
16:06
Welp, i 've left my laptop charger possibly at my friend's house . . . carp . . . cygwin it is for today !
@Serg Ouch. That sucks. Sounds like a good opportunity to install Linux on your Windows machine then :)
user136984
Food...
user136984
:D
@terdon yeah, except it's my university's Windows computer , and they won't be happy about that :). . .Thank gawd they have macs . . . But since I have cygwin, sure, i'll take that . . . Speaking of university computers, i once caught a guy who was booting an external hard drive with Debian on it . . .I'm of course happy when people use Linux, but it's kind of against the rules here to mess with the computers
Ah, there we go, Win 7 and cygwin . . . .I feel nervous when i don't have a terminal window open
@Serg That's not really messing as such. He wouldn't need to touch the local drive.
16:22
@terdon yup, as long as he doesn't mount the local drive, it's safe . . .but I ain't trusting people not to do stupid stuff . . .
Hello everyone! Does anyone here remember me from the old times? :P
@Mahesh if by old times you mean more than a year ago, then no :) But nice to meet you ! I am Serg
Definitely more than a year ago. Actually much longer than that, I'm afraid.
Nice to meet you too..
hi @Mahesh
Hola!
How are you?
@jokerdino surprise! I'm back! :D
16:27
Chat is kind of slow right now :/
It was always the same.
I used to hang around all day whenever I am online.
I slowly stopped being here, then since the last few months switched to a mac at work. I'm planning to ditch this for ubuntu again, I miss unity.
I usually just carry my laptop to college and use my Ubuntu 14.04 with something lighter than Unity, like Blackbox, Openbox, or Gnome , though there are times when i get into Unity and stay there for a week or so
Today, because of my forgetfulness , i have to suffer on windows 7 and use cygwin
Ouch. cygwin helps, but not having a true linux system kind of drives me crazy.
I had an affair with Gnome for a while. I like it, but am addicted to unity. :(
Oh, yes, same here. I get apprehensive without knowing I have real terminal, and there's TTYs in the background, and without all my scripts and functions
user136984
16:42
So there isn't a way of currently doing this then? Or some custom script/extension which can do so?
user136984
1
Q: How to rearrange the open windows in the Activities Overview?

Paranoid PandaIn the Activities Overview the current windows which are open are displayed and automatically rearranged, but what I would really like would be for me to be able to manually rearrange them, so for instance if I were to press a key such as SHIFT and then be able to drag a window so that all the ot...

I'm curious, what's the use case?
user136984
Look! My question got on the AU Twitter thing! :D
user136984
Why do some programs running from Terminal using '&' close when Terminal does and others do not? http://askubuntu.com/q/704304?atw=1 #commandline
@ParanoidPanda yaaaay, you're famous nuw
16:48
IIRC, Gnome supports filtering windows by typing their titles, so I never had a reason to want to manually organize them
user136984
Yeah, and it's not the first time it's happened! :D
user136984
@Mahesh: Typing their titles?
Umm, yep.
user136984
How?
If you are using FF, just enter overview and start typing fox
all firefox windows remain, and anything without a fox in the title bar disappears.
so it becomes easy to locate windows.
user136984
16:51
Nope, for me it just searches my computer for a file called "fox"...
user136984
What version of GNOME Shell are you running?
given that most programs also add the name of current document to the title bar, you can use it to filter by file names too.
user136984
Nope, it doesn't work for me...
I'm not running GNOME currently :( and it's been long since I used it. Wit. let me dig it up.
I'm very sure it is possible.
user136984
On my GNOME 3.18 installation it doesn't seem to be...
16:52
Gimme a couple of minutes, I'll go google
user136984
Unless there is a special key you have to press beforehand or something...
Hey @Rinzwind! How are you?
I'm talking about this, but for Gnome. May be an extension I used.
It may have been this one.
https://extensions.gnome.org/extension/562/window-search-provider/
Sorry, I have a terrible memory
user136984
@Mahesh: Well, that extension is not compatible with my version of GNOME...
Does Gnome still use compiz under the hood?
There's a compiz plugin that ships by default, scale window title filter or something.
user136984
No, it's GDM...
17:01
There's this and this other one
Though the UI is different and they don't work directly from overview, they achieve same functionality.
I remember I had a custom search provider or something that allowed me to do this from the activities overview. The effect was typing stuff searched for apps, open windows, files, etc
@ParanoidPanda speaking of window searching utilities, I think JacobVlijm wrote something like that once in python . . .one could also do something like that with a shell script and wmctrl or xdotool
@ParanoidPanda can i plz have one more close vote on this question ? There's a newer one askubuntu.com/q/278863/295286
Done.
@Mahesh thank you :)
You're welcome. :)
There was a time where we had special channels to just post dupes so that they can be closed fast.
user136984
Can I tell which application created a specific file or folder?
17:08
In general, nope.
but with some context, it might be possible.
some locations are by convention only messed around by some apps, or a search may point you somewhere.
What's the directory in question?
user136984
Oh just something created in my home directory...
@ParanoidPanda you can use lsof to find which app is holding file open, but not which program created a file
The name/path might give hints. ANd if you are lucky you might be able to catch the process while it is running by using lsof and friends, like @Serg said. Otherwise, no luck.
Also, if an app is a script, you could grep that script's source for filename, too :) If it's a binary app - nope
user136984
Why do I get this warning when running it?
user136984
17:14
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/120/gvfs
      Output information may be incomplete.
user136984
Is it that I need to run it with sudo or something?
yup
don't use sudo by default, but yep, lsof requires sudo.
user136984
Ok, I ran it with that... And now two errors rather than one! :D
Also fuse stands for file system in user space
user136984
17:20
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/120/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.
which is a super clever and crazy thing, actually. You can mount the internet as a file system and `cd google.com; echo "search terms" > search; cat results` to search google, if you just wrote a tiny fuse adapter.
And people wrote fuse adapters for youtube and a few other major sites.
And gvfs is Gnome virtual file system.
If you connect lets say your mobile via bluetooth and attempt to browse files, Gnome uses a bluetooth fuse adapter to show the files in `/run/user/<uid>/gvfs/obex:<bluetoothid>/...`
user136984
Ok, but what's my error about?
@Mahesh wut ? O.O i can mount interwebs ?
Common culprits: Media players - MTP, Bluetooth devices - OBEX, FTP, Webdav,...
did you use any of these from nautilus or elsewhere?
@Serg yep, you most definitely can. The fuse adapter will be just a couple hundred lines in C, actually.
user136984
No, I don't think so...
user136984
17:27
Also, VTC this Minty question as off-topic.
@ParanoidPanda gvfs does not play well with lsof. :P Pretty much anything under /run does not play well with most standard tools.
@Serg if you are interested start reading from here: http://fuse.sourceforge.net/
And you should be able to mount interwebz in no time.
I'll probably stay away from that for now O.o or i might break things . . .
Hahahah
I don't wanna LOL cats videos to be gone from the web :D
I broke things constantly for a while before I learned to find my way around
There was a time when I used to reinstall ubuntu every week, because I made it unusable.
And just when I left ubuntu about 4 months ago, I could run a sudo rm -rf <the scary root> and still recover everything in 5 minutes flat
17:34
Recover from sudo rm -rf / ? wow, how ?
btrfs snapshots to the rescue. So I could just say btrfs snapshot, then screw up anything whichever way I want, then ask btrfs to discard all changes from the last snapshot
eh, i've been breaking my ubuntu a little bit at first, but i try not to right now
It is marked beta, but I have used it for over a year with no issues.
Hi there anyone was trying to set up a TOR hidden server? , im geting kind of a permission server...
Dec 05 12:29:53.000 [err] Couldn't write generated key to "/u/apps/private_key".
root@ubuntu:~# ls -lah /u/apps/
total 8.0K
drwx------ 2 debian-tor root 4.0K Dec 5 12:30 .
drwxr-xr-x 3 debian-tor root 4.0K Dec 5 10:53 ..
The install script was run as root?
17:37
yep
root@ubuntu:~# cat /etc/tor/torrc | grep 'Hidd'
HiddenServiceDir "/u/apps"
HiddenServicePort 80 127.0.0.1:80
im writing an ansible playbook to deloy them as easy as possible, but i cant make it work even manually :(
> You're going to want to change the HiddenServiceDir line, so it points to an actual directory that is readable/writeable by the user that will be running Tor. The above line should work if you're using the OS X Tor package. On Unix, try "/home/username/hidden_service/" and fill in your own username in place of "username".
Is the tor service running as `debian-tor`?
okay thanks
i dont have any user but i'll create one
cheers
wait, you should not have to create a new user.
look at top or something and see what tor is running as.
If you installed it with apt, most likely it is debian-tor
And in that case the permissions are already correct.
ps -ef | grep -i 'tor'
user136984
17:55
Both your icons are fat now! @Zacharee1 @ByteCommander :D
user136984
noooooo
Eew, it's indeed fat!
user136984
Do you see it when it is the case or only me?
it's not fat, just slightly bubbly
user136984
17:56
(It's gone now...)
@Fabby Thanks for the...
:D
user136984
Does anybody here run Kubuntu?
user136984
I'm going to give it a go in a VM...
@ParanoidPanda good Ai-dee-ah . . . i will do the same, once i get my poor laptop back to the charger
but first i need more RAM
and more coffee
and a million dollars
and girlfriend . . .
user136984
@Serg: Why don't you just move to China? :D
18:03
@Serg and lower expectations... :P
user136984
Well, that might sort the last one out at least...
Anyway, I have to head back into the kitchen... Bye all!
user136984
:P
user136984
@ByteCommander: Bye! :)
@ByteCommander my expectations aren't that high . . . I can settle for 500, 000 dollars too :D
18:04
@ByteCommander : congrats ... and goodbye :)
@ParanoidPanda no money to move yet, currently my bank account has 985$ and couple cents
I will leave as well - see you - bye :)
bye,
@cl-netbox o/
user136984
@cl-netbox: Bye! :)
@Serg sleep well :)
@ParanoidPanda goodbye :)
user136984
18:06
Hmm... You know, I'm think about moving to Japan...
OK, I lied , it's 966$ now . . . digital ocean and parking fee got subtracted this morning
@ParanoidPanda Japan , I'm sure, is pretty cool, though i've never came in contact with Japanese people. But it should be pretty peaceful there and friendly community
user136984
@Serg: Have you tried Sushi?
@ParanoidPanda oh yes, i love sushi. O.O Speaking of which, i need to have some sushi some time, haven't had it in a long time. . . .also i am hungry right now
user136984
@Serg: Have you tried their sweet omelet?
@ParanoidPanda nope, I haven't
Looks like my server has been probed by the botnet mafia
user136984
18:18
@Serg: You should definitely try it! It's really nice!
user136984
They also have a really nice... Uhm... Duck one I think...
user136984
There was a really amazing Sushi place near to where I live with a proper Japanese Sushi chef who would prepare it in front of you with fresh ingredients, but it closed down recently so I haven't actually had it for a while... :(
@ParanoidPanda my best friend's sister in law has been cooking duck and goose for us couple times. I love it. In fact I love her cooking in general . . .
user136984
Yeah, ducks really nice! I don't think I've ever had goose though...
There's couple good sushi places in Denver, though i mostly go to Sushi Katsu . I used to work a little bit in Dragon Boat - my other best friend works there. Lovely place, it's like half Chinese food , half sushi
user136984
18:22
Sounds great! :D
user136984
I can never decide whether I like China or Japan more...
:D
user136984
If China could just give Japan all its Pandas that would make my decision much easier! :D
Lol, China and Japan have kind of tense relationship because of World War 2 . . .
So i doubt Pandas are going to see that much of Japan
I'll go for more nicotine
brb
18:48
Aaand I'm back

« first day (1893 days earlier)      last day (3367 days later) »