« first day (2119 days earlier)      last day (2849 days later) » 

2:15 PM
guys, shell scripting noob here
I'm getting an 'unexpected operator' on lines 5 and 8 in the following, but for everyone else (on stackoverflow) it works, what am I doing wrong?
#!/bin/bash
sitemap=$1
is_sitemap_index=$2
echo "$sitemap"
if [ "$sitemap" == "" ];
then
	echo "No sitemap given."
elif [ "$is_sitemap_index" == "" ];
then...
 
if [ "$sitemap" -eq "something" ]; then
 
@pythonian29033 Depends. What is $1? Anyway, you need to quote it:
sitemap="$1"
@CodeX That's only for arithmetic comparisons.
 
@CodeX I get an invalid number when I do that
 
2:30 PM
@pythonian29033 the details will depend on what you're running this on. Why don't you post a question on the site? That way you can give us all relevant details.
 
@terdon the command I'm using to run the script is: sh run_visual_test.sh "http://80twenty.dev/sitemap_index.xml" "sitemap_index"
I just put quotes around the $1 and $2, still getting the same, I'm about to shoot myself!
@terdon will do so then, but won't it get voted out for being a programming error?
 
@pythonian29033 Works fine here. Although that really isn't the best way of doing it. Anyway, your problem is almost certainly that you're running it with sh and not bash. Try the same thing with bash.
And I'll be back in a while. Post a question if you're still having problems.
 
@terdon it worked! :-D
but why can't I run it with bash ('_')
 
You can. You were running with sh, not bash
 
@terdon sorry I meant why can't I run with sh
does mac have bash? I'm the only guy here running a non-mac (-_-)
 
2:46 PM
@terdon @pythonian29033 oh I see
I am not good in shell script either .. just made a simple one few days ago for an info bar
 
@pythonian29033 yes. The only reason you were having issues is because you were explicitly calling the script with sh
You should instead make the script executable and just call it by name
chmod +x script.sh and then ./script.sh
 
3:41 PM
user image
4
 
@Seth SHHHHHHHHHHHHHH
 
That's not how that meme worked though.
 
btw did anyone else check out Test Shot Starfish after last night's SpaceX livestream?
 
4:31 PM
1 day
 
4:54 PM
2 day - Shia LaBeouf
 
5:39 PM
Panda wishes
so 1 year is the most you can get for a suspension
is it allowed to just immediately suspend someone after that suspension is up?
 
user136984
@Seth: Are you around?
 
Kinda
What do you need?
@Zacharee1 there are ways around that
 
user136984
@Seth: Could I just have a quick private word?
 
@Seth I noticed you retweeted my AUDL disc retweet. Do you watch AUDL too?
 
@RPiAwesomeness Not regularly.
But I like ultimate.
 
5:53 PM
Nice
 
0
Q: Launch a basic GUI / Image on startup before login

NimmSo I've written a simple UI in C. Its read only and displays system information like disk space, network info, etc. I am running ubuntu server 14.04 and currently when the appliance starts up I am prompted with the classic ubuntu text login and password prompt. Instead, I would like my program e...

 
\ o/ Woooo , this is a weird morning
 
@Serg What's going on with the pull?
 
@BharadwajRaju I'm considering rejecting it. I'm not quite happy with using wget in the install script
 
Hi.
I awoke this morning to someone outside using what sounded like a radial saw.
Which is loud.
 
6:03 PM
@BharadwajRaju by the way , i rewrote the indicator with different API. It works in Mate properly now.
 
@Serg ok, I shall change it to a 'normal' deb package.
 
@BharadwajRaju It is preferable to include everything in the DEB needed to run the application.
Let me know if you need any help.
 
although note that the package would need rebuilding each change.
 
@BharadwajRaju can you wait until i commit some changes to the script ?
 
6:09 PM
@BharadwajRaju I realize it will need rebuilding. I think after these changes I will stop adding anything else
Will need to meow-on to new prozhektz
 
Is it possible to simplify the echo statement in this bash script --> pastebin.com/raw/rF4BxTkr we do this via puppet tool, however at times in few machines we don't want to add it to puppet so that time we usually create users manually..
 
@karthick87 yes, use for loop to loop over files. You want me to sketch it out for you ?
 
@Serg sure if you can help me out.
 
@Serg thank you :) let me check out
 
6:15 PM
@karthick87 Here you go, adjust files_array as you need. Also remember to quote variables properly and there must be no space after \ , only newline immediately following
Shower time , bbl
 
@Serg files_array can be placed after done ?
 
@karthick87 what do you mean ?
files_array must be declared first before using in for loop
 
@NathanOsman That was just Zedd. He came to the concert a little late
 
@Serg is this format correct pastebin.com/raw/YzcEWtZx ?
 
I love it when Debian adds a package and Mint does too - with a different name... ಠ_ಠ
 
6:25 PM
1
Q: Screen: List Windows in Session (Non-Interactive)

Bradley OdellIs there a way to list the windows of a screen session from a non-interactive terminal? screen -S 'screen_name' -X windows According to gnu.org, this command displays the list of windows using the message line. That's fine and dandy for an interactive console, but I need this to print to stan...

 
coding with an onscreen keyboard is hard...
 
@BharadwajRaju coding without any keyboard is harder :p XD
@karthick87 yup , looks good to me
 
user136984
Oh dear... I've got too much hair on my head for this hot weather! :D
 
user136984
It's evening keeping my back hot!
 
too bad for you panda
 
6:37 PM
@Serg ok if I rename script to just lks-indicator? debian requires it
 
@BharadwajRaju sure . I'll do the same
 
user136984
It almost goes half way down my back...
 
@ParanoidPanda time to buy a trimmer machine
 
chop it all off
 
user136984
Ah, but then I'll be cold in winter. ;P
 
6:39 PM
@ParanoidPanda it'll grow out by the time it's winter :p
 
user136984
Maybe if I get it wet it will help to cool me down actually...
 
wise words by panda, winter is coming
so i was watching mr robot and the first episode mentioned gnome kde and linux
 
A mainstream tv series mentioning Linux , gnome, and kde ? Geez, they must have had a good hiring staff to actually get a writer who put those into script
@edwinksl my ex is back by the way :D
 
back to you???
 
Nope, just back on WeChat
 
6:42 PM
i tell you, bash scripts never fail to seduce
oh damn
at least can still be friends :)
 
I woke up, check my WeChat - it's her. I was like "yay !"
She haven't replied though, probably because sleeping already. It was like 1 AM by Chinese time
 
Is there a difference between adding an user to /etc/sudoers file for granting sudo rights and adding an user to wheel group?
 
um . . . yes, because those are different groups
 
@Serg but the end goal is same? In both ways the user gain root access right?
 
user136984
@Serg: Was this the one you went to see in China or is that another?
 
user136984
6:46 PM
If you don't mind me asking that is.
 
@karthick87 not necessarily. wheel group is a legacy from system V Unix.
@ParanoidPanda This girl I was talking to online for like 6 month, we became quite close. Originally, I was going to see some other friends. This girl lives too far from where I was staying
And no, I don't mind you asking
Q&A with Serg , AMA :D
 
user136984
AMA?
 
Ask Me Anything
Frequently used term on reddit and 4chan
 
user136984
Ah...
 
uh oh serg ama = FUN
 
6:50 PM
@ParanoidPanda or IAMA too on reddit
 
@Serg thanks. One last thing.. The looping you have suggested works fine.. however if the scripts gets run for the second time knowingly or unknowingly then then 'export HISTFORMAT' keeps getting appended which is expected according to the current code.. Any ways to rule this out?
 
@karthick87 you want to append only if "export blah blah" is not already there , right ?
 
@Serg i like ELI5 on reddit :D
 
@Serg yep right
 
@Rinzwind those are good, especially for me, because I am always L5
2
 
6:51 PM
:D
 
@Rinzwind how are you doing? You remember me :) ? its a very long back we had an interaction :) back to Ubuntu now :)
 
user136984
I'm trying to upload a file which is about 150MB, why does the connection keep cutting out? I mean, it's fine for other things, but the download either completely stops along with any networking activity related to it for no reason, or it just tells me it's failed...
 
@karthick87 fine but it is too freaking hot to do anything
 
user136984
@IanC: Hope you've upgraded by now. :)
 
studioRaLu 's comment there is epic XD
 
it is accurate
no sympathy for old navy folks
 
@Serg thank you so much o/
 
@karthick87 Always welcome \o glad i could help
 
@karthick87 hey, long time no see.
 
7:02 PM
@NathanOsman how are you doing? :) yep busy with different projects.. Now back to form :)
 
@karthick87 I'm doing well. Been busy too. Things are starting to slow down a little bit.
 
@NathanOsman happy to see you all again :) its 12.30 AM here.. Gonna take some sleep.. Catch you all again later o/
 
sleep well yo
 
@ParanoidPanda, I did upgrade already, running 16.04 now
 
any cisco experts?
 
7:07 PM
@Serg done and pushed
 
user136984
@IanC: Good, and is that just the standard flavour (Unity)?
 
@BharadwajRaju looks good so far. Once I make all the necessary changes, we can merge stuff
 
@ParanoidPanda yeah, made no changes to the desktop yet, any recommendations?
 
user136984
@IanC: Switch to GNOME would be my recommendation. ;P
 
user136984
Apart from that, you might want to disable the guest session for security reasons and have a look in the unity-tweak-tool.
 
user136984
7:14 PM
I'm full of GNOME recommendations, but I haven't been on Unity in a while.
 
0
Q: Launching graphical application from tty to improve performance

user180294Would there be any performance increase by opening a tty terminal and exec application as opposed to launching from a DE/WM, or would that only be the case if I were to boot without starting xorg (if at all)? I'm running Ubuntu 14.0.4

0
Q: Change resolution of virtual console

XoRI bought an xps laptop with a 4k screen. Because of this, the font-size of my text consoles (Ctrl+Alt+[F1-F6]) are quite tiny. So I tried to change the resolution by editing /etc/default/grub like it is adviced by many tutorials. Right now it looks like this: GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=...

 
@ParanoidPanda, cool, I'll disable guest and take a look at GNOME, so far it's all on default. Only installed virtual box and another distro on dual boot, might customize it a bit now :)
 
Just think some people may benefit from this ^
 
user136984
@IanC: I'd at least try the Ubuntu GNOME flavour in a VM, it a good flavour, used to be the default, but it's not to the taste of all people, I can't see why though.
 
what is the main difference? is it more customizable?
 
7:19 PM
@IanC you guys are talking about Ubuntu Gnome vs just Gnome itself ?
 
user136984
@Serg: No, Unity vs GNOME.
 
user136984
@IanC: It just looks and feels different.
 
user136984
For instance it has the Activities Overview which I can escape to to easily switch between programs and workspaces. I'll get you a screenshot.
 
@Serg, I'll watch the video, could use some motivational stuff, just got back from surfing at the beach and I'm in the middle of proud and disappointed haha
@ParanoidPanda, cool, send it! I think I might have used a long time ago (when it used to be default)
 
Oh. Well , I am in Unity camp right now, because Gnome doesn't like my indicator unless I install "AppIndicator Support" extension for it
@IanC @_@ you're surfing ? OMG , so awesome !!!
Mate is kind of neat too
But Unity is my baby right now
 
7:26 PM
@Serg, if you can call what I did today surfing lol, I just surfed one wave, my confidence on "bigger" surf has went down lately. I pushed myself to go out today, even though it wasn't as big as some days I surfed before
 
no cisco peeps?
 
I tried Ubuntu Gnome few days ago .. it is still a pain for me .. though I like the extensions they have
and whatsapp indicator failed to work also on it
what about Cisco
 
@IanC meh , we all have those days where there's "no waves" . There'll be more opportunities.
 
user136984
@IanC:
 
@ParanoidPanda, this command that disables guest:
`sudo sh -c 'printf "[SeatDefaults]\nallow-guest=false\n" >/usr/share/lightdm/lightdm.conf.d/50-no-guest.conf'`

why writing `sudo sh -c`? wasn't easyer to just `sudo printf "[Seat...]`
 
user136984
7:30 PM
 
@Serg, for sure bro, I just need to get myself in the pace again. Guess I should look at the bright side, at least I pushed myself to paddle out and took 1 wave :p
 
@IanC because redirection is done by shell , sudo only runs printf
So if you try to redirect to root owned file, sudo printf "STUFF" > file.txt won't work
 
@ParanoidPanda, looks cool! you're using multiple desktops?
 
@CodeX Okay I need to scan to email, but I guess our ASA is blocking SMTP trafic.
@CodeX specifically port 465
 
What else you can do is this: echo 'Some stuff ' | sudo tee myfile.txt
 
7:32 PM
@Serg, thought sudo would make the whole command group work as root, interesting
 
user136984
@IanC: It's useful when I'm doing development work.
 
@TheXed ah ASA .. never worked on that
 
@CodeX learn fast :-P
 
Also @ParanoidPanda why on earth are you printing it to /usr/share/lightdm/lightdm.conf.d/50-no-guest.conf ???
/etc/lightdm/lightdm.conf is enough !
 
yeah I should : )
 
7:34 PM
@Serg what about loops? if I run sudo for i in *; #do something only root can do; done, will it work?
 
user136984
@Serg: That's what it says in the documentation.
 
user136984
@IanC: You can also do a search for anything there (e.g.: files, applications, weather, etc... - though this is all configurable) and list all your applications:
 
user136984
 
 
user136984
There is even an easy to access calendar at the top integrated with the mail client.
 
7:36 PM
0
Q: How to export / import Ubuntu 16.04 terminal color scheme

Mankind1023I'm trying to export the color scheme from my Ubuntu 16.04 terminal to use on another system. I found some posts that suggest: gconftool-2 --dump '/apps/gnome-terminal' > gnome-terminal-conf.xml But that no longer works, I also found someone suggesting using terminal.sexy, but i'm looking for...

 
@ParanoidPanda, looks cool, I'd need to remove (or blacklist) unity though right?
not even sure if there is such a thing as blacklisting a program lol
 
@IanC tried it, nope, didn't work. in any variation
 
maybe sudo {loops commands} or sudo (loop commands)
 
user136984
@IanC: I tried just switching to GNOME by installing it and removing Unity... Let's just say that that didn't end well... Unity is too integrated into the system. No, you have to install it with the Ubuntu GNOME ISO as you should do with any flavour.
 
18
A: Using sudo with for loop

Jan Krügersudo wants a program (+arguments) as a parameter, not a piece of shell script. You can do this, though: sudo -i -u user sh -c 'for i in /dir; do echo $i; done' Note the single quotes. If you used double quotes, your shell would try to expand the $i before sudo (or, rather, the shell run by it)...

 
7:39 PM
 
if possible, one could use xargs too
 
user136984
@IanC: But I'd suggest that you try it out in a VM first to make sure that you do really like it.
 
@CodeX you watch mr robot too?
 
@edwinksl yes .. I am now on second season episode two
this time it feels more real than before
 
user136984
@IanC: Something I think is really great is that there is an online extensions sort of "store" where you can download free extensions to gnome-shell which basically can do anything you like with the system which isn't already in the settings. Like you will see my see-through top-bar, that is done through an extension. They also check all of the extensions before allowing them up there so they are all safe. There is a huge amount of them doing all sorts of things.
 
7:41 PM
$ printf "/etc/passwd\n/etc/group" | sudo xargs  -L 1 wc -l
[sudo] password for xieerqi:
55 /etc/passwd
90 /etc/group
@ParanoidPanda where in documentation is that file mentioned though ?
 
 
user136984
@Serg: It should be just in the documentation... I don't know, it's been a while, but I think there's a special piece on it or something.
 
@CodeX nice i only finished s1e1 yesterday, long way to go
 
 
@ParanoidPanda, I'll try it on VM first then
 
user136984
7:44 PM
@Serg: Where are you getting this from anyway?
 
ah you missed the whole season :P
 
@CodeX no time to watch more than 1 show at a time ;)
 
so I will tell you now what happens in the end
xD
 
since GoT finished, i now have time for a different show
 
user136984
@IanC: If you have any problems just let me know! ;)
 
7:45 PM
alright man, thanks!
 
@CodeX i am immune to spoilers but don't spoil it for others here ;P
 
@ParanoidPanda experience , because generally files in /usr/share folders are not for user editing
 
xD
oh I edited /usr/share/applications yesterday @Serg
 
Whyyyyy has thou doneth this ??? <>_<> @CodeX
Joking
 
for some reason adding anything on .local/share/applications was not working
 
7:48 PM
that's odd
 
xD I am sorry
 
kitten = die?
 
no animals were harmed in that process
 
@ParanoidPanda, by the way, just a last question. Shouldn't I save the 50-noguest.conf file on /etc/lightdm/lightdm.conf.gz/?
 
user136984
@Serg: I'm not sure though that I was the person who actually ever recommended the method for this though...
 
7:50 PM
user image
2
 
haha
 
user136984
@IanC: I wouldn't think so... That looks like a compressed file to me, just save it where it says to.
 
I'm sorry, was a typo
 
@IanC probably best not to touch those
 
/etc/lightdm/lightdm.conf.d/
"System provided configuration is stored in /usr/share/lightdm/lightdm.conf.d/*.conf and is not user editable. System administrators can override this configuration in /etc/lightdm/lightdm.conf.d/*.conf and /etc/lightdm/lightdm.conf. Files are read in the above order and combined together to make the LightDM configuration. "
 
7:52 PM
@ParanoidPanda wiki.ubuntu.com/LightDM
> For example, if you want to override the system configured default session (provided in /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf) you should make a file /etc/lightdm/lightdm.conf.d/50-myconfig.conf
 
Last time I disabled lightdm using systemctl ..I was never able to enable it back again xD
 
@Serg, yeah, seems like the configurations are read in the order:
1) /usr/share/lightdm/lightdm.conf.d/*.conf
2) /etc/lightdm/lightdm.conf.d/*.conf
3) /etc/lightdm/lightdm.conf
so the latest would override the first ones
 
That's likely the case
 
user136984
@IanC: Yes, lightdm.conf.d is where you should save the file. What documentation/answer are you referring to?
 
141
Q: How do I disable the guest session?

Jeremy BichaHow do I disable the guest session in Ubuntu 11.10 or higher? I don't want people to be able to use my computer without using a password to log in!

the accepted answer there seems to save in the first folder (the /usr/share)
I'm about to run this
sudo sh -c 'printf "[Seat"':*'"]\nallow-guest=false\n" >/etc/lightdm/lightdm.conf.d/50-no-guest.conf'
 
user136984
7:59 PM
@IanC: That's what I ran, and it worked for me.
 
I put :* inside single quotes, think * has some special meaning and was not sure about :
 

« first day (2119 days earlier)      last day (2849 days later) »