wireshark ubuntu

Published by:

source : https://ubuntuforums.org/showthread.php?t=2039978
this is how to install wireshark :
sudo apt-get install libcap2-bin wireshark
sudo chgrp myusername /usr/bin/dumpcap
sudo chmod 750 /usr/bin/dumpcap
sudo setcap cap_net_raw,cap_net_admin+eip /usr/bin/dumpcap

this command add extra functionality to run wireshark in user mode, don't have to change to root desktop

sudo dpkg-reconfigure wireshark-common

My Ubuntu Goes to BusyBox On Startup

Published by:

This is happened because the electricity in my city is black out. When I start my laptop, it show the bootloader option but after I pressed enter, the system can not boot into the operating system. It is said that it can not mount sda.

I try to access it using the boot operating system through my flash disk, but I can’t mount the sda.

After I read in ubuntuforum, I try this command.

sudo e2fsck -f -b 32768 -y /dev/sda1

source: ubuntuforum.org

After It done doing some processing, I reboot and the system back to normal

Bash Script to Execute Mysql Command

Published by:

Here is my bash script to execute msyql command

tglblk=$(date –date=”8 days ago” +%Y-%m-%d)
tglhapus=”$tglblk 23:00:00″
SQL=”DELETE FROM Events WHERE EndTime<=’$tglhapus’;”
echo $SQL | mysql –user=$MYSQL_USER –password=$MYSQL_PASS $MYSQL_DB

Then I put it into crontab to run at specific time.

Canon LBP3050 in slackware 13.37

Published by:

After I upgrade my slackware from 13.1 to 13.37 the canon LBP3050 printer works just fine. Nothing change in the configuration. The already wrote the installation method here. Until today, I made a mistake by changing the usb cable into another usb port and I delete the printer in cups browser, the printer won’t connect anymore.

I don’t know what happen. I repeated the action from the beginning. I suspect this is happen because I installed cnij 3.30 the common and the 2700 printer for canon ip2770. I removed them and expect the LBP3050 will work again but nothing.

I delete the LBP3050 from cups browser (localhost:631) and re put it again by typing in the console
#lpadmin -P LBP3050 -m CNCUPSLBP3050CAPTK.ppd -c ccp:/var/ccp/fifo0 -E
The printer appears in the cups browser but when I test it to print, still nothing happen.
I check the capstatusui from terminal in user privileged,
#captstatusui -p LBP3050
The box show up and show the printer error, check the /etc/ccpd.conf for the connection.
I check /etc/ccpd.conf and find out that the setting still the same

DevicePath /dev/usb/lp0

Then I check dmesg in root privileged. And I found out something else…
root#dmesg | grep lp0
It show the printer assigned to usblp0 not usb/lp0
I find the usblp0
root#ls -lh /dev/ | grep usblp0
And yes there is usblp0

Now I try to change the conection to usblp0, I remove the printer from cups browser and repeat the next action in the terminal.
root#lpadmin -P LBP3050 -m CNCUPSLBP3050CAPTK.ppd -v ccp:/var/ccp/fifo0 -E
root#ccpadmin -p LBP3050 -o /dev/usblp0

I check the captstatusui -p LBP3050 it show the printer is on.
I try to print and it works again. fuih….

using scanner from network

Published by:


Source : makasar-slacker.org

Dengan menggunakan OS Slackwarekita bisa mengakses scanner yang terhubung pada komputer lain, atau katakanlah terhubung di CPU server.

Di  server
Buat service untuk sane-port tersedia di PC yang langsung terhubung dengan device scanner itu (yang terinstall sane-backend). Caranya edit file “/etc/services”, tambahkan baris…

sane-port 6566/tcp #SANE Network Scanner Daemon

Masukkan juga layanan streaming via inetd, caranya edit file “/etc/inetd.conf” dan tambahkan baris…

sane-port stream tcp nowait saned.saned /usr/sbin/saned saned

Restart service inetd, caranya sh /etc/rc.d/rc.inetd restart

Edit file “/etc/sane.d/saned.conf”, tambahkan baris …

localhost #sesuaikan sendiri dengan range ip masing-masing

Supaya user biasa bisa melakukan scan, tanpa bantuan privilege root, tambahkan user dan group saned, caranya lakukan perintah ini dari cli…

if ! id saned; then groupadd saned; useradd -g saned -G scanner -s /bin/false -d /dev/null saned; fi

Nah sampai di sini konfigurasi servernya udah selesai, semoga tidak ada masalah nantinya.

Di Komputer Klien, edit konfigurasi sane untuk mengenali device scanner dari jaringan, yaitu file “/etc/sane.d/net.conf” tambahkan baris yang berisi alamat ip yang menjadi server scanner, contoh

Pastikan di file “/etc/sane.d/dll.conf” berisi baris net, slackware 12.2 defaultku telah menulisnya di bagian paling atas.

Lakukan scanning dengan perintah ini

scanimage -d net: > ~/test.pnm

Anda sudah bisa mendapatkan hasil scanning yang diharapkan.

Itulah sedikit pengalaman saya tentang kerjaan nyeken (scan) dari PC menggunakan device scanner yang ada di PC lain. Dari hasil itu, kita bisa berimprovisasi lagi hehe

find the total of files in the directory

Published by:

There is a command in linux console to count total files in the directory.

ls | wc -l

The result will show a number.

Actually the wc command is to print newline, word, and byte counts for each file. Here are the option for wc command

-c, –bytes print the byte counts
-m, –chars print the character counts
-l, –lines print the newline counts
–files0-from=F read input from the files specified by
NUL-terminated names in file F;
If F is – then read names from standard input
-L, –max-line-length print the length of the longest line
-w, –words print the word counts
–help display this help and exit
–version output version information and exit

slackware 14.0 use wifi with wicd

Published by:

The first time in my slackware experience, this is the first time I succeeded using wifi configuration. I always tried to use wpa_supplicant, which is I failed. I don’t understand how to manage the setting, and also by manual iwconfig command. I success using iwconfig when the wifi is not secured or open. No wpa or wpa2 encryption key. But that’s not what I want. I need some secure key.

Finally tonight I read again the manual in doc.slackware.org about this and find something about how difficult the wpa or iwconfig setting for newbie like me. The one thing is easy is using wicd.

wicd is an extra command need to be downloaded. So I downloaded for my slackware 14.0 which is version. I install it using installpkg. And run the command in console or F2 command executor.

The command to run it is wicd-client, and run it as a normal user.

Wait a moment, wait until it pops up a dialog box asking the root user (which is necessary to handle the wlan0 interface) then the wicd network manager appears.

Click on the properties button to fill the wpa2 and click connect. That’s it.

firefox (in ubuntu) libavcodec error

Published by:

The error I meant is the message displayed at the top of the firefox, said libavcodec is vulnerable and expired (for some reason). After googling and find the article in http://askubuntu.com/questions/851190/how-to-update-libavcodec-on-ubuntu-14-04, the problem is libavcodec is disabled as default.

Libavcodec is needed to play the streaming in the website. Except for youtube. I still can play youtube with libavcodec disabled. I wonder why.

Anyway the solution is make the libavcodec enable.

Here is how

type about:config in the address bar, enter
click “I accept the risk” search libavcodec
change media.libavcodec.allow-obsolete;false to true