blog lookup

Приказивање постова са ознаком slackware. Прикажи све постове
Приказивање постова са ознаком slackware. Прикажи све постове

Slackware 13.37 autologin with X

edit /etc/inittab

c1:12345:respawn:/sbin/agetty -n -l /usr/local/sbin/autologin 38400 tty1 linux


cat /usr/local/sbin/autologin

#!/bin/sh
login -f USERNAME


cat /home/username/.bash_profile

startx


Rename multiple files to another extension in Linux

 
Let us say that you want to rename all of your “.php5″ files to “.php” files. You can use for loop.
for old in *.php5; do cp $old `basename $old .php5`.php; done

Thats all there is to it. Let us say you need to rename index.php5 to index.php. The way above snippet works is that it loops through current directory and finds all the files with extension “.php5″ and processes ‘one by one. In our index.php5 file example, it finds index.php5 file, does a cp index.php5 `basename index.php5 .php5`.php <- basename returns “index” so you add .php to it and now you are left with index.php. Of course you can do mv command if you want to just move the file to new name.

source:http://www.debianadmin.com/rename-multiple-files-to-another-extension-in-linux.html
    Which ports must be open in order to use Steam?
      

The following ports must be open in your firewall and router for Steam and Steam Games to work:

UDP 1200    (used for friends service)
UDP 27000 to 27015 inclusive
TCP 27020 to 27039 inclusive
TCP 27040 and 27041 (only for CyberCafe Owners)

Computers running Dedicated Servers need these ports open:

UDP: 27015 and 27020 (default HLDS, SRCDS and HLTV port)
TCP: 27015 (SRCDS Rcon port)

If your server uses a different hostport then you will need to adjust the above accordingly.For help on port forwarding for your Router, please consult this excellent website: http://www.portforward.com.
For assistance with your Firewall you will need to go to the support site for your particular Firewall.

NOTE: Windows XP SP1 firewall does not require any specific configuration changes for Steam Clients to work, but for Source Dedicated Servers you must open TCP Port 27015 (or whichever port your server is using) for RCON to work!




on my slackware 13.37 machine,  firewall looks like this:

    $IPT -A INPUT -p UDP -s 0/0 --destination-port 27020 -j ACCEPT

    $IPT -A INPUT -p UDP -s 0/0 --destination-port 27015 -j ACCEPT

mkdosfs

bash-4.1# cat /root/.bash_history | grep mkdosfs
mkdosfs -F 32 /dev/sdc1 -n BELI256
mkdosfs -F 32 -N BELI256 /dev/sdb1
mkdosfs -F 32 -n BELI256 /dev/sdb1
mkdosfs -F 16 -n BELI256 /dev/sdb1
mkdosfs -F 16 -n BELI256 /dev/sdb1
mkdosfs -n BELI256 /dev/sdb1

Screen -x

To start using multiuser mode, use the command multiuser on in either your .screenrc or on screen's command line. Then use acladd or aclchg to tell screen about the users that you want to connect. screen will not allow connections from any user it hasn't been explicitly told about. Once the permissions are set up, the other users run screen -r / to attach. (If you want multiple people (including you) to be attached at the same time, use -x instead of -r. If you have multiple sessions, put the session name after the slash.)

http://aperiodic.net/screen/multiuser

httpd apache mod_status log fetched!


pupit: I wget skype from my server and httpd access_log didnt read it. how is that possible?adaptr: the access log doesn't read much of anything
pupit: it doesnt?
pupit: i thought it was doing that...
pupit: latest security update of httpd i have in slack
adaptr: the access log prefers television to reading
pupit: ah, i figured it out, until it finishes the download it doesnt logs it
adaptr: that would be correct
pupit: there is no way to find out which files are being fetched?
adaptr: server-status
fajita: server-status is enabled by mod_status. See http://httpd.apache.org/docs/current/mod/mod_status.html See http://httpd.apache.org/server-status for an example.
pupit: for me?
adaptr: enable ExtendedStatus globally to see all currently executing requests
pupit: ah, thanks adaptr
pupit: :)
pupit: live and learn..

thumbs proxy cheker vhost advice

pupit: hi, should i put this in my webserver root? http://vlad-tepes.bofh.it/freenode-proxy-checker.txt
spb: if you really want to
thumbs: pupit: why would you?
spb: it won't do much, mind
pupit: thumbs: a lot of errors in error_log asking that file, i though someone will know in this room
thumbs: pupit: so the only purpose is not to pollute your error log?
pupit: thumbs, yes
thumbs: pupit: note that you can make a vhost with your IP as the Servername in apache, and use /dev/log for the ErrorLog there.
spb: then that won't help much
pupit: and the 2nd question, why is asking for that file?
spb: pupit: that's our proxy checker
spb: it's checking to see whether your machine has an abusable open proxy on it
thumbs: pupit: you can then serve content with your other vhosts, and ignore the requests on http://your_ip_here/
pupit: thumbs: yeah
thumbs: pupit: much smarter than putting a dummy file in the vhost.
pupit: thumbs: i know :)
pupit: i was just curious

copying one type of file from many folders

find /src -regextype posix-extended -regex '.*(jpg|gif)' -exec cp {} /dest \;




pupit: tried

cp -r /d/d/*.file

but it doesnt work :/
Qwood: pupit: One second and I'll write you a one-liner here.
Qwood: pupit:

'for fname in $(find dir | grep .ext); do cp $fname newdir; done'

pupit: Qwood: awesome, thanks a lot :)
Qwood: pupit: dir being the top of the directory tree you want to copy from, ext being the file extension you are looking for, and newdir being the directory you want to copy to.
pupit: yeah :)
pupit: its clear to me
Qwood: pupit: I do that kind of copying all the time :)
pupit: its very handy :)
pupit: Qwood: i had a bit trouble copying from directories with spaces so i find this solution:

find /src -regextype posix-extended -regex '.*(jpg|gif)' -exec cp {} /dest \;

pupit: s/find/found
Qwood: pupit: I'm lucky to not have spaces in most of my files
pupit: Qwood: yeah, well when dealing with m$ users its inevitable :)
pupit: Qwood: i mostly use _ for space mark
Qwood: pupit: Same

unrar, ls -l, vdir

how to unrar?
unrar e -x /DATA/Pocahontas.1995.iNTERNAL.DVDRip.XviD-SLeTDiVX/sdx-poca-int.part01.rar /DATA/shared/



You can view the access permissions of a file by doing the long directory listing with the ls -l command.


vdir

how do you do a screen capture in slackware 13.1?

Poesghost: how do you do a screen capture in slackware 13.1?
UrchLap: one way is to load up the gimp and use its "acquire image" option
Poesghost: okay, thank you.
UrchLap: another way is "import -window root shot.png"
UrchLap: (or leave off the "-window root" part and click on a window to save just that window)
adrien: import!
Poesghost: okay, I'll try that too. Cause print screen doesn't capture it to a clipboard.
adrien: sleep 2 && import -window root foo.png && optipng foo.png
adrien: don't skip the optipng part
pupit: Poesghost: http://rlworkman.net/pkgs/13.37/i486/ -> xfce4-screenshooter-1.7.9-i486-1_rlw.txz
pupit: thats for 13.37 but im sure you'll find it for 13.1

how to check to which package belongs xclock for example?

pupit: how to check to which package belongs xclock for example?
OzanBurada: slackpkg file-search
Tadgy: pupit: fgrep "/xclock" /var/log/packages/*

ssh listener

When an incoming connection is received, sshd forks a new process which handles the connection.

For instance,

ps -x -c -a | grep sshd

gets me all sshd PIDs currently running.


did you already try,


ps -Alf | grep ssh

whatismyip.org

dig myip.opendns.com @resolver1.opendns.com +short

thanks David Woodfall

ffmpeg convert

ffmpeg -i /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 angry.ogg
ffmpeg -i -novideo /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 angry.ogg
ffmpeg -i -vn /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 angry.ogg
ffmpeg -ivn /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 angry.ogg
ffmpeg -i /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 -vn angry.ogg
ffmpeg -i /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 -vn angry.mp2
ffmpeg -i /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 -vn -ar 44100 angry.mp2
ffmpeg -i /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 -vn -br 256 angry.mp2
ffmpeg -help
ffmpeg -i /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 -vn -ab 256 angry.mp2
ffmpeg -i /home/p/Desktop/ANGRY\ BIRDS\ theme\!\!\!\ covered\ by\ Pomplamoose.mp4 -vn -ab 320000 angry.mp2
ffmpeg -i /home/p/Desktop/The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp4 -vn -ab 320000 The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp2
ffmpeg -i /home/p/Desktop/The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp4 -vn -ab 192000 The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths2.mp2
ffmpeg -i /home/p/Desktop/The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp4 -vn -ab 128000 The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths3.mp2
ffmpeg -i /home/p/Desktop/The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp4 -vn -ab 128000 The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths3.ogg
ffmpeg -i /home/p/Desktop/The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp4 -vn -ab 96000 The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths3.ogg
ffmpeg -i /home/p/Desktop/The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp4 -vn -ab 96000 The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths3.mp2
ffmpeg -i /home/p/Desktop/The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp4 -vn -ab 96000 The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths3.flv
cat /home/p/.bash_history | grep gffmpeg
cat /home/p/.bash_history | grep ffmpeg
#ffmpeg -i /home/p/Desktop/The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp4 -vn -ab 320000 The\ Muppet\ Show\,\ Mahna\ Mahna\ and\ the\ Snowths.mp2
#ffmpeg -i /home/p/Desktop/Darkwood\ Dub\ -\ Vrtlog\ Vira.mp4 -vn -ab 320000 /home/p/Desktop/Darkwood\ Dub\ -\ Vrtlog\ Vira.mp2
ffmpeg -i /home/p/Desktop/Darkwood\ Dub\ -\ Vrtlog\ Vira.mp4 -vn -ab 320000 /home/p/Desktop/Darkwood\ Dub\ -\ Vrtlog\ Vira.mp2
fgrep /home/p/.bash_history ffmpeg
fgrep ffmpeg /home/p/.bash_history
#ffmpeg -i /home/p/Desktop/Darkwood\ Dub\ -\ Vrtlog\ Vira.mp4 -vn -ab 320000 /home/p/Desktop/Darkwood\ Dub\ -\ Vrtlog\ Vira.mp2
#ffmpeg -i /home/p/Desktop/EKV\ -\ Ljudi\ iz\ Gradova\ \(live\).mp4 -vn -ab 320000 /home/p/Desktop/EKV\ -\ Ljudi\ iz\ Gradova\ \(live\).mp2
ffmpeg -i /home/p/Desktop/EKV\ -\ Ljudi\ iz\ Gradova\ \(live\).mp4 -vn -ab 320000 /home/p/Desktop/EKV\ -\ Ljudi\ iz\ Gradova\ \(live\).mp2
ffmpeg -i /home/p/Desktop/EKV\ -\ Ljudi\ iz\ Gradova\ \(live\).mp4 -vn -ab 256000 /home/p/Desktop/EKV\ -\ Ljudi\ iz\ Gradova\ \(live\).mp2
ffmpeg -i /home/p/Desktop/EKV\ -\ Ljudi\ iz\ Gradova\ \(live\).mp4 -vn -ab 128000 /home/p/Desktop/EKV\ -\ Ljudi\ iz\ Gradova\ \(live\).mp2

Burning discs in linux

___DVD:

growisofs -speed=4 -Z /dev/scd0 -R -J -V "label" /home/happyuser

___DVD .iso :

growisofs -dvd-compat -speed=4 -Z /dev/dvd=file.iso


___CD: FROM THE DIR -> disc tree:

mkisofs -o /DATA/diskname.iso \
-R -J -A "Slackware Install 2" \
-hide-rr-moved \
-v -d -N \
-V "SlackCD2" .


___CD:

cdrecord -v dev=/dev/cdrw speed=4 fs=8m -tao -data -eject /tmp/cd.iso

cpufreq-set runed as a normal user

http://www.pclinuxos.com/forum/index.php?topic=90020.0

Hi,

you can set the sticky bit on /usr/bin/cpufreq-set,
but you are going to introduce a security risk, you will take the risk on your own,
from a root console:
chmod 4755 /usr/bin/cpufreq-set

after this change when a 'non admin user' will execute cpufreq-set,
will do that 'on behalf' of root.

AS
##SLACKWARE irc.freenode.net

pupit: is there a better/more-secure way of "chmod 4755 /usr/bin/cpufreq-set" to run cpufreq-set as a normal user ?
mancha: linux is a multi-user environment for a reason, be root. otherwise do what you normally do in these cases: use sudo
alisonken1lap: "su -" is also your friend
mancha: echo "pupit ALL = PASSWD: /usr/bin/cpufreq-set" >> /etc/sudoers
mancha: use NOPASSWD instead, for added thrills
pupit: thanks mancha :) I was heading to some other solution which would be without sudo but i guess its inevitable
mancha: don't be afraid of sudo, it doesn't bite.
elkng: "%wheel ALL=(ALL) NOPASSWD: ALL" <- all my problems got away
elkng: as someone said: "no pain, no gain"
hiptobecubic: elkng, you should be a sysadmin with innovative solutions like that
hiptobecubic: elkng, or a surgeon maybe
pupit: lol hiptobecubic
alienBOB: On my laptop I love living dangerously and that line shown by elkng is in my sudoers file
alienBOB: I control who is a member of wheel anyway

MSI Megabook m635

http://shared.hackzine.org/gentoo-wiki/pages/HARDWARE_MSI_Megabook_m635_aka_1029.html
http://www.gentoo-wiki.info/MSI_Megabook_m635

Slackware 13.37 needed acpi=off to boot, no other problems in booting the system:

# lspci
00:00.0 Host bridge: ATI Technologies Inc Radeon Xpress 200 (RS480/RS482/RX480/RX482) Chipset - Host bridge
00:02.0 PCI bridge: ATI Technologies Inc RS480 PCI-X Root Port
00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller
00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller
00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller
00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 10)
00:14.1 IDE interface: ATI Technologies Inc IXP SB400 IDE Controller
00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge
00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge
00:14.5 Multimedia audio controller: ATI Technologies Inc IXP SB400 AC'97 Audio Controller (rev 01)
00:14.6 Modem: ATI Technologies Inc SB400 AC'97 Modem Controller (rev 01)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility X700 (PCIE)
02:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
02:04.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
02:04.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)
02:04.2 FireWire (IEEE 1394): Ricoh Co Ltd R5C552 IEEE 1394 Controller (rev 04)
02:09.0 Network controller: Ralink corp. RT2500 802.11g (rev 01)

MC4_STATUS: Corrected error, other errors lost: no, CPU context corrupt: no, CECC Error

what happened:

Message from syslogd@DEUS at Thu Apr 28 13:59:26 2011 ...
DEUS kernel: [305700.000015] [Hardware Error]: MC4_STATUS: Corrected error, other errors lost: no, CPU context corrupt: no, CECC Error

Message from syslogd@DEUS at Thu Apr 28 13:59:26 2011 ...
DEUS kernel: [305700.000021] [Hardware Error]: Northbridge Error, node 0: , core: 0L3 ECC data cache error.

Message from syslogd@DEUS at Thu Apr 28 13:59:26 2011 ...
DEUS kernel: [305700.000025] [Hardware Error]: Transaction: RD, Type: GEN, Cache Level: L3/GEN

explained http://comments.gmane.org/gmane.linux.kernel/1097359

cosmic rays http://blog.ksplice.com/2010/06/attack-of-the-cosmic-rays/

Multi WAN - Slackware - Niels Horn is the man!- LOAD BALANCING TWO ISPs

pupitfound this: http://lartc.org/howto/lartc.rpdb.multiple-links.html it looks ok, but even if i manage routing how to manage connections to eth0 and wlan0 simultaneously? im used to wicd btw
pupiteviljames: you were right, i do need NAT  to setup things here :)
eviljamespupit: I had a feeling that was what you were after, but was a little befuddled by the wording of the question.
pupitsorry, my english is not spectacular sometimes :)
eviljamespupit: Then computer becomes a wifi hotspot on wlan0 ; then your WLAN connects to your computer, which does routing/NAT/firewall
eviljamesWLAN above meaning wireless clients.
pupiteviljames: yes
eviljamespupit:
 I don't know much (anything) about setting up a wifi hotspot, other
than your hardware must support it.  I had a ralink device
before that did not.
eviljamespupit: Once that part is done, you'll be happy to hear the rest should be both trivial and well documented.
pupiteviljames: i think ill draw this
pupit:)
pupiteviljames: http://i13.photobucket.com/albums/a286/ctrl4del/multiwan.png
eviljamespupit: You have a lot of options here.
eviljamesVery nice drawing, btw :P
pupithahaha
thrice`what was it drawn in? :)
eviljamespupit: So, is it possible to add a 2nd nic to PC2?  If so, you could use eth0 + wlan0 in various configurations
pupiti  dedicate my drawing to eviljames
eviljamesThen use PC2 as your router/firewall.
pupiteviljames: 2nd pc is eeepc
eviljamesoh.. waitasec... I just clued in that you want to do it to PC2 hah
pupiti have an usb2ethernet adapter
eviljameserr duh PC1
niels_hornpupit: take a look at this post: http://blog.nielshorn.net/2008/09/load-balancing-two-isps/
niels_hornIt's a bit old, but still valid...
pupitthanks niels_horn :)
alphageek13.1RC2 ftw!
niels_hornpupit: np :)
pupitniels_horn: as it was stated above, drawing is nice, you could use it as an intro in the beginning of your blog :)
niels_hornpupit: hehe... :) I actually need to update that post a bit. Who knows in my v2.0
guax2008, some stuff happens in two years thats for sure
niels_hornmancha: I don't think 13.1 will have 2.6.34... Just my guess...
guax"ADSL modem 1Mb down, 320Kb up"
Action: guax bets is a brazilian ISP
niels_hornguax: yeah... :) Rio de Janeiro...
guax:D

Generated by irclog2html.pl 2.1mg by Jeff Waugh - return

Buridan's ass


(01:03:53 AM) evanton: may I ask why do you need 3 linux distros?
(01:04:10 AM) evanton: can't have 1 main and 2 in virtual boxes?
(01:04:38 AM) MystKid: yes i could
(01:04:46 AM) MystKid: but still have to decide which one my main will be
(01:05:25 AM) evanton: well, pick 2 random ones, decide to throw one, repeat the process one more time :)
(01:06:33 AM) MystKid: i like all 3 tho. i like binary packages in arch and the minimal install. i also like emerge with all those USE flags and slack is great also
(01:06:41 AM) MystKid: a hard choice

(01:08:37 AM) evanton: "Asinus Buridani starved because it could not decide whether to feed from the left or right"
(01:08:40 AM) evanton: haystack.

PDF - Why Buridani’s ass is an unlikely creature: Alexander Riegler
Wikipeadia Buridan's ass