tag:blogger.com,1999:blog-3075240655475613362024-02-20T17:45:25.297-08:00Low.Fat.DaemonDaemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.comBlogger84125tag:blogger.com,1999:blog-307524065547561336.post-13083042168506991352016-09-17T19:27:00.003-07:002016-09-17T19:27:47.753-07:00Installed Debian Linux to Dualboot with Windows 10, but can't boot to DebianHow to fix: After Installing Debian for dualbooting with Windows 10, just boots straight to WIN10 without a choice<br />
<br />
Let's say you have installed Debian with Windows 10, in your UEFI system, you have all the right kernel parameters set and UEFI configs and all the partitions are all set and mounted right, windows 10 was installed before you installed Linux and you got /boot/efi at fat32/vfat FS, but your comp just boots straight to Windows 10 without a choice to boot to Debian, the reason is Windows will usually try and make its bootloader default again which means Debian isn't an option, well the easy fix as long as you got everything right on the basic install would be:<br />
<br />
<br />
1.) Boot up Windows 10<br />
<br />
2.) Then start a terminal console (command prompt), but run as administrator<br />
<br />
3.) Issue this command at the console:<br />
<br />
<blockquote class="tr_bq">
bcdedit /set {bootmgr} path \EFI\debian\grubx64.efi</blockquote>
<br />
4.) Reboot, and it should give you a choice to boot to Debian Linux or Windows 10 now, if not look to changing the boot order of operating systems installed in your computer in your computer firmware, and change it to Debian as mentioned in NOTES below.<br />
<br />
<br />
*NOTES:<br />
- You can reuse the EFI partition that windows 10 uses, just mount that as /boot/efi with Linux, its recommended that there be only one EFI partition per disk, so if you have 2 disks and you install windows and linux in each disk you can either reuse the efi partition that windows 10 has but make sure its atleast 300MB or bigger, you can resize the partition before installing, but dont delete and format the existing EFI windows 10 is using as it already contains necessary files Windows 10 needs or you can and this is recommended just make another efi partition on the disk linux will be installed in.<br />
- There's also the option to change the boot order of OS'es in the BIOS/UEFI firmware of your computer/laptop, however there are many versions and kinds of firmware and each firmware can look somewhat different, so its kinda tough to give a step by step one size fixes all procedure here about that but the option to choose the order should be located in the BOOT category, all you have to do then is make sure you set Debian as the primary OS at boot, save then exit and restart.<br />
- You could also try <a href="https://wiki.debian.org/GrubEFIReinstall">GrubEFIReinstall</a><br />
- For Ubuntu you can use:<br />
<br />
<blockquote class="tr_bq">
bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi </blockquote>
<br />
in place of the debian command above.<br />
<br />Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-78919270736174832082016-09-15T18:24:00.001-07:002016-09-15T18:28:36.425-07:00/var/cache/debconf/config.dat Is Locked by Another Process: Resource Temporarily Unavailable<h1 class="entry-title">
a Debian apt-get error lock: </h1>
<h1 class="entry-title">
/var/cache/debconf/config.dat Is Locked by Another Process: Resource Temporarily Unavailable</h1>
<h1 class="entry-title">
</h1>
When issuing apt-get install commands you get this error output -<br />
<br />
/var/cache/debconf/config.dat Is Locked by Another Process: Resource Temporarily Unavailable<br />
<br />
(for example trying to install an app like debconf with apt-get install debconf), and thus unable to use apt-get nor dpkg, to fix this problem is to kill the associated process holding a lock on that file.<br />
<br />
Issue command in terminal:<br />
<br />
<blockquote class="tr_bq">
# fuser -v /var/cache/debconf/config.dat</blockquote>
<br />
then grab the PID number of that output (for an example PID number 9999),<br />
and issue the command in terminal to kill the problematic process:<br />
<br />
<blockquote class="tr_bq">
# kill -9 9999 </blockquote>
<br />
it should now work and so you can now run apt-get and dpkg. Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-17924650634194471212016-09-15T07:35:00.003-07:002016-09-15T22:15:34.588-07:00Installed OpenSUSE Linux to Dualboot with Windows 10, but can't boot to OpenSUSEHow to fix: After Installing OpenSUSE for dualbooting with Windows 10, just boots straight to WIN10 without a choice<br />
<br />
Let's say you have installed OpenSUSE with Windows 10, in your UEFI system, you have all the right kernel parameters set and UEFI configs and all the partitions are all set and mounted right, windows 10 was installed before you installed Linux and you got /boot/efi at fat32/vfat FS, but your comp just boots straight to Windows 10 without a choice to boot to OpenSUSE, the reason is Windows will usually try and make its bootloader default again which means openSUSE isn't an option, well the easy fix as long as you got everything right on the basic install would be:<br />
<br />
<br />
1.) Boot up Windows 10<br />
<br />
2.) Then start a terminal console (command prompt), but <b>run </b>as <b>administrator</b><br />
<br />
3.) Issue this command at the console:<br />
<br />
<blockquote class="tr_bq">
bcdedit /set {bootmgr} path \EFI\opensuse\shim.efi</blockquote>
<br />
4.) Reboot, and it should give you a choice to boot to OpenSUSE Linux or Windows 10 now, if not look to changing the boot order of operating systems installed in your compter in your computer firmware, and change it to OpenSUSE as mentioned in NOTES below.<br />
<br />
<br />
*NOTES:<br />
- You can reuse the EFI partition that windows 10 uses, just mount that as /boot/efi with Linux, its recommended that there be only one EFI partition per disk, so if you have 2 disks and you install windows and linux in each disk you can either reuse the efi partition that windows 10 has but make sure its atleast 300MB or bigger, you can resize the partition before installing, but dont delete and format the existing EFI windows 10 is using as it already contains necessary files Windows 10 needs or you can and this is recommended just make another efi partition on the disk linux will be installed in.<br />
- There's an option to use secureboot with OpenSUSE in the install, so you can use UEFI secureboot or not with it.<br />
- There's also the option to change the boot order of OS'es in the BIOS/UEFI firmware of your computer/laptop, however there are many versions and kinds of firmware and each firmware can look somewhat different, so its kinda tough to give a step by step one size fixes all procedure here about that but the option to choose the order should be located in the BOOT category, all you have to do then is make sure you set OpenSUSE as the primary OS at boot, save then exit and restart.Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-31403108797391535932016-09-03T08:15:00.002-07:002016-09-03T08:15:55.111-07:00Restart KDE5 plasma without logging out or rebootingRestart KDE5 plasma without logging out or restarting the desktop environment (because of KDE5 Bugs? as great as KDE5 has been improved recently to KDE5 it still has a lot of bugs like if Krunner crashed and wont restart, want to restart KDE5 without logging out? or if you just need to restart for whatever reasons without logging or rebooting)<br /><br /><br /> Either Runs these commands in console: <br /><br /><blockquote>
$ killall plasmashell & kstart plasmashell &</blockquote>
<br />or a better way is to make a script (for example plasma_script) and make it executable and run it when you need to, with the content below:<br /><br /><br />#!/bin/bash <br /><br />killall plasmashell<br />kstart plasmashell & <br /><br />Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-70806208448844414492016-09-03T07:54:00.002-07:002016-09-03T08:21:39.750-07:00Install Asian CJK Langauge Font Character Support in OpenSUSE (in this case Japanese, Chinese, Korean) <div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_4520">
Install Asian Langauge (CJK) Font Character Support in OpenSUSE (in this case Japanese, Chinese, Korean) </div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5101">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_4994">
1.) The easy and heavy way to do this is to go use YAST (via GUI or ncurses):</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5024">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_4995">
YAST then -> System then -> Language </div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_4996">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5006">
In
the language list you can pick whichever language you want to install
character font support but in this example we focus on CJK /or Chinese,
Japanese, Korean Languages.</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5015">
<br />
Once
you click Chinese, Japanese, Korean Languages, press ok and it will
start downloading and installing the packages, this can take awhile as
opensuse will download a lot of packages and still depends on your
machine and net connection too</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5089">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5005">
The
Problem or rather issue with this is it will install everything with the including the kitchen sink approach, it will install so much packages than
needed or rather what i call an overkill to support
so many fonts and packages for the chosen languages, in the second
option i will explain a more leaner way to install CJK language
character support and break it down to each of the CJK languages</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5110">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5111">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5143">
2.) This second option will be using the Command Line only no GUI, issue command in terminal:</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5198">
<br /></div>
<blockquote class="tr_bq">
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5430">
#
zypper install arphic-ukai-fonts arphic-uming-fonts ipa-ex-mincho-fonts
ipa-mincho-fonts ipa-pmincho-fonts xano-mincho-fonts
baekmuk-bitmap-fonts baekmuk-ttf-fonts</div>
</blockquote>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6292">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6304">
or with sans noto google fonts for CJK </div>
<blockquote class="tr_bq">
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6310">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6311">
# zypper install arphic-ukai-fonts arphic-uming-fonts
ipa-ex-mincho-fonts ipa-mincho-fonts ipa-pmincho-fonts xano-mincho-fonts
baekmuk-bitmap-fonts baekmuk-ttf-fonts noto-sans-cjk-fonts</div>
</blockquote>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5627">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5542">
In
this one command it will install Chinese, Japanese, Korean Font
support, below you can choose what to install for CJK support, lets you
wanted to install just a leaner version for Japanese or Korean you can
just install:</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5543">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5481">
Japnese packages:</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5723">
ipa-ex-mincho-fonts ipa-mincho-fonts ipa-pmincho-fonts xano-mincho-fonts</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5725">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5722">
so issue command in terminal:</div>
<blockquote class="tr_bq">
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5736">
# zypper install ipa-ex-mincho-fonts ipa-mincho-fonts ipa-pmincho-fonts xano-mincho-fonts</div>
</blockquote>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5482">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5004">
Korean packages:<br />
<br id="yui_3_16_0_ym19_1_1472910429011_5389" />
baekmuk-bitmap-fonts baekmuk-ttf-fonts</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5755">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5765">
so issue command in terminal:</div>
<blockquote class="tr_bq">
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5782">
# zypper install baekmuk-bitmap-fonts baekmuk-ttf-fonts</div>
</blockquote>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5766">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6220">
Chinese: Actually the chinese packages include several language support including japanese and korean but only partial support in
arphic-ukai-fonts arphic-uming-fonts, to show what I meant on what
languages are exactly supported in the chinese package details:</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6280">
</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6222">
arphic-ukai-fonts: contain both Big5 and GB2312 charsets plus some european characters.<br />
Currently it fully supports the following charsets:<br />
ISO8859-1,2,3,4,7,9,10,13,14,15 Big5 GB2312-80 Bopomofo Extensions for<br />
Hakka, Minnan (Unicode 4.0) and MBE variants using the Stylistic<br />
Alternatives (salt) feature from the OTF spec.<br />
Partly support is implemented for: HKSCS CNS 11643 GB18030 Japanese<br />
Korean<br />
<br />
arphic-uming-fonts:
contain both Big5 and GB2312 charsets plus some european
characters.
<br />
Currently it fully
supports the following
charsets:
<br />
ISO8859-1,2,3,4,9,10,13,14,15 Big5 GB2312-80 HKSCS 2004 Bopomofo<br />
Extensions for Hakka, Minnan (Unicode 4.0) and MBE variants using the<br />
Alternatives (aalt) feature from the OTF spec.<br />
Partly support is implemented for: CNS 11643 GB18030 Japanese Korean</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6261">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6262">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6202">
Anyways to install issue command in terminal:</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6146">
<br /></div>
<blockquote class="tr_bq">
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6161">
# zypper install arphic-ukai-fonts arphic-uming-fonts</div>
</blockquote>
<div id="yui_3_16_0_ym19_1_1472910429011_6289">
<br /></div>
<div id="yui_3_16_0_ym19_1_1472910429011_6278">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6158">
Alternatively
there is the Google SANS NOTO Fonts you can just install the
noto-sans-cjk-fonts: which contains Chinese, Japanese, Korean Font
Support from google sans noto CJK fonts, issue command in terminal:</div>
<blockquote class="tr_bq">
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5901">
# zypper install noto-sans-cjk-fonts</div>
</blockquote>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6043">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5225">
However
this font package though is about 70+MB Download but it will install
for support on all 3 CJK languages, you can choose to just install this
or install it with the other packages mentioned above, but this by
itself can support all 3 langauges, though with a bigger download size,
however even if you install all the packages mentioned in this article,
it still wont be as much as the gargantuan amount of packages opensuse
will install with option 1 mentioned earlier with GUI and ncurses YAST
way. </div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6378">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6379">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6386">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6388">
<br /></div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_6387">
NOTES:</div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5205">
-
All fonts packages mentioned here are available from
openSUSE-Tumbleweed-Oss REPO or your respective opensuse version OSS
REPO, so just make sure you have the OSS repository enabled in your
zypper repo list </div>
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5204">
- List fonts with this command: </div>
<blockquote class="tr_bq">
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5291">
$ fc-list</div>
</blockquote>
- Rebuilds cached list of fonts (after installing fonts and it doesnt work, run this command):<br />
<blockquote class="tr_bq">
<div id="yui_3_16_0_ym19_1_1472910429011_5652">
$ fc-cache -fv </div>
</blockquote>
<div id="yui_3_16_0_ym19_1_1472910429011_5653">
- You could just install everything mentioned here and rebuild the cache font list in one go with this command:</div>
<blockquote class="tr_bq">
<div data-setdir="false" dir="ltr" id="yui_3_16_0_ym19_1_1472910429011_5666">
# zypper install arphic-ukai-fonts arphic-uming-fonts
ipa-ex-mincho-fonts ipa-mincho-fonts ipa-pmincho-fonts xano-mincho-fonts
baekmuk-bitmap-fonts baekmuk-ttf-fonts noto-sans-cjk-fonts && fc-cache -fv </div>
</blockquote>
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-34659897082748611632016-09-01T13:41:00.002-07:002016-09-03T08:04:19.096-07:00Clamav Linux Anti-virus Clamav Linux Anti-virus <br />
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74346">
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74346">
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74346">
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74346">
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74346">
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74346">
First Install Clamav: </div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74346">
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74346">
Install clamav in Archlinux:<br />
<blockquote class="tr_bq">
$ <span class="st">sudo pacman -Sy clamav</span> </blockquote>
Install clamav in Slackware from a slackbuild script from slackbuilds.org</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74170">
Install clamav in Debian:<br />
<blockquote class="tr_bq">
$ sudo apt-get install clamav </blockquote>
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74170">
Install clamav in OpenSUSE:<br />
<blockquote class="tr_bq">
$ zypper install clamav </blockquote>
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74170">
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74170">
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74170">
Check the clamav version:<br />
<blockquote class="tr_bq">
$ clamdscan -V</blockquote>
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74170">
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74935">
<code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74154"><br /></code></div>
<h2 id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74264">
Terminal Usage:</h2>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74265">
At first you have to update the virus definitions with:</div>
<blockquote class="tr_bq">
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74266"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74267"># freshclam
</code></pre>
</blockquote>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74268">
Then you can scan for viruses.</div>
<blockquote class="tr_bq">
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74269"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74270"># clamscan OPTIONS File/Folder
</code></pre>
</blockquote>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74271">
If necessary start with root permissions: <code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74272">sudo clamscan</code>.</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74273">
<b id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74274">Examples:</b></div>
<ul dir="ltr" id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74275">
<li id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74276"><div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74277">
To check all files on the computer, displaying the name of each file:</div>
<blockquote class="tr_bq">
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74278"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74279"># clamscan -r /
</code></pre>
</blockquote>
</li>
<li id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74280"><div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74281">
To check all files on the computer, but only display infected files and ring a bell when found:</div>
<blockquote class="tr_bq">
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74282"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74283"># clamscan -r --bell -i /
</code></pre>
</blockquote>
</li>
<li id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74284"><div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74285">
To scan all files on the computer but only display infected files when found and have this run in the background:</div>
<blockquote class="tr_bq">
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74286"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74287"># clamscan -r -i / &
</code></pre>
</blockquote>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74288">
Note - Display background process's status by running the <code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74289">jobs</code> command.</div>
</li>
<li id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74290"><div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74291">
To check files in the all users home directories:</div>
<blockquote class="tr_bq">
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74292"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74293"># clamscan -r /home
</code></pre>
</blockquote>
</li>
<li id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74294"><div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74295">
To check files in the <code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74296">USER</code> home directory and move infected files to another folder:</div>
<blockquote class="tr_bq">
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74297"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74298"># clamscan -r --move=/home/USER/VIRUS /home/USER
</code></pre>
</blockquote>
</li>
<li id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74299"><div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74300">
To check files in the <code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74301">USER</code> home directory and remove infected files (<b id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74302">WARNING:</b> Files will be removed):</div>
<blockquote class="tr_bq">
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74303"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74304"># clamscan -r --remove /home/USER</code></pre>
</blockquote>
</li>
<li id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74299"><div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74306">
Another possibility is to move the infected files to another folder with the option <code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75082">--move=FOLDER</code>, so you can later check which files of them maybe not infected or a virus. <code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75083">example: </code><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75083"></code><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75083"></code><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75083"> </code><br />
<blockquote class="tr_bq">
<code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75083"># mkdir -p home/USER/QUARANTINED && clamscan -r --move=/home/USER/QUARANTINED /home/USE</code></blockquote>
</div>
</li>
<li id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74299"><div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74619">
<code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75083"></code>To see more options:<code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74308"></code> <code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74308"> </code><br />
<blockquote class="tr_bq">
<code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74308"> </code><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74308"># clamscan --help</code> </blockquote>
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74619">
</div>
</li>
</ul>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75091">
<b>To put all the infected files list on a particular file: </b><br />
<blockquote class="tr_bq">
<pre># clamscan -r /path-to-folder-to-scan/ | grep FOUND >> /path-to-file/clamav-log.txt</pre>
</blockquote>
</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75091">
<br /></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75091">
<br /></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74921">
<b>Updating Clamav: </b></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74611">
<br /></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74382">
Update clamav in command line: </div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74911">
<br /></div>
<blockquote class="tr_bq">
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74910">
# freshclam </div>
</blockquote>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74910">
<br /></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74910">
<br /></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74674">
<br /></div>
<div dir="ltr" id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74728">
<b>Clamav Common Update Problems and Troubleshooting:</b></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74727">
<br /></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74737">
<br /></div>
<div dir="ltr" id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74719">
1.) If you get an error saying something like: </div>
<div dir="ltr" id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74765">
<br /></div>
<div dir="ltr" id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74816">
ERROR: Can't open /var/log/clamav/freshclam.log in append mode (check permissions!).<br />
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).</div>
<div dir="ltr" id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74713">
<br /></div>
<div dir="ltr" id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74714">
The Fix is - Check file permissions and make clamav runnable with your user or better run it with sudo or as root</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74601">
<br /></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75265">
<br /></div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74847">
2.) If you get an error like this despite running as root or with sudo with freshclam update command:</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74848">
<br /></div>
<div dir="ltr" id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74849">
ERROR: /var/log/clamav/freshclam.log is locked by another process<br />
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).</div>
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74929">
The Fix is - Delete the file ( /var/log/clamav/freshclam.log) with this command: </div>
<blockquote class="tr_bq">
<div id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74909">
# rm -rf /var/log/clamav/freshclam.log</div>
</blockquote>
<h2 id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74470">
</h2>
<h2 id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74470">
for a GUI for clamav, install clamtk (debian)</h2>
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74475"></pre>
<blockquote>
<code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75232"># apt-get install clamtk
<b id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75297"><br /></b></code><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75232">
</code></blockquote>
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74475"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75232"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75232"><b id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75297">Clamav Config Files:</b></code> </code></pre>
<pre id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_74475"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75232">The Config file of clamav updater is in </code><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75284"><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75233">etc/clamav/freshclam.conf</code>
The Config file of the main clamav scanner is in </code><code id="yiv5672026182yui_3_16_0_ym19_1_1472508100899_75285">/etc/clamav/clamd.conf
</code></pre>
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-80731451178568065332016-08-23T19:00:00.000-07:002016-09-16T14:59:09.040-07:00How to Burn a Bootable ISO Image to Disc in a Linux TerminalHow to Burn a Bootable ISO Image to Disc in a Linux Terminal: <br />
<br />
<br />
There are many good free GUI apps to burn bootable linux iso images to disc in linux like k3b, brasero, xfburn and even the many free GUI burner apps for windows such as CdBurnerXP, ImgBurn, Infrarecorder, Active ISO Burner, BurnCDCC, Free ISO Burner, ISOBurn, ISO Recorder, Passcape ISO Burner, ISO Workshop, Free Any Burn, Windows 7 Built-in Disc Image Burner etc etc, and even free linux CLI apps like cdrecord and many others, in this article however I will just mention 3 quick command line apps that are most common in linux distributions and mention an extra 4th choice, thats a menu driven linux CLI burning app for last<br />
<br />
In the examples used here the default internal burner of the laptop is set as /dev/sr0, If your burner is not /dev/sr0, replace the device with the one your system uses.<br />
<br />
Insert your blank CD/DVD/BD-R/RW then choose a method below<br />
<br />
<br />
1.) wodim, issue command at terminal:<br />
<br />
<blockquote>
# wodim -v -eject -data -dao dev=/dev/sr0 speed=4 /path-to-bootable-linux-iso/foo.iso</blockquote>
<br />
- It is recommended to run wodim as root even if you can run it as a normal user to avoid errors and instability, read more about it in the notes below, and check the link provided there for further reading.<br />
- For choosing Write Modes use DAO as primary choice or as a secondary choice use SAO for burning bootable ISO to disc, when using wodim anyways if you issue -dao as an option and for some reason its not possible to use DAO, wodim will automatically switch to using SAO, so to be safe just use the option DAO as -dao <br />
- For wodim if the typical format of /dev/<foo> (/dev/sr0 here), doesnt work, issue the command:<br />
<br />
<blockquote>
# wodim --devices</blockquote>
<br />
- A sample output of a laptop say for example with an internal DVD writer and another external USB DVD Writer drive plugged in will show:<br />
<br />
wodim: Overview of accessible drives (2 found) :<br />
-------------------------------------------------------------------------<br />
0 dev='/dev/sg1' rwrw-- : 'HL-DT-ST' 'DVDRAM GUD0N'<br />
1 dev='/dev/sg4' rwrw-- : 'Optiarc' 'DVD RW AD-7560S'<br />
-------------------------------------------------------------------------<br />
<br />
- Note how /dev/sr0 is referenced as /dev/sg1 with wodim and /dev/sr1 referenced as /dev/sg4 with wodim, but when you use lsblk command the output would show:<br />
<br />
sr0 11:0 1 20.5M 0 rom <br />
sr1 11:1 1 1024M 0 rom <br />
<br />
- Both devices as /dev/sr0 as the internal laptop dvd writer and /dev/sr1 as the 2nd burner device as a usb plugged in external dvd writer<br />
- So in this case if you want to use sr0 or sr1 devices for burning you can try:<br />
<br />
(1st device, /dev/sr0)<br />
<blockquote>
# wodim -v -eject -data -dao dev=/dev/sg1 speed=4 /path-to-bootable-linux-iso/foo.iso</blockquote>
<br />
/or<br />
<br />
(2nd device, /dev/sr1)<br />
<blockquote>
# wodim -v -eject -data -dao dev=/dev/sg4 speed=4 /path-to-bootable-linux-iso/foo.iso</blockquote>
<br />
- A sample verbose output of a successful DVD iso burn with wodim in terminal, using a gentoo linux live iso for example:<br />
<br />
<blockquote>
# wodim -v -eject -data -dao dev=/dev/sg1 speed=4 /home/lowfatdaemon/Downloads/Gentoo/livedvd-amd64-multilib-20160514.iso</blockquote>
<br />
<br />
TOC Type: 1 = CD-ROM<br />
scsidev: '/dev/sg1'<br />
devname: '/dev/sg1'<br />
scsibus: -2 target: -2 lun: -2<br />
Linux sg driver version: 3.5.36<br />
Wodim version: 1.1.11<br />
SCSI buffer size: 64512<br />
Device type : Removable CD-ROM<br />
Version : 5<br />
Response Format: 2<br />
Capabilities :<br />
Vendor_info : 'HL-DT-ST'<br />
Identification : 'DVDRAM GUD0N '<br />
Revision : '1.00'<br />
Device seems to be: Generic mmc2 DVD-R/DVD-RW.<br />
Current: 0x0011 (DVD-R sequential recording)<br />
Profile: 0x0012 (DVD-RAM)<br />
Profile: 0x002B (DVD+R/DL)<br />
Profile: 0x001B (DVD+R)<br />
Profile: 0x001A (DVD+RW)<br />
Profile: 0x0016 (DVD-R/DL layer jump recording)<br />
Profile: 0x0015 (DVD-R/DL sequential recording)<br />
Profile: 0x0014 (DVD-RW sequential recording)<br />
Profile: 0x0013 (DVD-RW restricted overwrite)<br />
Profile: 0x0011 (DVD-R sequential recording) (current)<br />
Profile: 0x0010 (DVD-ROM)<br />
Profile: 0x000A (CD-RW)<br />
Profile: 0x0009 (CD-R)<br />
Profile: 0x0008 (CD-ROM)<br />
Profile: 0x0002 (Removable disk)<br />
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).<br />
Driver flags : SWABAUDIO BURNFREE<br />
Supported modes: PACKET SAO<br />
Drive buf size : 294912 = 288 KB<br />
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device<br />
communication breaks or freezes immediately after that.<br />
FIFO size : 12582912 = 12288 KB<br />
Track 01: data 2839 MB <br />
Total size: 3261 MB (323:05.10) = 1453883 sectors<br />
Lout start: 3261 MB (323:07/08) = 1453883 sectors<br />
Current Secsize: 2048<br />
HINT: use dvd+rw-mediainfo from dvd+rw-tools for information extraction.<br />
Blocks total: 2298496 Blocks current: 2298496 Blocks remaining: 844613<br />
Speed set to 5540 KB/s<br />
Starting to write CD/DVD at speed 4.0 in real SAO mode for single session.<br />
Last chance to quit, starting real write in 0 seconds. Operation starts.<br />
Waiting for reader process to fill input buffer ... input buffer ready.<br />
Performing OPC...<br />
Sending CUE sheet...<br />
Starting new track at sector: 0<br />
Track 01: 2839 of 2839 MB written (fifo 100%) [buf 60%] 3.9x.<br />
WARNING: padding up to secsize.<br />
Track 01: Total bytes read/written: 2977551360/2977552384 (1453883 sectors).<br />
Writing time: 594.333s<br />
Average write speed 3.7x.<br />
Min drive buffer fill was 55%<br />
Fixating...<br />
Fixating time: 35.103s<br />
wodim: fifo had 46900 puts and 46900 gets.<br />
wodim: fifo was 0 times empty and 26857 times full, min fill was 97%.<br />
<br />
- Upon finishing the burning process, with the command using the option -eject, the system will automatically eject the disc, so you know its done. <br />
- The successful iso burn result, was a bootable gentoo live DVD disc.<br />
<br />
<br />
Troubleshooting Wodim:<br />
- If command "wodim --devices" doesnt work or you get some error (being root), you can also try one of the following:<br />
<br />
<blockquote class="tr_bq">
# wodim -scanbus</blockquote>
<br />
or <br />
<br />
<blockquote class="tr_bq">
# wodim dev=help --devices</blockquote>
<br />
- If you get issues or an error saying: cannot open SCSI driver, try using the command lsblk, and look for the corresponding rom devices, if you see sr(n) where n is a number like for example sr0 listed as rom, if so then, try using these commands:<br />
<br />
<blockquote class="tr_bq">
# wodim dev=/dev/sr0 --devices </blockquote>
<br />
or<br />
<br />
<blockquote class="tr_bq">
# wodim dev=/dev/sr0 --scanbus</blockquote>
<br />
- If you get output similar to these below, from the above commands that means you're all good and the device/s work, just use the sr(n) label for devices in this case sr0 for burning:<br />
<br />
<br />
wodim: Overview of accessible drives (1 found) :<br />
-------------------------------------------------------------------------<br />
0 dev='/dev/sr0' rwrw-- : 'HL-DT-ST' 'DVDRAM GUD0N'<br />
-------------------------------------------------------------------------<br />
<br />
and<br />
<br />
scsibus2:<br />
2,0,0 200) 'HL-DT-ST' 'DVDRAM GUD0N ' '1.00' Removable CD-ROM<br />
2,1,0 201) *<br />
2,2,0 202) *<br />
2,3,0 203) *<br />
2,4,0 204) *<br />
2,5,0 205) *<br />
2,6,0 206) *<br />
2,7,0 207) *<br />
<br />
- You can also check to see if your kernel has support for burning or the proper kernel modules are loaded, Use lsmod command to check for modules named "sr_mod" and "sg", issue command:<br />
<br />
<blockquote class="tr_bq">
$ lsmod | grep sr_mod</blockquote>
<br />
and<br />
<br />
<blockquote class="tr_bq">
$ lsmod | grep sg </blockquote>
<br />
- If it is built
into kernel then check output command of dmesg.<br />
- You could also check permissions for device at /dev/sr0, issue command:<br />
<br />
<blockquote class="tr_bq">
$ ls -l /dev/sr0</blockquote>
<br />
- Make sure to be root user when using wodim, to avoid errors and complications <br />
<br />
-----------------------------------------------------------------------------------------------------------------------------------------------------------<br />
<br />
2.) geniosimage, issue command at terminal:<br />
<br />
<blockquote>
$ genisoimage -r -J -o /path-to-bootable-linux-iso/foo.iso /dev/sr0</blockquote>
<br />
-----------------------------------------------------------------------------------------------------------------------------------------------------------<br />
<br />
3.) growisofs, issue command at terminal:<br />
<br />
(for CD)<br />
<br />
<blockquote>
$ growisofs -speed=4 -use-the-force-luke=dao -Z /dev/sr0=/path-to-bootable-linux-iso/foo.iso</blockquote>
<br />
/or<br />
<br />
(for DVD)<br />
<br />
<blockquote>
$ growisofs -speed=4 -dvd-compat -use-the-force-luke=dao -Z /dev/sr0=/path-to-bootable-linux-iso/foo.iso</blockquote>
<br />
- The -dvd-compat option is also used so that a complete lead-out is written to the media for maximum compatibility.<br />
- The option -use-the-force-luke sets the write mode in this example DAO is used (and it is recommended for burning bootable ISO files to discs), as -use-the-force-luke=dao, see notes below for some information about write modes<br />
<br />
-----------------------------------------------------------------------------------------------------------------------------------------------------------<br />
<br />
4.) bashburn, install bashburn and run it in command line:<br />
<br />
<blockquote>
$ bashburn</blockquote>
<br />
- Go through the menus to edit configurations and burn your iso<br />
<br />
<br />
-----------------------------------------------------------------------------------------------------------------------------------------------------------<br />
<br />
<br />
Notes:<br />
- Make sure the apps you use here are installed in your system, if not then install them the way you would as your other apps in your chosen linux distribution<br />
- Before burning downloaded bootable linux ISO file make sure the ISO file has been verified with its indicated checksum, from the upstream source where you got it from<br />
- When burning bootable linux iso to disc (or even any data like audio files), its better to use a slower burning speed, safe choices are speeds of 2 or 4, slow burning is less error prone and allows the burning process to be done correctly and puts less stress on the CPU, burn in slow speeds to avoid making coasters (useless discs or a non-rewritable disc whose burn failed for any reason and cannot be repaired.).<br />
- About Write Modes 101 (TAO, DAO, SAO, RAW, IPW):<br />
<br />
Track-At-Once<br />
CD content is subdivided into consecutive sets of sectors known as tracks. In Track-At-Once (TAO) mode the laser stopped and restarted between each track. This delay causes transitional areas, known as pre-gaps between the tracks. These cannot be avoided, but recorders which support Variable-Gap Track-At-Once can adjust the size of the pre-gap to a minimum of 2 sectors (2/75 of a second).<br />
With most drives TAO mode is required for multi-session recording.<br />
<br />
Disc-At-Once<br />
In Disc-At-Once (DAO) mode disc contents are recorded in a single pass without stopping the laser. This allows data to be written to the the pre-gap areas to avoid them altogether.<br />
<br />
Session-At-Once<br />
In Session at Once (SAO) mode multiple sessions can be recorded and finalized on a single disc. The resulting disc can be read by computer drives, but sessions after the first are generally not readable by CD Audio equipment.<br />
In Wodim, the DAO and SAO modes are synonymous. While most drives require multi-session discs to be authored in TAO mode, Wodim also has support for creating multi-session discs in SAO mode, assuming the underlying disc drive supports this.<br />
<br />
Raw Mode<br />
Disc images of CD-ROMs can be created either in raw mode (extracting 2,352 bytes per sector independent of the sector mode) or by obtaining only the actual data in the sector (2,048/2,336/2,352/2,324 bytes depending on the sector mode).The file size of raw mode disc images is always a multiple of 2,352 bytes. When such disc images are written to an optical media in raw mode, the 2,352 byte sectors, which already include the synchronization pattern and possibly error detection and correction data, are written to the disc as they are.<br />
<br />
Packet Writing<br />
Incremental Packer Writing (IPW) allows optical discs to be used in a manner similar to a writable block devices, i.e. it allows files to be created, modified or deleted on demand. This is achieved by writing a series of short (32k-256k) tracks on the disk in packet mode. CD-R/RW discs can be formatted into such packets, and the kernel pktcdvd module (packet writing driver) buffers up writes to the disk and transparently handles erasing and rewriting a whole packet at a time.<br />
<br />
<br />
*In short when burning bootable linux ISO to disc, especially if its a DVD ISO it is best to just use DAO or as a secondary use SAO if DAO is not in the choices available for you, for writing audio CDs and you want a gap in between songs, use TAO.<br />
- It is recommended to run wodim as root, as it says in ("http://linux.die.net/man/1/wodim"), excerpt "In any case, the user running wodim needs read and write access to the particular device file on a Linux system. It is recommended to be root or install the application as suid-root, because certain versions of Linux (kernel) limit the set of SCSI commands allowed for non-root users. Even if usage without root identity is possible in many cases, some device drivers still may fail, show unexplainable problems and generally the problems become harder to debug. The risk for buffer-underruns is also increased. See the PROCESS SCHEDULING PRIORITY section below for more details. " I've actually tried using it on a non-root user and it does give errors and problems, to avoid coasters and wasting your time just run it as root user.<br />
- If for some reason you can't eject it with the button on your cd/dvd drive, or you just want to eject with a terminal command, you can eject it with the following commands:<br />
<br />
<blockquote>
$ eject</blockquote>
<br />
/or (to eject a specific rom device, especially if you have several rom devices plugged in where your rom is sr0 here if it isnt, replace the device with the one your system uses.)<br />
<br />
<blockquote>
$ eject /dev/sr0</blockquote>
<br />
<br />
Reference Links:<br />
- "ftp://ftp.slackware.com/pub/slackware/slackware-current/isolinux/README.TXT"<br />
- "https://www.freebsd.org/doc/handbook/creating-dvds.html"Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-22624778083199476402016-08-23T18:55:00.004-07:002016-08-23T18:55:44.736-07:00How to find out what device name in /dev directory is my DVD/CD Writer/Burner in the Linux TerminalHow to find out what device name in /dev directory is my DVD/CD Writer/Burner in the Linux Terminal<br />
<br />
<br />
Best 3 ways on how to find out what device name in /dev directory is your DVD/CD Writer/Burner in the Linux Terminal: <br /><br /><br /><br />1.) By checking /proc/sys/dev/cdrom/ , issue command in terminal:<br /><br />
<blockquote>
$ cat /proc/sys/dev/cdrom/</blockquote>
<br /> /or<br /><br />
<blockquote>
$ less /proc/sys/dev/cdrom/</blockquote>
<br /> /or<br /><br />
<blockquote>
$ more /proc/sys/dev/cdrom/</blockquote>
<br />- a sample output in a laptop can look like this (showing other data including other device functions and even the drive speed):<br /><br />drive name: sr0<br />drive speed: 24<br />drive # of slots: 1<br />Can close tray: 1<br />Can open tray: 1<br />Can lock tray: 1<br />Can change speed: 1<br />Can select disk: 0<br />Can read multisession: 1<br />Can read MCN: 1<br />Reports media changed: 1<br />Can play audio: 1<br />Can write CD-R: 1<br />Can write CD-RW: 1<br />Can read DVD: 1<br />Can write DVD-R: 1<br />Can write DVD-RAM: 1<br />Can read MRW: 1<br />Can write MRW: 1<br />Can write RAM: 1<br /><br />- The device name is: sr0<br />- So the device is in /dev/sr0<br /><br /><br />2.) With lsblk, issue command in terminal:<br /><br />
<blockquote>
$ lsblk</blockquote>
<br />- a sample output in a laptop can look like this:<br /><br />NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT<br />sda 8:0 0 111.8G 0 disk<br />├─sda1 8:1 0 300M 0 part<br />├─sda2 8:2 0 128M 0 part<br />├─sda3 8:3 0 110.5G 0 part<br />└─sda4 8:4 0 900M 0 part<br />sr0 11:0 1 4.4G 0 rom <br />loop0 7:0 0 765M 1 loop /lib/live/mount/rootfs/filesystem.squashfs<br />zram0 254:0 0 1002M 0 disk<br />zram1 254:1 0 1002M 0 disk<br />zram2 254:2 0 1002M 0 disk<br />zram3 254:3 0 1002M 0 disk<br />zram4 254:4 0 1002M 0 disk<br />zram5 254:5 0 1002M 0 disk<br />zram6 254:6 0 1002M 0 disk<br />zram7 254:7 0 1002M 0 disk <br /><br />- In the TYPE Column look for ROM, so the device name here is sr0<br />- So the device is in /dev/sr0<br /><br /><br />3.) With inxi, issue command in terminal, make sure to type is as you see it, that O in Optical has to be capitalized, or just copy and paste it:<br /><br />
<blockquote>
$ inxi -d | grep Optical</blockquote>
<br />- a sample output in a laptop can look like this:<br /><br />Optical: /dev/sr0 model: HL-DT-ST DVDRAM GUD0N dev-links: N/A<br /><br />- The device name is sr0, in /dev as /dev/sr0<br /><br />Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-86682246389454320252016-08-23T18:52:00.002-07:002016-08-23T18:52:36.865-07:00Where Best to Put your Local User Scripts in a GNU/Linux system?Where Best to Put your Local User Scripts in a GNU/Linux system? <br />
<br />
In General its best to put it in /usr/local/bin/<br /><br />
If you have to ask then Don't use these directories to store your user scripts:<br /><br />/usr/bin, /sbin and /bin<br /><br />Leave them for package-managed executables.<br /><br />If you need the script for all users on your system (but you can also use this for one user), stick it in /usr/local/bin/. An advantage to this is that the directory is already in your PATH so there is no need to edit files.<br /><br />But it can also depend in who will use the scripts<br />
<br />
<br /><br />
It depends on who will use your script:<br /><br /> Yourself only - $HOME/bin <br /> You and other local users - /usr/local/bin<br /> Root only - /usr/local/sbin<br /><br />That way you have your own scripts separated from the distribution-provided binaries.<br /><br />Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-40741360647771346252016-08-23T18:49:00.001-07:002016-08-23T18:49:24.902-07:00Extract Files from Archived Tarballs at the Terminal in LinuxExtract Files from Archived Tarballs at the Terminal in Linux<br /><br /><br />Modern tar recognizes the format by itself! One command works with any supported compression method.<br /><br />
<blockquote>
$ tar xf archive.tar.xz</blockquote>
<blockquote>
$ tar xf archive.tar.gz<br />
<br />
$ tar xf archive.tar.bz2 <br /><br />
$ tar xf archive.tar</blockquote>
<br /><br /><br />Adding a v will make the output verbose (ex: tar xvf or tar xfv actually the order doesnt really matter)<br /><br /><br />(Legacy Support: For the older versions for tar.gz its $ tar xvfz somefilename.tar.gz but still applicable though like it mentions above xf is enough in most cases) <br /><br />For the Bunzip2 or bzip2 or bz2 or tar.bz2 file in a single step, add the j switch: <br /><br />
<blockquote>
$ tar xfj somefilename.tar.bz2 or $ tar xvfj somefilename.tar.bz2</blockquote>
<br />Take not that its using a lowercase j as a capital J is for a different option switch as mentioned below <br /><br />
<blockquote>
$ tar -xJf file.pkg.tar.xz</blockquote>
<br />(The -J is the flag that specifically deals with .xz files.)<br /><br />(For basic unzipping)<br />
<blockquote>
$ unzip file.zip</blockquote>
<br />or<br /><br />(to extract to a certain directory)<br /><br />
<blockquote>
$ unzip file.zip -d destination_directory/</blockquote>
<br /><br />In 7zip: <br /><br />This command lists the contents of the zip:<br />
<blockquote>
$ 7z l zipfile.zip</blockquote>
<br />This command extracts the contents of the zip:<br />
<blockquote>
$ 7z x zipfile.zip</blockquote>
<br /><br />To unrar, within the directory (the e option extracts):<br />
<blockquote>
$ unrar e foo_file.rar</blockquote>
<br />To unrar to a specified directory:<br />
<blockquote>
$ unrar e foo_file.rar destination_directory/</blockquote>
<br />To unrar with its own original directory structure<br />
<blockquote>
$ unrar x foo_file.rar</blockquote>
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-23339339010563029812016-08-23T18:40:00.004-07:002016-08-23T18:42:17.739-07:00How to Change Ownership of a Directory in LinuxHow to Change Ownership of a Directory in Linux:<br />
<br />
- This is the format for the command:<br />
<blockquote>
# chown -Rv username:group directory</blockquote>
(-R switch is to make it recursive that means to change the permissions for all files and directories inside of the directory)<br />
(-v switch makes it verbose, its optional)<br />
<br />
For Example:<br />
<br />
- Say your using semplice linux (a debian sid based distro) in a live session and used # apt-get source foo to download and unpack the source code of a package, then you notice that you cant access the files or change the contents of that folder, because in live sessions semplice uses luckyuser as the normal user and the usergroup as well for that user, but to use apt-get source you have to be root, therefor downloading source with apt-get will make that directory under the group ownership of root, and when you check<br />
file details you will see it listed with root:root meaning root user on root group, while any file made with luckyuser is normal user<br />
<br />
- So lets say the source package was emacs-defaults-46.1 it was also unpacked from the package.tar.xz, but you cannot change the contents of the directory in anyway, despite even trying to change user rights on it, you have to change the group ownership<br />
<br />
- To do that you look at the emacs-defaults_46.1.tar.xz ownership it says root:root meaning it belongs to root user as owner and group, to change it you need to make it luckyuser:luckyuser, so issue the command:<br />
<br />
(the command format is: # chown -R username:group directory)<br />
<br />
<blockquote>
# chown -Rv luckyuser:luckyuser emacs-defaults-46.1</blockquote>
<br />
- This changes ownership to luckyuser from root, now all the settings allowed to root is allowed to luckyuser user and group <br />
- You can now edit the directory and all of its contents or even delete it completely<br />
<br />
<br />
<br />Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-30460029248545897832016-08-23T18:33:00.001-07:002016-08-23T18:35:01.678-07:00How to Upgrade a Specific Package and Nothing Else in Debian:How to Upgrade a Specific Package and Nothing Else in Debian:<br />
<br />
<blockquote>
# apt-get install --only-upgrade <packagename></blockquote>
<br />
ex:<br />
<br />
<blockquote>
# apt-get install --only-upgrade htop</blockquote>
<br />
- This command will only upgrade the already installed htop package in your debian system, and not upgrade anything else Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-11435725572384611222016-08-23T18:29:00.002-07:002016-09-03T07:57:31.170-07:00Install Asian CJK Langauge Font Character Support in Debian (in this case Japanese, Chinese, Korean) Install Asian CJK Langauge Font Character Support in OpenSUSE (in this case Japanese, Chinese, Korean):<br />
<br />
<br />
Issue command at terminal:<br />
<br />
<blockquote>
# apt-get install fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core xfonts-intl-asian fonts-noto-cjk</blockquote>
<br />
<br />
<br />
NOTES:<br />
<br />
- List fonts with this command:<br />
<br />
<br />
<blockquote>
$ fc-list</blockquote>
<br />
- Rebuilds cached list of fonts (after installing fonts and it doesnt work, run this command):<br />
<br />
<br />
<blockquote>
$ fc-cache -fv</blockquote>
<br />
- So a better way to install it all and rebuild the cache list of fonts after in one command:<br />
<br />
<br />
<blockquote>
# apt-get install fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core xfonts-intl-asian fonts-noto-cjk && fc-cache -fv</blockquote>
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-25089755837720320012016-08-23T18:15:00.002-07:002016-08-23T18:23:15.460-07:00How to Fix Common Broken Dependencies Problem with APT in Debian Linux <div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20206">
How to Fix Common Broken Dependencies Problem with APT in Debian Linux:</div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20206">
</div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20206">
</div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20206">
</div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20206">
Example with Google Chrome<br />
<br />
*Fixing Dependencies with apt-get -f install After installing a .deb Binary with dpkg </div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20264">
<br />
*After downloading Google Chrome Debian from Google, then installe it with dpkg </div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20518">
<br id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20421" />
<blockquote>
# dpkg -i google-chrome-*.deb</blockquote>
</div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20518">
<br id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20422" />
Selecting previously unselected package google-chrome-stable.<br />
(Reading database ... 118596 files and directories currently installed.)<br />
Preparing to unpack google-chrome-stable_current_amd64.deb ...<br />
Unpacking google-chrome-stable (52.0.2743.82-1) ...<br />
dpkg: dependency problems prevent configuration of google-chrome-stable:<br />
google-chrome-stable depends on fonts-liberation; however:<br />
Package fonts-liberation is not installed.<br />
google-chrome-stable depends on libappindicator1; however:<br />
Package libappindicator1 is not installed.<br />
<br id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20432" />
dpkg: error processing package google-chrome-stable (--install):<br />
dependency problems - leaving unconfigured<br />
Processing triggers for gnome-menus (3.13.3-6) ...<br />
Processing triggers for desktop-file-utils (0.22-1) ...<br />
Processing triggers for mime-support (3.59) ...<br />
Processing triggers for man-db (2.7.5-1) ...<br />
Processing triggers for menu (2.1.47) ...<br />
Errors were encountered while processing:<br />
google-chrome-stable</div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20519">
<br /></div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20532">
*Google Chrome was installed but it had some errors with some missing dependencies, doing </div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20532">
</div>
<blockquote class="tr_bq">
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20532">
# apt-get -f install </div>
</blockquote>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20532">
</div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20532">
, fixes this</div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20533">
<br id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20442" />
Reading package lists... Done<br />
Building dependency tree <br />
Reading state information... Done<br />
Correcting dependencies... Done<br />
The following additional packages will be installed:<br />
fonts-liberation libappindicator1 libdbusmenu-gtk4 libindicator7<br />
The following NEW packages will be installed:<br />
fonts-liberation libappindicator1 libdbusmenu-gtk4 libindicator7<br />
0 upgraded, 4 newly installed, 0 to remove and 757 not upgraded.<br />
1 not fully installed or removed.<br />
Need to get 1,031 kB of archives.<br />
After this operation, 2,566 kB of additional disk space will be used.<br />
Do you want to continue? [Y/n] <br />
Get:1 http://ftp.debian.org/debian unstable/main amd64 fonts-liberation all 1.07.4-1 [835 kB]<br />
Get:2 http://ftp.debian.org/debian unstable/main amd64 libdbusmenu-gtk4 amd64 12.10.2-1 [90.8 kB]<br />
Get:3
http://ftp.debian.org/debian unstable/main amd64 libindicator7 amd64
0.5.0-3 [52.6
kB]
<br />
Get:4
http://ftp.debian.org/debian unstable/main amd64 libappindicator1 amd64
0.4.92-4 [52.5
kB]
<br />
Fetched
1,031 kB in 7s (130
kB/s)
<br />
Selecting previously unselected package fonts-liberation.<br />
(Reading database ... 118702 files and directories currently installed.)<br />
Preparing to unpack .../fonts-liberation_1.07.4-1_all.deb ...<br />
Unpacking fonts-liberation (1.07.4-1) ...<br />
Selecting previously unselected package libdbusmenu-gtk4:amd64.<br />
Preparing to unpack .../libdbusmenu-gtk4_12.10.2-1_amd64.deb ...<br />
Unpacking libdbusmenu-gtk4:amd64 (12.10.2-1) ...<br />
Selecting previously unselected package libindicator7:amd64.<br />
Preparing to unpack .../libindicator7_0.5.0-3_amd64.deb ...<br />
Unpacking libindicator7:amd64 (0.5.0-3) ...<br />
Selecting previously unselected package libappindicator1:amd64.<br />
Preparing to unpack .../libappindicator1_0.4.92-4_amd64.deb ...<br />
Unpacking libappindicator1:amd64 (0.4.92-4) ...<br />
Setting up libindicator7:amd64 (0.5.0-3) ...<br />
Setting up fonts-liberation (1.07.4-1) ...<br />
Setting up libdbusmenu-gtk4:amd64 (12.10.2-1) ...<br />
Processing triggers for libc-bin (2.21-7) ...<br />
Processing triggers for fontconfig (2.11.0-6.3) ...<br />
Setting up libappindicator1:amd64 (0.4.92-4) ...<br />
Setting up google-chrome-stable (52.0.2743.82-1) ...<br />
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode<br />
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode<br />
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode<br />
Processing triggers for libc-bin (2.21-7) ...<br />
Processing triggers for menu (2.1.47) ...</div>
<div id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20557">
<br /></div>
<div id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20560">
*Google Chrome now works, broken dependency issue now fixed </div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20555">
<br /></div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20572">
<br /></div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20573">
Further Notes:</div>
<div dir="ltr" id="yiv7255955756yui_3_16_0_ym19_1_1470029857736_20616">
-
The command # apt-get -f install is usually used for when
troubleshooting debian based system when there are installation
dependency issues or upgrade issues after </div>
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-54207625015990658862016-08-23T18:06:00.002-07:002016-08-23T18:06:43.698-07:00How to Install Google Chrome Web Browser in DebianA) Install Google Chrome in Debian with apt-get:<br /><br />1.) Issue command at terminal<br /><br />
<blockquote>
$ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -</blockquote>
<br />2.) Then edit /etc/apt/sources.list with an editor<br /><br />
<blockquote>
# emacs -nw /etc/apt/sources.list </blockquote>
<br />paste the following: deb http://dl.google.com/linux/chrome/deb/ stable main<br /><br />save and exit.<br /><br />3.) Sync with repos <br /><br />
<blockquote>
# apt-get update</blockquote>
<br />4.) Install google chrome:<br /><br />
<blockquote>
# apt-get install google-chrome-stable </blockquote>
<br /><br />Notes:<br /><br /><br />*Actually you have a choice of different versions<br /> google-chrome-beta (for beta)<br /> google-chrome-stable (for stable)<br /> google-chrome-unstable (for unstable/bleeding edge<br /><br />*Recent versions of apt-get will automatically attempt to verify packages on download. If an appropriate key is not found or if the package is corrupted, you will get a message like the following:<br /> <br /> WARNING: The following packages cannot be authenticated! packagename<br /><br />If you see this using this method dont worry about it, just choose y to say yes, to install these packages without verification? [y/N] y and let it install<br /><br /><br />/or <br /><br /><br />B) Downloading the binary from google and installing with dpkg manually:<br /><br />1.) Open a terminal window.<br />2.) Type in the following commands then hit Enter after each.<br /><br />For 32-bit systems:<br />
<blockquote>
$ wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb<br /> # dpkg -i google-chrome-*.deb<br /> # apt-get install -f</blockquote>
<br />For 64-bit systems:<br />
<blockquote>
$ wget -c wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb<br /> # dpkg -i google-chrome-*.deb<br /> # apt-get install -f</blockquote>
<br /><br />Notes:<br />*To avoid error messages and annoying authentication errors with debian sources.list and google repo, its better to just download the binary and install with dpkg manually, even with debian sid <br />*When upgrading to a newer version, just download it again, and repeat the procedure, dpkg -i actually installs and upgrades the package if there is already an older version<br />*Reference to dpkg cheatsheet - <a href="http://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php">A dpkg Cheat Sheet</a>Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-89864906990109921302016-08-23T17:55:00.005-07:002016-08-23T17:55:49.100-07:00Enabling Normal Non-Root Users to Use Ping in Linux <div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_16882">
Enabling Normal Non-Root Users to Use Ping in Linux </div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_16882">
</div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_16882">
<br /></div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_16995">
- Sometimes you just want to ping a remote site or server to test something like your connection:</div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17093">
<br /></div>
<blockquote class="tr_bq">
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17000">
$ ping google.com</div>
</blockquote>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17040">
<br /></div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17042">
- but get this error:</div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17041">
</div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_16994">
ping: icmp open socket: Operation not permitted</div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17122">
<br /></div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17102">
- However ping works for the root user, just not non root users. To
enable ping for normal users, issue command below as root or use sudo:</div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17110">
<br /></div>
<blockquote class="tr_bq">
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17121">
# chmod u+s `which ping`</div>
</blockquote>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17362">
<br /></div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17384">
(Those are backticks not single quotes) </div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17384">
</div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17384">
/or </div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17339">
<br /></div>
<blockquote class="tr_bq">
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17338">
# chmod u+s /bin/ping</div>
</blockquote>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17123">
<br /></div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17145">
- Now it should work.</div>
<div dir="ltr" id="yiv4086180439yui_3_16_0_ym19_1_1470204776265_17313">
<br /></div>
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-24109939781301386292016-08-23T17:40:00.002-07:002016-08-23T17:56:18.843-07:00How to Install the Java (JDK) in OpenSUSE<b>How to Install the real Java (JDK) in OpenSUSE</b> <br />
<br />
(Tested Working in OpenSUSE Tumbleweed)<br />
<br />
The problem of installing openjdk in opensuse when you think you installed openjdk but when you do a javac -version or call javac from commandline it just doesnt work<br />
<br />
Well if you think of quickly installing openjdk 8 with zypper like this in commandline is gonna be enough:<br />
<br />
<br />
<blockquote>
# zypper se java-1_8_0-openjdk</blockquote>
<br />
Your actually just installing the JRE despite the name of the package which is likely to confuse anyone not familiar with opensuse, as it did me earlier, in defense of opensuse though, you can see why this is a problem is if you do a search with zypper and pay close attention to the packages and their corresponding summary definitions<br />
<br />
<blockquote>
# zypper se opendjk</blockquote>
<br />
Loading repository data...<br />
Reading installed packages...<br />
<br />
S | Name | Summary | Type <br />
--+---------------------------------------+------------------------------------------------------------------+--------<br />
| java-1_7_0-openjdk | SUSE's implementation of the OpenJDK 7 runtime environment | package <- (the Summary states its just the JRE7)<br />
| java-1_7_0-openjdk-accessibility | Accessibility connector for OpenJDK 7 | package<br />
| java-1_7_0-openjdk-bootstrap | SUSE's implementation of the OpenJDK 7 runtime environment | package<br />
| java-1_7_0-openjdk-bootstrap-devel | SUSE's implementation of the OpenJDK 7 Development Environment | package<br />
| java-1_7_0-openjdk-bootstrap-headless | OpenJDK 7 runtime environment without X, audio and video support | package<br />
| java-1_7_0-openjdk-demo | OpenJDK 7 Demos | package<br />
| java-1_7_0-openjdk-devel | SUSE's implementation of the OpenJDK 7 Development Environment | package <- (openJDK 7)<br />
| java-1_7_0-openjdk-headless | OpenJDK 7 runtime environment without X, audio and video support | package<br />
| java-1_7_0-openjdk-javadoc | OpenJDK 7 API Documentation | package<br />
| java-1_7_0-openjdk-plugin | Java Web Start and plugin implementation | package<br />
| java-1_7_0-openjdk-src | OpenJDK 7 Source Bundle | package<br />
| java-1_8_0-openjdk | OpenJDK 8 Runtime Environment | package <- (the Summary states its just the JRE8)*<br />
| java-1_8_0-openjdk-accessibility | OpenJDK 8 accessibility connector | package<br />
| java-1_8_0-openjdk-demo | OpenJDK 8 Demos | package<br />
| java-1_8_0-openjdk-devel | OpenJDK 8 Development Environment | package <- (And this is the the true openJDK 8)*<br />
| java-1_8_0-openjdk-headless | OpenJDK 8 Runtime Environment | package<br />
| java-1_8_0-openjdk-javadoc | OpenJDK 8 API Documentation | package<br />
| java-1_8_0-openjdk-plugin | Java Web Start and plugin implementation | package<br />
| java-1_8_0-openjdk-src | OpenJDK 8 Source Bundle | package<br />
| java-1_9_0-openjdk | OpenJDK Runtime Environment | package <- (the Summary states its just the JRE9)<br />
| java-1_9_0-openjdk-accessibility | OpenJDK accessibility connector | package<br />
| java-1_9_0-openjdk-demo | OpenJDK Demos | package<br />
| java-1_9_0-openjdk-devel | OpenJDK Development Environment | package <-(openJDK 9)<br />
| java-1_9_0-openjdk-headless | OpenJDK Runtime Environment | package<br />
| java-1_9_0-openjdk-javadoc | OpenJDK API Documentation | package<br />
| java-1_9_0-openjdk-src | OpenJDK Source Bundle | package<br />
<br />
<br />
So if you want to install the openjdk and develop java apps with it, you have to install the openjdk-devel package with the version you want to use, in this example its openjdk 8:<br />
<br />
<blockquote>
# zypper in java-1_8_0-openjdk-devel</blockquote>
<br />
now you can try: java -version and javac -version , and get output like this, whereas you would have gotten the cnf command not found if you tried javac -version if you installed just java-1_8_0-openjdk , as its just the JRE , anyways as with other java installs there is no need to install the JRE version as installing the openjdk-devel the true openjdk package in opensuse, already contains a JRE so you can just do the following commands <br />
<br />
<blockquote>
$ java -version</blockquote>
openjdk version "1.8.0_101"<br />
OpenJDK Runtime Environment (IcedTea 3.1.0) (suse-1.1-x86_64)<br />
OpenJDK 64-Bit Server VM (build 25.101-b13, mixed mode)<br />
<br />
<blockquote class="tr_bq">
$ javac -version</blockquote>
javac 1.8.0_101<br />
<br />
<br />
- Nevertheless the naming convention of the package is still confusing, especially for people new to opensuse, they should just rename the openjdk JRE to openJRE or something, so even on quick glance its self explanatory <br />
<br />
<br />
Resource Links:<br />
<br />
<br />
<a href="https://forums.opensuse.org/showthread.php/517173-Android-Studio-and-Java-JDK">Tumbleweed Android Studio and Java JDK Thread in the OpenSUSE Forum</a><br />
Trying to get Android Studio to start but I'm getting an error saying JAVA_HOME points to a jre not a jdk, a...<br />
<br />
Others have complained of the confusing package naming of opensuse like in this blog: <a href="http://thehumble.ninja/2015/02/11/a-quick-review-of-opensuse-tumbleweed/">thehumble.ninja - A Quick Review of OpenSUSE Tumbleweed! (2015)</a><br />
an excerpt from this blog<br />
"My only MAJOR complaint is the package naming and development packages. It’s FRUSTRATING hunting down each package, truly a nightmare compared to other distributions."<br />
<br />
<br />
<br />
NOTE: However if you have multiple implementations of Java, when you want to select your preferred java implementation or switch to the one you prefer.<br />
<br />
Select which multiple implementations of JRE and JDK and even Java Web Browser Plug-in installed then you can select which one to use with the update-alternatives commands below:<br />
<br />
Java application launcher (JRE)<br />
<blockquote>
# /usr/sbin/update-alternatives --config java</blockquote>
<br />
Java compiler (JDK)<br />
<blockquote>
# /usr/sbin/update-alternatives --config javac</blockquote>
<br />
Java Web Browser (Web browser plug-in)<br />
<blockquote class="tr_bq">
# /usr/sbin/update-alternatives --config javaplugin</blockquote>
<br />
<br />Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com1tag:blogger.com,1999:blog-307524065547561336.post-57275088744181209022016-08-23T17:11:00.001-07:002016-08-23T17:20:31.610-07:00Easy Way to Install and Maintain Multilibs with Slackware (Updated Way)<div id="yiv4664169338yui_3_16_0_ym19_1_1471301759935_104544">
<div id="yui_3_16_0_ym19_1_1471992701122_18638">
How to Install and Maintain Multilibs in Slackware with slackpkg+ </div>
<div id="yui_3_16_0_ym19_1_1471992701122_18638">
<br /></div>
<div id="yui_3_16_0_ym19_1_1471992701122_18638">
(Easy Updated Way, Tested working in Slackware Current, it should work for Stable as well, just make sure to track the repos for stable for stable and current for current)</div>
<div id="yui_3_16_0_ym19_1_1471992701122_18639">
<br /></div>
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_35733">
- Install Multilib in Slackware Current, and Keep the Multilib Enabled Slackware - Current up-to-date with slackpkg+:</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_201945">
<br /></div>
1.) Install the latest binary package from <a href="https://sourceforge.net/projects/slackpkgplus/files/">slackpkg+</a><br />
2.)
Edit slackpkg.conf file with your desired editor, for examples emacs
and nano are used:<br />
<br />
<blockquote class="tr_bq">
# emacs -nw /etc/slackpkg/slackpkgplus.conf </blockquote>
<br />
you can also use vim or nano for example:<br />
<br />
<blockquote class="tr_bq">
# nano /etc/slackpkg/slackpkgplus.conf </blockquote>
<br />
add this line to
the mirrorplus list:<br />
<br />
MIRRORPLUS['multilib']=http://bear.alienbase.nl/mirrors/people/alien/multilib/current/<br />
<br />
3.) Then in REPOPLUS array add the entry - multilib , typically best right after slackpkgplus entry so it would look like this: <br />
<br />
REPOPLUS=(
slackpkgplus multilib restricted alienbob ktown mate )<br />
#priority repo
list: order of left priority, right less
priority <br />
<br />
4.) Save, then exit and run these commands in order, line after line:<br />
<blockquote class="tr_bq">
# slackpkg update gpg<br />
# slackpkg update <br />
# slackpkg upgrade-all<br />
# slackpkg install multilib</blockquote>
<br id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_35838" />
<br id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_35839" />
(Optionally:
Another way is to install slackpkg+ then run this command to
automatically setup everything that is to be done with the instructions
above:<br />
<br />
<blockquote class="tr_bq">
# /usr/doc/slackpkg+-*/setupmultilib.sh</blockquote>
<br />
To uninstall re-run the same command again)<br />
<br />
<br />
To keep multilib up-to-date:<br />
After that, you can keep multilib up-to-date by running these commands in order, line by line:<br />
<blockquote class="tr_bq">
# slackpkg update<br />
# slackpkg upgrade-all<br />
# slackpkg install multilib</blockquote>
<br id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_35849" />
<br />
*To
uninstall multilib, edit the slackpkgplus.conf file located in
/etc/slackpkg/slackpkgplus.conf and remove 'multilib' from PKGS_PRIORITY
and REPOPLUS arrays, but do NOT delete the related MIRRORPLUS line, then run the following commands:<br />
<br id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_35851" />
<blockquote>
# slackpkg update<br />
# slackpkg remove multilib</blockquote>
<br />
Note:
this does NOT remove the core multilib packages, because they affect
the 64bit system. Remove these with the following commands:<br />
<br />
<br />
<blockquote>
# slackpkg upgrade-all</blockquote>
<br />
then delete or comment the related MIRRORPLUS line, then run:<br />
<br />
<blockquote class="tr_bq">
# slackpkg update</blockquote>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_51875">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_51875">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_51874">
NOTE: This is a very basic sample slackpkg+ config file could look like with multilib setup:</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_55789">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_177487">
SLACKPKGPLUS=on<br />
VERBOSE=1<br />
ALLOW32BIT=off<br />
USEBL=1<br />
WGETOPTS="--timeout=20 --tries=2"<br />
GREYLIST=on</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_238379">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_238378">
PKGS_PRIORITY=( restricted alienbob ktown mate )<br />
REPOPLUS=(
slackpkgplus multilib restricted alienbob ktown mate ) #priority repo
list: order of left priority, right less
priority </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_59746">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_59738">
MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/<br />
MIRRORPLUS['restricted']=http://bear.alienbase.nl/mirrors/people/alien/restricted_sbrepos/current/x86_64/<br />
MIRRORPLUS['alienbob']=http://bear.alienbase.nl/mirrors/people/alien/sbrepos/current/x86_64/<br />
MIRRORPLUS['multilib']=http://bear.alienbase.nl/mirrors/people/alien/multilib/current/<br />
MIRRORPLUS['ktown']=http://bear.alienbase.nl/mirrors/alien-kde/current/latest/x86_64<br />
MIRRORPLUS['mate']=http://slackware.uk/msb/current/1.15/x86_64/</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_204990">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_206904">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_205867">
NOTE: Using this method with slackpkg+ to Install and Keep Multilib
up-to-date in Slackware Current, this is definitely easier than the old
way, and you can do the initial setup manually or with
/usr/doc/slackpkg+-*/setupmultilib.sh script in slackpkg+</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_177483">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_206906">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57744">
Tips and a Fix for Troubleshooting Common Problems with slackpkg/slackpkg+:</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57744">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_83291">
-
When errors happen first check the slackpkg+ config file, and the
mirror list at /etc/slackpkg/mirrors and /etc/slackpkg/slackpkgplus.conf
, make sure there are no typos or using of capital letters in the urls
and make sure its all setup as mentioned above.</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_91144">
- Before installing and upgrading with slackpkg/slackpkg+, issue these commands first: </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_91144">
<br /></div>
<blockquote class="tr_bq">
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_98971">
# slackpkg update gpg</div>
</blockquote>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_98972">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_98972">
then </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_98973">
</div>
<blockquote class="tr_bq">
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_98973">
# slackpkg update</div>
</blockquote>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_212871">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_212871">
- Sometimes the urls in the mirrors are not up-to-date in this case you have to check and find the right urls that work </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_232494">
-
To avoid problems use urls that are the same version as the system you
use, so use urls with current when using current, or 14.2 with 14.2 </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57745">
-
If you run into an error that says you have duplicate packages that are
conflicting in /var/log/packages, what you have to do is check that
directory of any packages that have either a duplicate of the same
package or </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_124454">
essentially
1 package with double or multiple versions like foo_ver1.1 and
foo_ver1.2 , all you have to do is remove the problematic package in
this case the older one, and it should work. </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_112697">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_112699">
example issue duplicate slackpkg version conflict:</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_126416">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_126464">
- When running slackpkg upgrade-all as below you come into contact with such an error: </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_126465">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_126462">
<blockquote>
# slackpkg upgrade-all</blockquote>
<br id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_126449" />
NOTE: Remember to re-run 'slackpkg update' after modifying slackpkgplus.conf<br />
<br id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_126451" />
Checking local integrity... DONE<br />
You have a broken /var/log/packages - with two versions of the same package.<br />
The list of packages duplicated in your machine are shown below, but don't<br />
worry about this list - when you select your action, slackpkg will show a<br />
better list:<br />
<br id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_126457" />
slackpkg-2.82.1-noarch-1<br />
<br id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_126459" />
You can (B)lacklist, (R)emove, or (I)gnore these packages.<br />
Select your action (B/R/I): </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_132340">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_177475">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_132341">
-
Issuing the command removepkg on slackpkg will not fix this issue, even
if you reinstall slackpkg, instead issue this command: </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_132341">
</div>
<blockquote class="tr_bq">
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_132341">
# ls
/var/log/packages | grep slackpkg </div>
</blockquote>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_149949">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_149949">
-
Fortunately the error gave the hint of the program that is causing
the problem, so you get a list that looks something like this for
example where you see the duplicate issue </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_159774">
<br /></div>
<div id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_159766">
slackpkg+-1.7.0-noarch-4mt</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_163694">
slackpkg-2.81.1-noarch-1</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_165699">
slackpkg-2.82.1-noarch-1</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_163697">
<br /></div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_171542">
-
So you just uninstall the older or problematic version with this
command: </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_171542">
</div>
<blockquote class="tr_bq">
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_171542">
# removepkg /var/log/packages/slackpkg-2.81.1-noarch-1</div>
</blockquote>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_175456">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_175456">
- Now things should be back to normal, run the # slackpkg upgrade command now and it should work</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_159768">
<br /></div>
NOTE: Before installing STEAM and VirtualBox, Wine and PlayonLinux on
Slackware make sure to setup and install multilib in slackware first<br />
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57746">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57746">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57746">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57746">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57746">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57746">
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_57746">
<br id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_35860" />
Reference Links:</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_63686">
- "http://slakfinder.org/slackpkg+.html"</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_77437">
<div id="yiv4664169338yui_3_16_0_ym19_1_1471193910390_22542">
- "http://alien.slackbook.org/blog/introducing-slackpkg-an-extension-to-slackpkg-for-3rd-party-repositories/"</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471193910390_22546">
- "http://docs.slackware.com/howtos:slackware_admin:systemupgrade"</div>
</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_45730">
- "http://docs.slackware.com/slackware:multilib"</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_39834">
- "http://slakfinder.org/slackpkg+/src/README"</div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_41803">
-
"https://www.youtube.com/watch?v=AtLM3sjLT7U" *Linux4UnMe Channel
basically mentions he used slackpkg+ to install multilibs in his
slackware linux system, but doesnt explain how he did it, anyways i have tried to explain how to do this in detail above </div>
<div dir="ltr" id="yiv4664169338yui_3_16_0_ym19_1_1471084822281_240528">
<br /></div>
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-53379842447087742372014-10-02T07:40:00.000-07:002014-11-11T17:20:05.674-08:00Solution to Problematic Audio because of PulseaudioSolution to Problematic Audio because of Pulseaudio<br />
<br />
<br />
Symptoms of Problematic Pulseaudio due to permission problem:<br />
<br />
- Some or all audio doesn't work, youtube and other flash videos affected, may not play or may play but without audio whether embedded in a website or not<br />
<br />
- Cannot restart pulseaudio with:<br />
<br />
<blockquote class="tr_bq">
$ pulseaudio -D</blockquote>
/or<br />
<blockquote class="tr_bq">
$ pulseaudio --start</blockquote>
<div>
<br /></div>
as regular or super user, however pulseaudio should work and preferably on normal user, but the user<br />
must be in the audio group<br />
<br />
- Pulseaudio command output:<br />
<br />
E: [pulseaudio] main.c: Daemon startup failed.<br />
<br />
or<br />
<br />
E: [pulseaudio] main.c: Daemon startup failed.<br />
E: [pulseaudio] main.c: pa_pid_file_create() failed<br />
<br />
or something similar but fails to start the pulseaudio daemon<br />
<br />
<br />
Solution:<br />
<br />
Delete the .config/pulse/ directory<br />
Restart or reboot system<br />
Pulseaudio will now start as regular user<br />
<br />
at terminal:<br />
<br />
<blockquote class="tr_bq">
$ cd ~<br />
$ cd .config<br />
$ rm -rf pulse/</blockquote>
<br />
Restart computer, everything should work.<br />
A new pulse directory would have been automatically created in .config/ directory<br />
<br />
<br />
Troubleshooting:<br />
<br />
- If you prefer to not use pulseaudio you can just uninstall pulse and reinstall alsa to be sure<br />
- If you prefer to use pulseaudio, you can also try to reinstall pulseaudio and alsa<br />
- If those options above don't work, you can also try deleting asound.conf do: # rm -rf /etc/asound.conf<br />
- Check alsamixer, to make sure the problem is not because of a setting that is just muted or misconfigured<br />
in terminal do: $ alsamixer<br />
anything labeled MM means its muted, toggle to enable/disable by highlighting them then press M<br />
press escape to exit, if the settings do not stay persistent, re-do the settings and then after exiting, in<br />
terminal do: # alsactl store<br />
- If alsamixer is always mute on reboot despite doing the "# alsactl store" command, then just<br />
disable the module "module-device-restore" by editing the file /etc/pulse/default.pa, save, exit and reboot.<br />
<br />
<br />
<br />
*Notes:<br />
<br />
- Make sure your user is in audio group<br />
- Tested working on Arch Linux<br />
<div>
<br /></div>
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-20769112573775337142014-09-29T08:52:00.000-07:002014-09-29T08:52:34.662-07:00How to Embed Subtitles to a Video in LinuxHow to Embed Subtitles to a Video in Linux<br />
<br />
<br />
1.) ffmpeg:<br />
<br />
<blockquote class="tr_bq">
$ ffmpeg -i /path-to/videoFoo.avi -vf subtitles=/path-to/subtitleFoo.srt /path-to/output_videoFoo.avi</blockquote>
<br />
<br />
/or<br />
<br />
<br />
2.) mencoder:<br />
<br />
<blockquote class="tr_bq">
$ mencoder video.avi -oac copy -ovc lavc -sub /path-to/subtitleFoo.srt -subfont-text-scale 3 -o output_videoFoo.avi</blockquote>
<br />
<br />
<br />
<br />
<br />Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-30917904052111713012014-08-24T08:35:00.002-07:002014-09-02T03:43:03.885-07:00Extract and Convert wmv Files to mp3 Files in LinuxExtract and Convert wmv Files to mp3 Files in Linux<br />
<br />
<br />
Input at command line:<br />
<br />
<blockquote class="tr_bq">
$ ffmpeg -i file.wmv -vn new.mp3</blockquote>
<br />
<br />
Notes:<br />
- It actually works for many types of video files as well <br />
- You can remove the -vn option and use it on different kinds of audio files to convert to mp3 filesDaemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-46189408006476898422014-08-24T08:33:00.002-07:002014-09-02T03:39:29.201-07:00Merge mp4 Files in Linux Merge mp4 Files in Linux<br />
<br />
One of the best ways to prevent losing quality from concatenating files is to transcode them to mpeg transport streams, using H.264 video and AAC audio -<br />
<br />
<blockquote class="tr_bq">
$ ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts new1.ts</blockquote>
<br />
<blockquote class="tr_bq">
$ ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts new2.ts</blockquote>
<br />
then<br />
<br />
<blockquote class="tr_bq">
$ ffmpeg -i "concat:new1.ts|new2.ts" -c copy -bsf:a aac_adtstoasc output.mp4</blockquote>
<br />
<br />
Notes:<br />
- In this example I use only 2 mp4 files converted to streams and then concatenating them, but you can<br />
put as much as you like that your system can handleDaemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-10846464133079730422014-05-20T02:08:00.000-07:002016-07-30T10:53:50.827-07:00How to Install Linux into a USB Flash DriveHow to Install Linux into a USB Flash Drive:<br />
<br />
<br />
My preferred way is to disk dump the linux iso contents to the drive by command line, but there are other automated ways to do it and with GUI, such as <a href="http://unetbootin.sourceforge.net/">Unetbootin</a>, <a href="http://www.linuxliveusb.com/">Linux Live USB</a> or if your using windows to make the linux live usb drive, I recommend <a href="https://rufus.akeo.ie/">Rufus</a> or <a href="https://sourceforge.net/projects/win32diskimager/">Win32DiskImager</a> for (32 bit windows only) For those you can just start the program and follow the instructions, its quite easy, or you can install and use cygwin where you can use GNU/Linux tools like dd in windows.<br />
<br />
To find out which device your flash drive is, you can use many ways I'll just mention 2 here, either use fdisk or lsblk at command line:<br />
<br />
<blockquote class="tr_bq">
# fdisk -l</blockquote>
/or<br />
<blockquote class="tr_bq">
$ lsblk </blockquote>
<br />
After determining which is your device <br />
<br />
Issue the command, with a pseudo foo path to the file.iso, assuming the flash drive is in /dev/sdb for example<br />
<br />
<blockquote class="tr_bq">
# dd if=/path-to/file.iso of=/dev/sdb bs=4M; sync </blockquote>
/or<br />
<br />
<blockquote class="tr_bq">
# dd if=/path-to/file.iso of=/dev/sdb bs=4M status=progress oflag=nocache,sync && sync</blockquote>
<br />
To make sure the process completes successfully, unmount the flash drive, before unplugging:<br />
<blockquote class="tr_bq">
<br />
# umount /dev/sdb</blockquote>
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-71607636124229229422014-03-11T06:04:00.000-07:002014-03-11T06:04:02.790-07:00How to Download a Remote Directory Recursively with wgetHow to Download a Remote Directory Recursively with wget<br /><br />How to Download Folders and Files Recursively within a Remote Directory with wget, Issue command:<br />
<br />
<blockquote class="tr_bq">
$ wget -e robots=off --cut-dirs=3 --reject="index.html*" --no-parent --recursive --relative --level=1 --no-directories "https://url-here/path-to-folder"</blockquote>
<br />
<br />
<br />
Daemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0tag:blogger.com,1999:blog-307524065547561336.post-84909952368706899032014-03-11T05:52:00.002-07:002015-07-20T13:38:04.071-07:00Download Flash Videos from Video Streaming Sites like youtube with Linux Command Line AppsDownload Flash Videos from Video Streaming Sites like youtube with Linux Command Line Apps<br />
<br />
<br />
1.) with youtube-dl:<br />
<br />
<blockquote class="tr_bq">
$ youtube-dl -cit "youtube.com/url-here" </blockquote>
<br />
- optional to download an entire playlist or channel, go to the desired playlist list or channel, and grab the url then paste in terminal:<br />
<br />
<blockquote class="tr_bq">
$ youtube-dl -cit "youtube.com/playlist_url-here"</blockquote>
<br />
- optional to download a custom list of video files, create a plain text/txt file and place all the YouTube links that you wish to download there, for example yt_foo_list.txt<br />
<br />
<blockquote class="tr_bq">
$ youtube-dl -a yt_foo_list.txt</blockquote>
<br />
- optional to download the sound/music of the video to mp3 only:<br />
<br />
<blockquote class="tr_bq">
$ youtube-dl -cit --extract-audio --audio-format mp3 "youtube.com/url-here"</blockquote>
<br />
- optional to download a video in certain file type/resoluton format, use option "–list-formats" with the command<br />
<br />
<blockquote class="tr_bq">
$ youtube-dl –list-formats "youtube.com/url-here" </blockquote>
<br />
- it will show you a list of formats with a corresponding video/resolution format code, that you can download in, choose from them, then to download a preferred file format from the list, use the option "-f", if flv was in the list and you want to save the file in that format, you then issue command<br />
<br />
<blockquote class="tr_bq">
$ youtube-dl -f 34 "youtube.com/url-here"</blockquote>
<br />
- where 34 is the video/resolution format code of flv, it will say in the available video formats list or the resolutions available of the same format, code will be mentioned at the left most side<br />
<br />
- optional to download video in all available formats, issue command<br />
<br />
<blockquote class="tr_bq">
$ youtube-dl –all-formats "youtube.com/url-here" </blockquote>
<br />
<br />
2.) with get-flash-videos:<br />
<br />
<blockquote class="tr_bq">
$ get-flash-videos "youtube.com/url-here"</blockquote>
<br />
<br />
3.) with cclive:<br />
<br />
<blockquote class="tr_bq">
$ cclive "youtube.com/url-here"</blockquote>
<br />
<br />
4.) with movgrab:<br />
<br />
<blockquote class="tr_bq">
$ movgrab "youtube.com/url-here"</blockquote>
<br />
5.) with you-get<br />
<br />
<blockquote class="tr_bq">
$ you-get "youtube.com/url-here"</blockquote>
<br />
- Display the information of a video without downloading:<br />
<br />
<blockquote class="tr_bq">
$ you-get "youtube.com/url-here"</blockquote>
<br />
- Download multiple videos: <br />
<br />
<blockquote class="tr_bq">
$ you-get "youtube.com/url-here/A" "youtube.com/url-here/B"</blockquote>
<br />
- Force Re-download vidoes (This will overwrite any existing video or temporary file):<br />
<br />
<blockquote class="tr_bq">
$ you-get -f "youtube.com/url-here/"</blockquote>
<br />
- Set the output directory for downloaded files: <br />
<br />
<blockquote class="tr_bq">
$ you-get -o ~/Downloads you-get -f "youtube.com/url-here/"</blockquote>
<br />
- Use a specific HTTP Proxy for Downloading<br />
(use this -y proxy.uku.im:8888 as option and proxy for downloading from youku.com):<br />
<br />
<blockquote class="tr_bq">
$ you-get -x 127.0.0.1:8087 "youtube.com/url-here/"</blockquote>
<br />
- Disable any proxy use --no-proxy: <br />
<br />
<blockquote class="tr_bq">
$ you-get --no-proxy "youtube.com/url-here/"</blockquote>
<br />
- Watch a video in your own video players of choice, like vlc and mplayer, to avoid uneccessary Ads.<br />
<br />
<blockquote class="tr_bq">
$ you-get -p vlc "youtube.com/url-here/"</blockquote>
<br />
/or<br />
<br />
<blockquote class="tr_bq">
$ you-get -p mplayer "youtube.com/url-here/"</blockquote>
<br />
<br />
Notes:<br />
- To use any of the mentioned apps, they must be installed first<br />
- youtube-dl, get-flash-videos, cclive, movgrab and you-get work in other sites as well not just youtube, for instance youtube-dl actually supports video download from several other sites like Dailymotion, Google Video, Photobucket, Facebook, Yahoo, Metacafe, Depositfiles and few more similar sites<br />
- To upgrade youtube-dl do: $ youtube-dl -U<br />
- youtube-dl can download from chinese websites like youku.com, tudou.com but if it doesnt work try to upgrade it first, if it doesn't work, you can use the you-get console app instead which supports alot of websites including chinese websites and even including japanese websites like niconicoDaemonixhttp://www.blogger.com/profile/12590623729223339323noreply@blogger.com0