Fedora iTOps Tube

Wednesday, May 2, 2012

How to change Konsole font

I am new to KDE.

How do I change the Konsole font style/size/color? And the background color?

I found FONT settings under SYSTEM SETTINGS but I don't want to change all the fonts, just the konsole. The default font is hard on my eyes. I may even have to make it black on white.



Thanks in advance.




Auto switching to text fields in f16

I'm using fedora 16. I noticed whenever I'm filling any form or anything, next field is automatically selected after a pause.

How can I disable this?




CERN discovers new particle

http://www.tgdaily.com/general-scien...s-new-particle




Quote:









Physicists using the Large Hadron Collider (LHC) particle accelerator have discovered their first brand-new baryon, a particle consisting of three quarks.








rythmbox

my rythmbox crashes wmen running

i have reported the bug

i'm updated now

in other of users on my computer it work's and onli in 'ali' user crashes

what could i do to fix this problem?




bluetooth

my bluetooth does not work since using gnome 3!

before that it was worke correctly

when i use a usb-bluetooth adapter,it works correctly,but with my laptop's own it dose not work!




update error

I update almost every day:

[pedro@pedro-bedro ~]$ sudo yum --skip-broken update



For about 6 weeks now, maybe longer, I keep getting



Packages skipped because of dependency problems:

ffmpeg-libs-0.8.10-1.fc16.x86_64 from rpmfusion-free-updates

firefox-12.0-1.fc16.x86_64 from updates

gstreamer-plugins-bad-free-0.10.22-2.fc16.2.x86_64 from updates

gstreamer-plugins-bad-free-extras-0.10.22-2.fc16.2.x86_64 from updates

libvpx-1.0.0-1.fc16.x86_64 from updates

xulrunner-12.0-1.fc16.x86_64 from updates



If I use the software update program, it also fails on these. It says: missing dependency

No packages to update

None of the selected packages could be updated



A click on 'more details' gives:

libavcodec52-0.7.5-47.fc16.x86_64 requires libvpx.so.0()(64bit) : Success - empty transaction



Anyone know what is going on here??




local Firefox redirect rules

i think my local Firefox redirect rules have been corrupted by some malware that added a rule to redirect to some site when i go to another domain. e.g., every time i go to xxx.xyz.com, after 2-3 sec, it redirects me to xxx.abc.com.



i was wondering how to fix this, i.e. in which config file would be these rules?



thanks




Trouble with several things after the last 2 rounds of F16 updates

First, Network manager has gone flakey ... again

Second, Firefox 12 may or may not have gone to the dark side ... and



... I'm not sure which package to blame this one on, and therefore not sure how to file the bug report against it, but my photo cards always mount as read-only now. <..(insert angry/disgusted/peevish smiley here)..>





Being this close to the release of F17, I had unwisely assumed that updates to F16 would be reasonably safe.



Not so much. <..:dis:..>





Anyone else having issues with mounting photo cards read-only?




mbr manipulation

Is there a tool in fedora that can be used to do a physical inventory of the mbr section of the harddrive that my install of fedora is on so that i can take off all the physical attributes of the files in it and then do a re write of the mbr section




Fedora 16 installation problems into a VirtualBox Machine

I am having issues also loading Fedora 16 into Virtualbox, the Live CD part works fine and Fedora comes up with in VirtualBox, however once i go to settings and load to hard disk the system starts the processes get almost all the way through the copying Live Image to Hard Drive and at the end of the copying processes the following error message comes up: "Error: There was an error installing the live image to your hard drive. This could be due to bad media. Please verify your installation media. " Then there is a warning about exiting the installer and that your system can be left in a inconsistent state. It does not matter which media I download from Fedora.org I keep getting the same error message and it does not matter if I burn the .ISO image to DVD or leave it on the hard drive and have VirtualBox point to it as the Live CD. Any help? A few things: I have Ubuntu running fine in one of the virtualbox machines with no issues. I have allocated 2 gigs ram for Fedora as I have a 6 gig laptop and I increased the video to 128 and checked off the 3d acceleration even though I know GNOME3 will crash on the Live CD, but I wanted to install to hard drive to start fixing that issue per other posts. I have burned several copies of the different .ISO images with NERO and Windows media burner same situation with the error message.




f-16: mouse stop working after some minutes.

Hi friends. :(

I hope someone here could help me.

I got fedora working ok so far, but suddenly, after some minutes the mouse begins to perform strange: when hove it over some bit it highlights ok, as expected, but left click is ignored. I found that right click works but that´s not enough the whole session is affected. It's frustrating, yeah.

Only restart resolve the impasse but, some minutes after the problem again. Does anyone experienced this same?. Would anyone know to tell me something, please?.

I would appreciate any clue.

PS. perhaps something to do with freezing? I tryed with the laptop touch pad and the same, I shouldn't be the only one. I got the os updated. Have no idea about the problem.

Please help!

Txe:confused:




F16 - pb mount at boot

hi everybody,



I have an error when trying to mount my LaCie network kdisque at boot.



it seems to me that mount is coming too early during the boot process when network is not established.

see extract from /var/log/messages.



larger extract of /var/log/messages.




Code:


Apr 30 10:07:51 PCSalon kernel: [  27.306387] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: (null)

Apr 30 10:07:52 PCSalon avahi-daemon[737]: Successfully called chroot().

Apr 30 10:07:52 PCSalon avahi-daemon[737]: Successfully dropped remaining capabilities.

Apr 30 10:07:52 PCSalon avahi-daemon[737]: Loading service file /services/ssh.service.

Apr 30 10:07:52 PCSalon avahi-daemon[737]: Loading service file /services/udisks.service.

Apr 30 10:07:52 PCSalon avahi-daemon[737]: Network interface enumeration completed.

Apr 30 10:07:52 PCSalon avahi-daemon[737]: Registering HINFO record with values 'I686'/'LINUX'.

Apr 30 10:07:52 PCSalon avahi-daemon[737]: Server startup complete. Host name is PCSalon.local. Local service cookie is 743428436.

Apr 30 10:07:52 PCSalon avahi-daemon[737]: Service "PCSalon" (/services/udisks.service) successfully established.

Apr 30 10:07:52 PCSalon systemd-logind[741]: New seat seat0.

Apr 30 10:07:52 PCSalon avahi-daemon[737]: Service "PCSalon" (/services/ssh.service) successfully established.

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> VPN: loaded org.freedesktop.NetworkManager.openconnect

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> VPN: loaded org.freedesktop.NetworkManager.openvpn

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> VPN: loaded org.freedesktop.NetworkManager.pptp

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> VPN: loaded org.freedesktop.NetworkManager.vpnc

Apr 30 10:07:52 PCSalon sandbox[765]: Starting sandbox[  OK  ]

Apr 30 10:07:52 PCSalon dbus-daemon[757]: dbus[757]: [system] Activating service name='org.freedesktop.PolicyKit1' (using servicehelper)

Apr 30 10:07:52 PCSalon dbus[757]: [system] Activating service name='org.freedesktop.PolicyKit1' (using servicehelper)

Apr 30 10:07:52 PCSalon polkitd[772]: started daemon version 0.102 using authority implementation `local' version `0.102'

Apr 30 10:07:52 PCSalon dbus-daemon[757]: dbus[757]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'

Apr 30 10:07:52 PCSalon dbus[757]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'

Apr 30 10:07:52 PCSalon NetworkManager[736]:    ifcfg-rh: Acquired D-Bus service com.redhat.ifcfgrh1

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> Loaded plugin ifcfg-rh: (c) 2007 - 2010 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> Loaded plugin keyfile: (c) 2007 - 2010 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.

Apr 30 10:07:52 PCSalon NetworkManager[736]:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-lo ...

Apr 30 10:07:52 PCSalon NetworkManager[736]:    ifcfg-rh: parsing /etc/sysconfig/network-scripts/ifcfg-Wired_connection_1 ...

Apr 30 10:07:52 PCSalon NetworkManager[736]:    ifcfg-rh:    read connection 'Wired connection 1'

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> trying to start the modem manager...

Apr 30 10:07:52 PCSalon dbus-daemon[757]: dbus[757]: [system] Activating service name='org.freedesktop.ModemManager' (using servicehelper)

Apr 30 10:07:52 PCSalon dbus[757]: [system] Activating service name='org.freedesktop.ModemManager' (using servicehelper)

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> monitoring kernel firmware directory '/lib/firmware'.

Apr 30 10:07:52 PCSalon dbus-daemon[757]: dbus[757]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service'

Apr 30 10:07:52 PCSalon dbus[757]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service'

Apr 30 10:07:52 PCSalon dbus-daemon[757]: dbus[757]: [system] Activation via systemd failed for unit 'dbus-org.bluez.service': Unit dbus-org.bluez.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.bluez.service' for details.

Apr 30 10:07:52 PCSalon dbus[757]: [system] Activation via systemd failed for unit 'dbus-org.bluez.service': Unit dbus-org.bluez.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.bluez.service' for details.

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> WiFi enabled by radio killswitch; enabled by state file

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> WWAN enabled by radio killswitch; enabled by state file

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> WiMAX enabled by radio killswitch; enabled by state file

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> Networking is enabled by state file

Apr 30 10:07:52 PCSalon NetworkManager[736]: <warn> failed to allocate link cache: (-12) Netlink Error (errno = Operation not supported)

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): carrier is OFF

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): new Ethernet device (driver: '8139too' ifindex: 2)

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): exported as /org/freedesktop/NetworkManager/Devices/0

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): now managed

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): bringing up device.

Apr 30 10:07:52 PCSalon kernel: [  30.020287] 8139too 0000:00:0f.0: p4p1: link up, 100Mbps, full-duplex, lpa 0xC5E1

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): carrier now ON (device state 20)

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): preparing device.

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): deactivating device (reason 'managed') [2]

Apr 30 10:07:52 PCSalon dbus-daemon[757]: modem-manager[792]: <info>  ModemManager (version 0.4.998-1.git20110706.fc16) starting...

Apr 30 10:07:52 PCSalon modem-manager[792]: <info>  ModemManager (version 0.4.998-1.git20110706.fc16) starting...

Apr 30 10:07:52 PCSalon NetworkManager[736]: <warn> bluez error getting default adapter: Unit dbus-org.bluez.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.bluez.service' for details.

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): device state change: unavailable -> disconnected (reason 'none') [20 30 0]

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> Auto-activating connection 'Wired connection 1'.

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> Activation (p4p1) starting connection 'Wired connection 1'

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> (p4p1): device state change: disconnected -> prepare (reason 'none') [30 40 0]

Apr 30 10:07:52 PCSalon NetworkManager[736]: <info> Activation (p4p1) Stage 1 of 5 (Device Prepare) scheduled...

Apr 30 10:07:53 PCSalon kernel: [  30.241641] FS-Cache: Loaded

Apr 30 10:07:53 PCSalon kernel: [  30.248806] FS-Cache: Netfs 'cifs' registered for caching

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> Activation (p4p1) Stage 1 of 5 (Device Prepare) started...

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> Activation (p4p1) Stage 2 of 5 (Device Configure) scheduled...

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> Activation (p4p1) Stage 1 of 5 (Device Prepare) complete.

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> Activation (p4p1) Stage 2 of 5 (Device Configure) starting...

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> (p4p1): device state change: prepare -> config (reason 'none') [40 50 0]

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> Activation (p4p1) Stage 2 of 5 (Device Configure) successful.

Apr 30 10:07:53 PCSalon kernel: [  30.318563] CIFS VFS: Error connecting to socket. Aborting operation

Apr 30 10:07:53 PCSalon kernel: [  30.318701] CIFS VFS: cifs_mount failed w/return code = -101

Apr 30 10:07:53 PCSalon mount[794]: Password: mount error(101): Network is unreachable

Apr 30 10:07:53 PCSalon mount[794]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Apr 30 10:07:53 PCSalon systemd[1]: media-openshare.mount mount process exited, code=exited status=32


Apr 30 10:07:53 PCSalon systemd[1]: Job remote-fs.target/start failed with result 'dependency'.

Apr 30 10:07:53 PCSalon systemd[1]: Unit media-openshare.mount entered failed state.

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> Activation (p4p1) Stage 3 of 5 (IP Configure Start) scheduled.

Apr 30 10:07:53 PCSalon dbus-daemon[757]: dbus[757]: [system] Successfully activated service 'org.freedesktop.ModemManager'

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> Activation (p4p1) Stage 2 of 5 (Device Configure) complete.

Apr 30 10:07:53 PCSalon dbus[757]: [system] Successfully activated service 'org.freedesktop.ModemManager'

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> Activation (p4p1) Stage 3 of 5 (IP Configure Start) started...

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> (p4p1): device state change: config -> ip-config (reason 'none') [50 70 0]

Apr 30 10:07:53 PCSalon NetworkManager[736]: <info> Activation (p4p1) Beginning DHCPv4 transaction (timeout in 45 seconds)


of course, when mounting by hand after boot, mount is ok.



Hope my initial analysis is correct and does not lead us to the wrong way.



any idea ?



BR/CC




Determining last password change date?

Hi,



What is the command-line program that I can use to properly parse the shadow file to print a human-readable output of when the last time was that a user changed his password?



Ideally, being able to print out all the stats on a user, including password age, etc, would be helpful.



Thanks,

Dave




How to get a hold of error logs in a live usb environment

I am currently having issues booting into Fedora 17's live USB environment on my macbook pro. All the details that I know at this point are found in the bug report I filled: https://bugzilla.redhat.com/show_bug.cgi?id=814975



The person assigned to the bug asked for me to post my "dmesg

output, and whatever X logs are in /var/log after you've tried to boot."



So my question is how do you get at those logs in a live CD (or USB) environment? Is there a way to get them redirected to another drive or somewhere on the USB itself? If not, is there a way to get ahold of the command prompt when the booting process hangs (although not completely frozen since ctrl+alt+delete will still restart the system)?



Thanks in advance.




Need help on upgrade

Hello,



i have a problem. I am using Fedora 15. I want to upgrade to Fedora 16. I try this http://fedoraproject.org/wiki/Upgrading. But this is to difficult for me. Is there an easier way? I am just a user and i don't understand yum and terminal.




My 40-wire SATA DVD-RW & FC16 LiveCd

According the FC 16 LiveCd, my SATA DVD-RW is set to UDMA/33 because it has a 40-wire cable.



The output of dmesg:




Quote:









ata5.00: ATAPI: TSSTcorp CDDVDW SH-S223Q, SB03, max UDMA/100

ata5.00: limited to UDMA/33 due to 40-wire cable

ata5.00: configured for UDMA/33




Of course, the DVD-RW is on a SATA controller and connected by a SATA cable. The controller is set to the "IDE" mode (since, as I mentioned in another thread, DVD-RWs apparently don't work on controllers set to the better AHCI mode).



Is it the normal for SATA DVD-RWs to be set to the UDMA/33 mode? Would it actually help their performance if they were set to UDMA/100?




Getting Grub to change default kernel load FC16

Hi all,



My system seems to have Grub 1.99 and I want to change the default kernel.



I thought I could do it like this:




Code:


vi /etc/default/grub

GRUB_DEFAULT=0


in order to always choose the first entry on my list.



I also tried:




Code:


vi /etc/default/grub

GRUB_DEFAULT='Fedora (3.3.0)'


My reference is section 5.1 here:

http://www.gnu.org/software/grub/man...-configuration



Originally, it was set to:




Code:


GRUB_DEFAULT=saved

but when I make a new choice on bootup the system does not retain it following the next reboot, so I am not sure if that's working either - at least not as I expect it to.



Can anyone help? I should point out that my kernel loads up just fine as long as I manually choose it during the 5-second bootup window.



Many Thanks!




FF 15 on fedora 17...

howdy folks!



I just installed this nice distro and I 'd like to no how to install firefox 15 or nightly on f17?



btw...how to get the latest packages as arch,do I have to activate some repo?



tia!




virtualized fc4 on fc15 host

Hello, I have an issue running fc4 as a virtual machine on a fc15 host. I know it's very outdated, but because of the software that we have to run (proprietary that was never updated to run on more current versions), we're stuck. We have fc4 up and running, but my issue (albeit a minor one) is that the monitor resolution does not match what it should. Meaning, it's a 22" Dell monitor with a native resolution of 1680x1050. The fc15 displays this resolution nicely, but in fc4 even though that resolution is a choice in the displays menu and it claims to be running at that resolution, it still takes up more that the screen real-estate, resulting in scroll bars on the side and bottom. The machine has a NVidia Quadro 600, and running with VMWare Player. VMWare tools is installed. I don't understand why it would think that 1680x1050 is larger than the screen, whereas if we choose 1400x1050 there is no vertical scroll bar. My only guess is when I choose 1680x1050, it's not REALLY choosing that resolution, but I don't have the know-how to go about confirming or fixing this. Any help is appreciated!




USB Mass Storage Hardware Compatibility

Hey,



For F14,Mint 10, Ubuntu etc,



Just wondering is there is a list posted somewhere that provides a yes/no status of the various usb storage devices, chip set etc?



I'm having issues with a usb storage device. The 3 machines can see the device, correctly report the device's size but when I try to create a partition, write a new mbr, format etc the various tools complain, gparted for example display a less than useful message, " can't complete operation..." no other messages, error diagnostics etc are posted.



The devices in question work under Win so it's not a HW failure.





thanks




Help Installing Sun's JRE

Would someone mind helping walk me through installing Sun's Java Runtime Environment?





I just installed this program called LXmed (aka LXDE Menu Editor) According to XFCE's wiki page it also works for XFCE, so I installed it, all went well, but unfortunately it didnt open when I clicked it.



In the install info, it stated "Application doesnt open?" "You must install sun's JRE to get it to work".



and all the guides I am seeing to install it are all gibberish to me so far.



So I would really appreciate the help if anyone wouldnt mind sparing a minute walking me through it.



Thanks,

Take care.




Microphone input distorted

After upgrading to Fedora 17, I tried to use Audacity to do sound recording but it came back extremely distorted. I tried switching around the input and output things used, via the buttons on Audacity's interface, to things like "pulse" and "default" and "Intel something or other," but no dice; it just changed how distorted it was.



In Fedora 16, sound recording worked.



Please tell me what I should do, or who I should notify with what information.




where is the java jre?

locate jre finds 1000000 files



somehow the jre path got eliminated from my path



[root@lmkiii ~]# echo $PATH

/usr/lib/qt-3.3/bin:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/lib/alliance/bin:/usr/libexec/sdcc:/root/bin

[root@lmkiii ~]#



Noe the Fedora 16 Eclipse cannot find it



Eclipse docs recommend NOT using the Eclipse that comes with the distro



They say to download and install



Wish the new Qt SDK and Eclipse were reliably under yum control



To get rid of Eclipse then I suppose one must use yumex and check every incidence of Eclipse




al-anvar software application introduction

free and open source software for researching on holy quran(an islamic software)

rpm packaged by "hedayat vatankhah"(the writer of yum-fast-downloader)

Online and offline recitation

different translations and commentaries in many languages

with "english" , "persia" and arabic user interface

related web pages:

http://al-anvar.sourceforge.net/

http://al-anvar.sourceforge.net/en/

https://sourceforge.net/projects/al-anvar/



"hedayat" wants to import it into "fedora" or "rpm fusion" or "parsidora" repos.




F17 - httpd problem

Hello all,



I upgraded from Fedora 16 to Fedora 17.

I'm unable to start httpd.

I'm getting "libgcc_s.so.1 must be installed for pthread_cancel to work" in httpd error logs.

Any help?



These are the installed packages for libgcc and httpd on my system.



# rpm -qa | grep libgcc

libgcc-4.7.0-2.fc17.i686

libgcc-4.7.0-2.fc17.x86_64



# rpm -qa | grep httpd

httpd-2.2.22-2.fc17.x86_64

httpd-tools-2.2.22-2.fc17.x86_64



Thank you.




Netflix and Android

So, I can do Netflix on Android and via XP on Virtual Box. Is there any hope for Netflix to be able to run on Linux without a crutch like VB or VM?




Connect and debug Samba NAS

Remove this, could not change title..



new post: http://forums.fedoraforum.org/showthread.php?t=279372




Script: Connect and Debug to Samba NAS

Heyas



As some might have recently, i've had some issues to connect to my NAS.

Figured i made mistakes, but have learned a bit on the road, which the Fedora Community shall benefit from.

At least i hope its helpful ;)



You may use the script for easy debugging your samba settings, but requires root for all functions.

You can connect to a share on your NAS, but not yet mount automaticly to local environment.



NOTE: The PHP tag coding is only for better readability


PHP Code:







#!/bin/bash
# |
# |    Samba Debug and Config Tool, 2012.Mai.01 by sea
# |    To create the 'config' files, it needs to be run as root
# | To debug only, it could be run as any user.
# | However, you need to be root to see the firewall settings!
# |    That way, the credentials may only be access with sufficant rights
# |
# | This script is written with best intention to help, 
# | but there is NO warranty, garanty and I deny ANY responsiblity
# | that may or may not affect your system.
# |
# | Lisence:        GPL v3
# | Author:         Simon A. Erat (sea)
# | Release Date:   2012 May 2nd
    
script_version="0.2"
# | Resource URL:   http://forums.fedoraforum.org/showthread.php?t=279170
# | Release URL:    http://forums.fedoraforum.org/showthread.php?t=279372
# |
# |
# | Default Directory & File
    
readonly MOUNTPOINT=/mnt/nas
    readonly SAMBA_LOGDIR
=/var/log/samba
    readonly SAMBA_CONF
=/etc/samba/smb.conf
    readonly SAMBA_CRED
=/etc/samba/smb.cred
    readonly NAS_CONFIG
=/etc/samba/nas.conf
    readonly this_file
=$(basename $0)
    
#
    # Change your personal default values here if you like
    #
    
readonly SMB_DEFAULT_IP=192.168.1.10
    readonly SMB_DEFAULT_NAME
=MYNAS
    readonly SMB_DEFAULT_DOMAIN
=WORKGROUP
    test 
root $USER && readonly SMB_DEFAULT_USR=$USER
    
#
    # Reload the script if no config was found, as the creation of the config requires root
    #
    
test ! -"$NAS_CONFIG" && test "0" "$UID" && echo "No configuration ($NAS_CONFIG) found, log into root:" && su -c $this_file && exit 1
# |
# | Variables
    
readonly SMBC="$(which smbclient)"
    
#
    # str_smb is only for the debug config file
    # while smb_str_* will be for the real smb.conf (much, much later, if ever) 
    #
    
readonly STR_SMB_IP="samba_ip"
    
readonly STR_SMB_NAME="samba_device_name"
    
readonly STR_SMB_USR="samba_user"
    
readonly STR_SMB_DOM="samba_domain"
    
#
    # Other variables
    #
    
TERMINAL_WIDTH=$(tput cols)
    
MENU_A="Connect to NAS"
    
MENU_B="Debug "
    
MENU_C="Mount NAS to local"
    
MENU_D="Show Credentials"
    
MENU_Z="Exit"
# |
# | Subs
    # Prints the header menu
    
smb_header() { clear;echo;printf "\r\t\tsea's Samba script tool ($script_version)\n"; }
    
    
# Simply print a fixed lenth of dashes
    
liner() { printf "\r";for ((i=1;i<=$TERMINAL_WIDTH;i++)); do printf "-" doneprintf "\n"; }
    
    
# Simply show and perform: Enter to continue
    
press() { liner;read -"Press [ENTER] to continue" buffer; }

    
# Shows the content of the provided credentials path/file
    
Show_SMB_cred() { # FILENAME
        
printf "\r\tSamba Credentials:\t$1\n"
        
while read line
        
do      var=$(echo $line|awk '{print $1}')
                
val=$(echo $line|awk '{print $3}')
                
printf "\r\t$var\t\t$val\n"
        
done "$1"
        
press
    
}
        
    
# Write the Samba Credentials file
    
WriteSMBcred(){ # OUTPUTFILE USER PASSWORD [ DOMAIN ]
        
test -$&& echo "Usuage: WriteSMBcred OUTPUTFILE USER PASSWORD [ DOMAIN ]"
        
output_file="$1"
        
usr="$2"pw="$3";  printf "username = $usr\n"   "$output_file"
                            
printf "password = $pw\n"   >> "$output_file"
        
test ! -"$4" &&   printf "  domain = $4\n"    >> "$output_file"
    
}
    
    
# Write the dummy file so you dont have to provide the same information to the script
    
WriteDebug() { # OUTPUTFILE IP NAME USER PASSWORD [ DOMAIN ]
        
printf "$STR_SMB_IP=$2\n"    "$1"
        
printf "$STR_SMB_NAME=$3\n" >> "$1"
        
printf "$STR_SMB_USR=$4\n"  >> "$1"
        
printf "$STR_SMB_DOM=$5\n"  >> "$1" && 
            echo 
"Successfully saved $SAMBA_DEBUG_CONFIG" || echo "Not enough permission"
    
}
    
    
# Lists an array of entries found on NAS
    
SMB_List_Shares() { # NAS-NAME || NAS-IP
        
nas_name="$1"
        
tmp_str=$(
        
$SMBC -"$nas_name" -grep Disk|awk '{print $1}'
        
)
        echo 
"${tmp_str}"
    
}
    
    
# Ask a question and return 0 if answer is yes, 1 otherwise
    
ask() { # QUESTION
        
read -n1 -"        $1 (y/n)" answer 
        printf 
"\n"
        
case $answer in
            y
|o|j|s)    # First letter of the meaning "yes" in these languages:
                        # English, Fran├žais, Deutsch, Italiano, Espagnol
                        
return 0    ;;
            *)          return 
1    ;;
        
esac
    
}
    
    
# Mount the folders on the NAS to local environment
    
NAS_Mount() { # NAS-NAME|NAS-IP  MOUNT-DIR
        
test ! -$&& echo "Usage: Mount_NAS NAS-NAME|NAS-IP  MOUNT-DIR" && return 1
        shares
=$(SMB_List_Shares "$1")
        
#echo $shares
        
press
        
if [ ! -"$2" ]
        
then    sudo mkdir -"$2"
                
test "root" "$USER" && sudo chown $USER "$2"
        
fi
        
        
for each in $shares
        
do      sudo mkdir -"$2/$each"
                
sudo chown $USER $mp/$each
                sudo mount 
-t cifs "//$samba_device_name/$each" "$2/$each" -o rw,soft,credentials="$SAMBA_CRED"
        
done
    
}

    
# Retrieve a list of folders on the NAS and connect to one of them
    
SMB_Connect() { # NAS-NAME|NAS-IP
        
select share in ${sharesback
        
do  test $share back && break
            
$SMBC //$samba_device_name/$share -A $SAMBA_CRED
        
done
    
}
    
    
# Shows a bunch of diffrent value
    
SMB_Debug() { #
        
echo echo "Testing $samba_ip"
        
ping -c 1 $samba_ip
        press

        
echo
        echo 
"Testing Firewall"
        
sudo iptables --n
        press

        fus
="samba_share_fusefs"
        
fusefs=$(getsebool $fus|awk '{print $3}')
        echo
        echo 
"Testing: $fus"
        
echo -"\tThe SELinux $fus setting is currently\t\t$fusefs"
        
if [ $(ask "Do you want to toggle it?") ]
        
then    fus_toggle="yes"
        
else    fus_toggle="no"
        
fi
        
echo $fus_toggle
        
#test "$fus_toggle" = "yes" && test "on" = "$fusefs" && sudo setsebool $fus 0 || sudo setsebool $fus 1
        
press

        
echo
        echo 
"Testing: $SAMBA_CONF using testparm"
        
test ask "Edit $SAMBA_CONF before testing" && vi "$SAMBA_CONF"
        
testparm
        press

        
echo
        echo 
"List services for Samba server (NOT required for NAS)"
        
for service in smbd nmbd
        
do ps -grep $service || echo -"\tService:\t$service\tnot found"
        
done
        systemd
-analyze blame|grep smb
        press

        
echo
        echo 
"View logfiles in $SAMBA_LOGDIR"
        
if [ "0" "$UID" ]
        
then    logs=$(ls "$SAMBA_LOGDIR" -r)
                if [ ! 
"" "$logs" ]
                
then    for log in $logs back
                        
do      test "$log"="back" && break
                                
test ask "View log: $logs" && vi "$log"
                        
done
                fi
        
else    echo "You need to be root to view or edit the logs."
        
fi
        press
    
}
# |
# | Pre-requisites
    
if [ ! -"$NAS_CONFIG" ]
    
then    smb_header
            
echo "The configuration file for this script was not found at $NAS_CONFIG"
            
echo "This is required for this script to work, and ease its usage."
            
read -"$STR_SMB_IP? ($SMB_DEFAULT_IP): "      var_smb_ip
            read 
-"$STR_SMB_NAME? ($SMB_DEFAULT_NAME): "  var_smb_name
            read 
-"$STR_SMB_USR? ($SMB_DEFAULT_USR): "    var_smb_usr
            read 
-"$STR_SMB_DOM? ($SMB_DEFAULT_DOMAIN): " var_smb_dom
            
#
            # Check for empty variables, and fill with default values
            #
            
test "" "$var_smb_ip"     && var_smb_ip=$SMB_DEFAULT_IP
            test 
"" "$var_smb_usr"    && var_smb_usr=$SMB_DEFAULT_USR
            test 
"" "$var_smb_name"   && var_smb_name=$SMB_DEFAULT_NAME
            test 
"" "$var_smb_dom"    && var_smb_dom=$SMB_DEFAULT_DOMAIN
            
#
            # Now write the config file and the credentials
            #
            
echo "Asking for your password which you had set on the NAS"
            
echo "Showing the pw as you type to avoid typos, and i dont know another way to handle..."
            
echo "Leave empty and press enter to change the password later manualy."
            
read -"Your password: " tmp_pw
            test 
"" "$tmp_pw" && tmp_pw="PASSWORD"
            
for each in cred nas
            
do  case $each in
                
"cred")     WriteSMBcred "$SAMBA_CRED"       "$var_smb_usr"    "$tmp_pw"     "$var_smb_dom"    ;;
                
"nas")      WriteDebug   "$NAS_CONFIG" $var_smb_ip  "$var_smb_name" "$var_smb_usr"    "$tmp_pw"     "$var_smb_dom"    ;;  
                
esac
            done
            source 
"$NAS_CONFIG"
    
else    source "$NAS_CONFIG"
    
fi
    shares
=$(SMB_List_Shares "$samba_device_name")  
# |
# | Output
    
smb_header
    select entry in 
"$MENU_A" "$MENU_B" "$MENU_C" "$MENU_D" "$MENU_Z"
    
do  case "$entry" in
        
"$MENU_A")  SMB_Connect "$samba_device_name"    && smb_header ;;
        
"$MENU_B")  SMB_Debug                           && smb_header ;;
        
"$MENU_C")  NAS_Mount   "$samba_device_name"    && smb_header ;;
        
"$MENU_D")  Show_SMB_cred "$SAMBA_CRED"         && smb_header ;;
        
"$MENU_Z")  break ;;
        
esac
    done 













local webserver

what tools / software do i need to run my own local webserver? same way what WAMP does in windows :)




running information

Hi all,

i wrote a script that change a text file from A to B.

./myScript A > B

it doesnt really matter what it is doing.



i want to know how much time took for the script to do that

+

what was the size of the file before and after

+

what was the memory that the script used for the change procedure



is there an easy way to get this information?



Thanks,

Pap