Metode Numeric [GSLC 1]

Tugas ke : GSLC 1

Tgl diberikan tugas : 12 Maret 2014

Nama : Dedy Martadinata Supriyadi

NIM : 1501142913

Kelas : 06PGT

Password : 7

p1

NF12032014233002TgsGSLC1p3-MetNum2014

NF12032014233002TgsGSLC1p2-MetNum2014

ref : HTTP://WWW.BINUS.AC.ID

Posted in Uncategorized | Leave a comment

active again

will post again

Posted in Uncategorized | Leave a comment

Hybrid Sleep with USWSUSP

Weel, i think this technology isn’t but seems as far as  know, vista already had have this. just don’t activate by default. So what is this Hybrid Sleeping? Basically on simple terms, suspend + hibernate at the same time. Get it? if you don’t please read this first. Now i wan’t to share my setup to USWSUSP + systemd , well systemd hinernate , sleep , and hybrid-sleep doesn’t bad, it works flawlessly on my machine, but the problem is the speed how long hibernate time taken and sleep taken, i don’t mind if there was some tweaking to compress hibernate image with systemd, because i don’t know how to do it.

to use USWSUSP using systemd is pretty easy.

#yaourt -S uswsusp-git
#nano /etc/suspend.conf

In this case see my config to help you mods your suspend.conf

# /etc/suspend.conf
#
# Configuration for s2disk
#
# >>> Remember to update your initcpio after changing!
#

## You shouldn’t need to change this.
snapshot device = /dev/snapshot

## Location of swap space used
# Swap-partition or partition containing the swapfile
resume device = /dev/disk/by-uuid/30b95ee9-5907-495e-bf33-32ffa02ccce6
# Output from swap-offset
#resume offset = 123456

## Misc. options
# Try to limit the size of the image created on disk
#image size = 350000000
# Shutdown method as found in /sys/power/disk
shutdown method = poweroff
# Kernel console loglevel during suspend/resume
suspend loglevel = 2
# Kernel console loglevel in case resume failes
#max loglevel = 8
# Compute MD5 sum to verify image integrity
compute checksum = y
# Compress image to save time and space
compress = y
# Encrypt image (see HOWTO)
#encrypt = y
#RSA key file = # Speed up disk sync
early writeout = y
# Enable suspend splash
# Note: The uresume hook looks at the kernel cmdline only.
# splash = y
# Speed up encryption if more then one CPU
threads = y

See? pretty easy right? Now the systemd system caller, there was three files to modify.

#cp /etc/systemd/system/systemd-hybrid-sleep.service /etc/systemd/system/
#cp /etc/systemd/system/systemd-hibernate.service /etc/systemd/system/
#cp /etc/systemd/system/systemd-suspend.service /etc/systemd/system/

Edit every file :
systemd-hybrid-sleep.service
Change the “ExecStart” value to

ExecStart=/usr/sbin/s2both

systemd-hibernate.service
Change the “ExecStart” value to

ExecStart=/usr/sbin/s2disk

systemd-suspend.service
Change the “ExecStart” value to

ExecStart=/usr/sbin/s2ram

And also don’t forget to rebuild your kernel image, add “uresume” HOOKS to your mkinitcpio, also remove “resume” HOOKS which default in systemd, reboot your linux, try your flashy suspend, hibernate, and ybrid-sleep 😀

Posted in Uncategorized | Leave a comment

jMtpfs

well, i will shae my experience with my sister galaxy tab 2 7.0 P3100, well before my sister already had samsung galaxy gio, and then when i connect it to my archlinux, it become USB Mass Storage mode, which maybe become one of many features now, but some in galaxy tab 2 7.0 P3100, the USB Storage Mode seems removed and it just can be mount by MTP mode, the problem begins. Like usual wee need gvfs-gphoto2 to mount a MTP protocol devices, and then it works pretty well, i can mount my sister’s galaxy, then copy from it to my arch, but it won’t work when i copy from my computer to the GT2, it shows “No Device Found, Retry?” with -108 code. What the?

So i got just little trick, that use JMTPFS, archlinux sure with AUR, taken from here


#yaourt -S jmtpfs
$mkdir ~/mtp
then i connect the GT2
$jmtpfs ~/mtp
then hola, the GT2 mounted on ~/mtp
you can see that it like USB Mass Storage mode, to unmount
$fusermount -d ~/mtp

i don't know is it necessary or not,
add your username to adbusers and fuse groups.
also try to have fuse kernel module loaded.

ya that is what im trying, then my friend there was airDroid? then qtadb ? well, in airDroid another friend say it will be laggy when you transfer pretty large files, and qtadb you need android SDK , ok that’s mean “no” for me because i just use USB modem…

Posted in Uncategorized | Leave a comment

5 Linux Security Myths and The Reality

Myth 1: Linux is insecure, as it makes source code available to everyone.

Reality: While this is true that Linux makes Source code available to everyone to view and inspect; it is this open source nature that makes Linux superior to any proprietary OS in terms of security. As the source code is available to anyone, thousands of develops around the world scrutinize the source code for security pitfalls. Imagine, even at this very moment number of people are reading and making the code better. It is far more easier to spot and fix security issues on Linux than on any closed-source platform.  Additionally, if any security vulnerability is found on closed source platform, it cannot be readily altered to make the software secure. On the contrary, in case of open source software, if any security hole is discovered patches are created as quickly as possible (usually within hours) therefore the security flaw doesn’t last for long enough to be exploited.

When asked about the lack of viruses known for Linux platform, the proprietary camp claims that Linux is not very popular to have viruses. This comprises another common Myth. Interestingly, it’s not only the proprietary camp to believe that Linux lacks virus because of its minimal market share, alot of literature on the internet and in books we find this misconception.

Myth 2: Linux lacks virus because it is not very popular.
Many say that the purpose of virus writers is to bring massive destruction. As Linux does not run on as many computers as MS’s Windows does, virus writers only target Windows to damage more and more stations. While this might not be completely wrong, it’s not completely true too.

Reality: Linux might not run on many desktop computers, BUT it runs on most computers in very important places. All super computers run Linux. Many notable governments have approved policies moving governmental computers to Linux. Additionally there was a huge enterprise shift from Proprietary OS to Linux in last 2000s recession. That means Linux, too is a very charming opportunity for hackers; rather hackers would more likely to write virus for Linux than for Windows if they want to bring even more destruction (especially destruction in terms of quality then quantity!). Therefore, the myth can easily be ruled out. Another reason that the proprietary camp gives for lesser known viruses for Linux is that Linux is an advanced OS and can only be used by professions who know how to protect their systems.

Myth3: Linux is for experts who know how to protect their system and therefore Linux does not get viruses and it generally thought as secure

It is also a common misconception that because Linux is for experts, they know well how to deal with viruses. On the other hand, Windows, as being a simpler system is usually used by even non-technical people who are naive enough to get virus and destroy the whole system.

Reality: The concept ‘ Linux is for experts’ is itself a myth and quiet out dated now. Linux is now one of the friendliest OS out there that can be used by novice and experts both. There are Linux based computers dedicated for elderly (heard of the Wow computer?). So to say that Linux is for experts is not true. Linux is for everyone. Consequently to say, the Linux doesn’t get virus because of its technically strong to defend OS is wrong.

What makes Linux secure is neither its lack of popularity nor its technically strong user base. It is the strong architecture of Linux which makes it secure. On Linux systems users do not have “root” privileges; instead they possess lower-level accounts. As a result even if a Linux system is somehow compromised, the virus shall not have root access to bring about any major damage to the system. Windows supports exe files, a format in which virus are transmitted. Linux, on the other hand does not support .exe files. Linux uses configuration files in place of registry files hence closing this door for virus. For the Linux servers now, Linux servers employ several level of security. Linux servers are updated more often. To conclude, it’s the Linux architecture that is different from that of contending proprietary OS which makes it secure. That is to say if Linux is adopted in main stream desktop computing, I am sure that Linux will prove to be more strong and less incline to get virus than contending OS.

Does that mean Linux is virus free? This comprises of our third Myth.

Myth 4: Linux is virus free

Reality: while Linux is very secure and superior to its proprietary counterparts, it’s not virus free. There are a number of viruses known for Linux. I have compiled popular known viruses in this post. It may be noted that all most all the viruses known for Linux are non-destructive in nature (but not non-existent)

Myth 5: On Linux system you don’t need an Anti virus.

Reality: Yes indeed it’s very much true that when you are running Linux OS you are secure. Never the less one must realize that no OS is 100% secure. While this might not be very important for desktop/home users; enterprise sector which use Linux, may require anti-virus. Occasional scanning, backing up data and checking your system for malicious software does not bring harm to anyone. This does not mean you need to spend substantial amount of cash on expensive anti- virus softwares. Any free or open source and free antivirus would do justice to your security!

source here

Posted in Uncategorized | Leave a comment

Dreamlinux Died? Just let the icon and theme live

Well, dreamlinux already discontinued so what? the problem is this Brazillian distro is one of the most beautifull desktop i think, with debian base… give stability? sure.  codecs, dev libs, flash, video drivers, just right for offline user.  But now you can import the Dream beauty to your desktop. The official site give you the link for it , here 🙂 requirements? Simple…~~
[code]
gtk2-engines-pixbuf
gtk2-engines-aurora
libsrvg[/code]

Just it bro… Viva Dreamlinux 🙂 “Surely i hope the theme and icon project will continue”

Posted in Uncategorized | Leave a comment

Just a /etc/issue and a .zshrc

zshrc
[code]# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
setopt appendhistory autocd nomatch notify
unsetopt beep extendedglob
bindkey “e[5~” beginning-of-history # PageUp
bindkey “e[6~” end-of-history # PageDown
bindkey “e[2~” quoted-insert # Ins
bindkey “e[3~” delete-char # Del
bindkey “e[5C” forward-word
bindkey “eOc” emacs-forward-word
bindkey “e[5D” backward-word
bindkey “eOd” emacs-backward-word
bindkey “ee[C” forward-word
bindkey “ee[D” backward-word
bindkey “e[Z” reverse-menu-complete # Shift+Tab
bindkey “eOH” beginning-of-line
bindkey “eOF” end-of-line

#HOSTNAME = Archlinux666
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename ‘/home/dedy/.zshrc’

PATH=”/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/lib/ccache/bin/:/usr/lib/colorgcc/bin”
export PATh
autoload -Uz compinit
compinit
autoload -U promptinit
promptinit
autoload -U colors && colors

PROMPT=”%{$fg[yellow]%}%B%n%b %B%{$fg[white]%}%#%b %{$fg[yellow]%}%B%U%~%u%b%{$fg[red]%}%B > %b”
#PROMPT=”%{$fg[black]%}%B%n%b %B%{$fg[black]%}%#%b %{$fg[black]%}%B%U%~%u%b%{$fg[black]%}%B > %b”
#——————————————////
# Proxy:
#——————————————////
#http_proxy=http://127.0.0.1:8118/
#HTTP_PROXY=$http_proxy
#export http_proxy HTTP_PROXY

#——————————————////
# Aliases:
#——————————————////
## make ls list by size
##alias ls=’du -s */* | sort -n’
alias findbig=’find . -type f -exec ls -s {} ; | sort -n -r | head -5′
alias ls=’ls -aF –color=always’
alias la=’ls -Al’
alias lx=’ls -lXB’
alias lk=’ls -lSr’
alias lc=’ls -lcr’
alias lu=’ls -lur’
alias lr=’ls -lR’
alias lt=’ls -ltr’
alias lm=’ls -al |more’
alias sch=’cat /sys/block/sda/queue/scheduler’
alias cek=’cat /sys/devices/system/cpu/cpufreq/ondemand/up_threshold’
alias officetes=’strace -fF -o out.txt -e open soffice –writer’
alias dota=’wine ~/Warcraft III/war3.exe -opengl’
alias push=’git push git@github.com:martadinata666/linuxfiles.git’
alias pull=’git pull git@github.com:martadinata666/linuxfiles.git’
alias clone=’git clone git@github.com:martadinata666/linuxfiles.git’
alias removepkg=’sudo pacman -Rscnd’
alias installpkg=’sudo yaourt -S’
alias searchpkg=’sudo pacman -Ssq’
alias orphanpkg=’sudo pacman -Qqdt’
alias upgradepkg=’sudo yaourt -Su’
alias syncpkg=’sudo yaourt -Sy’
#alias rm=’rm -i’
#——————————————////
# Functions and Scripts:
#——————————————////
localnet ()
{
/sbin/ifconfig | awk /’inet addr/ {print $2}’
echo “”
/sbin/ifconfig | awk /’Bcast/ {print $3}’
echo “”
}

upinfo ()
{
echo -ne “$fg[white]uptime is $fg[yellow] tt “;uptime | awk /’up/ {print $3,$4,$5,$6,$7,$8,$9,$10}’
}
cd()
{
if [ -n “$1” ]; then
builtin cd “$@” && ls
else
builtin cd ~ && ls
fi
}

extract()
{
if [ -f “$1” ] ; then
case “$1” in
*.tar.bz2) tar xjf “$1” ;;
*.tar.gz) tar xzf “$1” ;;
*.tar.Z) tar xzf “$1” ;;
*.bz2) bunzip2 “$1” ;;
*.rar) unrar x “$1” ;;
*.gz) gunzip “$1” ;;
*.jar) unzip “$1” ;;
*.tar) tar xf “$1” ;;
*.tbz2) tar xjf “$1” ;;
*.tgz) tar xzf “$1” ;;
*.zip) unzip “$1” ;;
*.Z) uncompress “$1” ;;
*) echo “‘$1’ cannot be extracted.” ;;
esac
else
echo “‘$1’ is not a file.”
fi
}

setopt AUTO_LIST
setopt AUTO_MENU
setopt MENU_COMPLETE
export LC_ALL=id_ID.UTF-8
export LANG=id_ID.UTF-8
autoload -U compinit
compinit

# Completion caching
zstyle ‘:completion::complete:*’ use-cache on
zstyle ‘:completion::complete:*’ cache-path .zcache
zstyle ‘:completion:*:cd:*’ ignore-parents parent pwd

#Completion Options
zstyle ‘:completion:*:match:*’ original only
zstyle ‘:completion::prefix-1:*’ completer _complete
zstyle ‘:completion:predict:*’ completer _complete
zstyle ‘:completion:incremental:*’ completer _complete _correct
zstyle ‘:completion:*’ completer _complete _prefix _correct _prefix _match _approximate

# Path Expansion
zstyle ‘:completion:*’ expand ‘yes’
zstyle ‘:completion:*’ squeeze-shlashes ‘yes’
zstyle ‘:completion::complete:*’ ‘\’

zstyle ‘:completion:*:*:*:default’ menu yes select
zstyle ‘:completion:*:*:default’ force-list always

# GNU Colors 需要/etc/DIR_COLORS文件 否则自动补全时候选菜单中的选项不能彩色显示
[ -f /etc/DIR_COLORS ] && eval $(dircolors -b /etc/DIR_COLORS)
export ZLSCOLORS=”${LS_COLORS}”
zmodload  zsh/complist
zstyle ‘:completion:*’ list-colors ${(s.:.)LS_COLORS}
zstyle ‘:completion:*:*:kill:*:processes’ list-colors ‘=(#b) #([0-9]#)*=0=01;31’

zstyle ‘:completion:*’ completer _complete _match _approximate
zstyle ‘:completion:*:match:*’ original only
zstyle ‘:completion:*:approximate:*’ max-errors 1 numeric

compdef pkill=kill
compdef pkill=killall
zstyle ‘:completion:*:*:kill:*’ menu yes select
zstyle ‘:completion:*:processes’ command ‘ps -au$USER’

# Group matches and Describe
zstyle ‘:completion:*:matches’ group ‘yes’
zstyle ‘:completion:*:options’ description ‘yes’
zstyle ‘:completion:*:options’ auto-description ‘%d’
zstyle ‘:completion:*:descriptions’ format $’e[01;33m — %d –e[0m’
zstyle ‘:completion:*:messages’ format $’e[01;35m — %d –e[0m’
zstyle ‘:completion:*:warnings’ format $’e[01;31m — No Matches Found –e[0m’

#print -Pc ‘%B`figlet “ArchLinux”%b`’
echo -e “$bold_color $fg[yellow]”;figlet “ArchLinux”;
echo -n “$fg[white]Today is:tt$fg[yellow]” `date`; echo “”
echo -e “$fg[white]Kernel Information: t$fg[yellow]” `uname -smr`
echo -ne “$fg[white]”;upinfo;echo ”      ”
echo -e “$fg[white]”; cal -3
# End of lines added by compinstall

[/code]

/etc/issue
[code]
| s r
/\                      ||     | |                   |
/  \                     ||     |     _               | t
/ .. \   //==\\ ||/= /==\ ||/=\  | | |/ \ |  | \ /     | d
/ .  . \  ||  || ||   |    ||  || | | |  | |  |  X      |
/  .  .  \ \\==/| ||   \==/ ||  || | | |  | \_/| / \     | U
/ ..    .. \   A simple, lightweight linux distribution.  |
/_’        `_\                                             | l on n


[/code]

[code]


        ,                       _     _ _                      | s r
       /#\        __ _ _ __ ___| |__ | (_)_ __  _   ___  __    |
      /###\      / _` | '__/ __| '_ \| | | '_ \| | | \ \/ /    | t
     /#####\    | (_| | | | (__| | | | | | | | | |_| |>  <     | d
    /##,-,##\    \__,_|_|  \___|_| |_|_|_|_| |_|\__,_/_/\_\    |
   /##(   )##\                                                 | U
  /#.--   --.#\   A simple, elegant gnu/linux distribution.    |
 /`           `\                                               | l on n 

[/code]

Credit to my facebook ibnu aji and risyad rais

Posted in Uncategorized | Leave a comment

Xfce4 Brightness Setup

Xfce4 brightness control seems don’t work right, so i decided to test it… then it show that xfce4 power manager which usually control the brightness value make brightness down to much, and i find 2 tutorial here and here.

Indeed there was also xbacklight also which installed with xorg, but xbacklight dont get smooth enough for me, so there on the 1st tutorial which give satisfaction to me.

[code]
/*
* Change/query the brightness of LCD screen.
*/

#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
FILE *fp;
int bright = 0;
const char *kFileName = “/sys/class/backlight/acpi_video0/brightness”;

fp = fopen(kFileName, “r”);
fscanf(fp, “%d”, &bright);
fclose(fp);

switch (argc) {
case 1:
printf(“%dn”, bright);
break;
case 2:
fp = fopen(kFileName, “w”);
bright += atoi(argv[1]);
fprintf(fp, “%dn”, bright);
fclose(fp);
break;
default:
fprintf(stderr, “Usage: lcd-brightness [value]n”);
return -1;
}

return 0;
}
[/code]

Then compile like usual, there was a notice for you the hardware diff will give diff place of your brightness setup. [code]/sys/class/backlight/acpi_video0/brightness[/code] that’s mine, ATI , dell laptop maybe have diff place of this file, so you must know the file first.

then from the second tutorial…. because im using XFCE4 so yes, this is how to disable brightness schortcut,

[code]xfconf-query -c xfce4-power-manager -n -t bool -p /xfce4-power-manager/change-brightness-on-key-events -s false[/code]

[code]xfconf-query -c xfce4-power-manager -n -t bool -p /xfce4-power-manager/show-brightness-popup -s false[/code]

the first one will disable the key events, the second will disable the popup…

so then after that,  copy the output file a.out to /usr/local/bin/lcd-brightness , then bind it to shorcut key, if you want some notif just make a bash… 🙂

Posted in Uncategorized | Leave a comment

Just IGN 8 Wallpaper

later on IGN 8 , Indonesia linux distro will release and this is very awesome wallpapers to use as Indonesia computer user… source here

Indonesia Independence Day on 17 August

Posted in Uncategorized | Leave a comment

Disable Your Device [MS]

Well, this post created because one of my friend need to disbale her keyboad of her HP mini, why? Because she dropped water onto it… what a silly thing… fortunately the HP mini still running… but error occurs on the keyboard, the she asked me, ya just use USB keyboard, but another things happen, seem the keyboard just got error, its like make a random input, so annoying when tipyng on ms.word.

She asked me again to disable the keyboard, me which don’t use MS for almost 3 years, doesn’t know how to do it. With may luck i found “devcon“.

See? after you read that it seems easy, this make easier for you, you need to extract the devcon.exe to somewhere, hich easy your access. In your documents folder seems pretty good. Then copy the devcon.exe to

C:\WINDONS

Why? because by placing it there, you can access it directly from


without need to

cd ...

to somewhere again.

to disable?
easy

devcon disable HW-ID

where to find HW-ID?
simple, you can look at

devmgmt.msc

right click, show info, there was hardware info.
Another things you can read form devcon link upthere 🙂

Posted in Uncategorized | Leave a comment