title: Mint Debian Install - Thinkpad T430s Problem

text: I wanted to try out the Linux Mint Debian. I downloaded an iso, checked it and then dd it on a usb stick. I boot on the usb fine and Mint is starting, but then it looks like that : ![Mint live display problem on hd4000](http://i.stack.imgur.com/cmUo9.jpg) The desktop limits are halfway across the screen. The colors aren't right and are flickering. It looks like a graphic driver problem to me... Everything seems to work fine except that. I have a Lenovo t430s with HD4000 graphics. I tried to start the Mint live in compatibility mode, but the same thing happened. Could I fix this somehow?


title: Rsyslog Problem, Custom Template

text: I have a problem with `rsyslog`. bellow is my configuration ,partial. This is File Name Template:               $template DynFile,"/data/router-log/%HOSTNAME:::lowercase%/%timegenerated:1:10:date-rfc3339%_%$HOUR%"     $template SrxFile,"/data/router-log/fw-srx5800-msl-116-1/%timegenerated:1:10:date-rfc3339%_%$HOUR%"      This is File Content Template:               $template FileFormat,"%TIMESTAMP:::date-rfc3339% %HOSTNAME% [] %rawmsg:7:29:%%rawmsg:36:$%\n"     $template CGFormat,"%TIMESTAMP:::date-rfc3339% %HOSTNAME% %msg%\n"     #          #    Second Part     #     $FileOwner root     $FileGroup root     $umask 0000     $CreateDirs on     $DirCreateMode 0644     $FileCreateMode 0644     $RepeatedMsgReduction off     $EscapeControlCharactersOnReceive on     $DynaFileCacheSize 100          # Rules          :source , !isequal , "localhost" ?DynFile;FileFormat      This system was doing its job for 1 year without any problem. It was collecting log from a remote device. Log desity is arround 50k to 60k lines per second.I was using "RSYSLOG_TraditionalFileFormat". After that log was parsing with customer software. Once remote device software was upgraded, old template stopped working. That's why I build my own template. I had to use %rawmsg% instead of %msg% variable. But now I have problems. One of them is "last message repeated n times" start appearing at the end of lines. This broke the system. Second I start seeing uncompleted lines which also broke system. I got stuck and can not find what is the problem as some files are picked up fine but some are not. I want to open "$RepeatedMsgReduction on " which can help may be in reducing unwanted duplicate lines, but this time I receive "last message repeated .. " at the end and I can not parse the file Any suggestion to how can I fix this problem ? Could `rsyslog` struggle due to custom template and this cause duplication ? Using DiskQueues or MemoryQueues can fix my problem or not ?


title: nmcli no longer allow settings modification?

text: When I try to modify network manager settings with nmcli, it says `Error: 'con' command 'modify' is not valid.` So if `nmcli con modify XXX` command is no longer supported, what is the substitute? **EDIT** nmcli version: `nmcli tool, version 0.9.8.8` networkmanager version: `networkmanager 0.9.8.8-1` I'm running Arch Linux


title: Digital audio between Intel Atom E640 and ADAU1445

text: Background information: I have a ADAU1445 DSP from Analog Devices connected to multiple audio sources through the Serial Input pairs. One of these sources is an Intel Atom E640 processor running Angström Linux, connected specifically to input pair 8 on the ADAU1445. Also, the clock lines from the Intel is connected to the ADAU1445 no. 8 clock lines. Research: It appears that the ADAU1445 accepts a range of different digital audio formats (TDM2 (Stereo), TDM4, TDM8, TDM16). But the Atom E640 outputs in Intel High Definition Audio format (codename Azalia). My understanding of the specifics is not very good. But in my research, i think i have discovered that the snd_hda_intel ALSA driver in the Linux kernel is responsible for the output. Question: Is it possible to write a custom ALSA driver, that will output audio over the same pins as the original snd_hda_intel driver, but in I2S TDM2 (Stereo) format instead of Intel HDA (Azalia) format? I am not even sure whether or not my questions is valid, or if i have made some false assumptions, so any help or comments is appreciated!


title: Where to put wrapper scripts?

text: I created some scripts for administrative tasks etc, I made them to be independent from environment - every dependency is injected through arguments. However it is annoying to provide to script commonly used dependencies every time I run it, and I don't want to hardcode in it any local information, so I created wrappers. I put my general scripts in $HOME/bin but where should I put wrappers that contain local information and are only for speeding up invocation? **Example:** Think about script that makes and sends to given ftp server encrypted system backup. It was made as a generic script that can be used with any gpg public keys or ftp servers, however I'm using always only specific public key and uploading it only to specific ftp server, so I created a wrapper with this information. This generic script is actually in /root/bin as this is administrative tool, but where to put that wrapper?


title: RHEL6: Failed Dependencies when installing a package

text: Hi I'm getting errors when forcing to install unixODBC package on RHEL 6 here is the following error: http://flic.kr/p/jBEFvP I don't know where to get the following packages that were needed by the unixODBC package


title: How does Linux "kill" a process?

text: It often baffles me that, although I have been working professionally with computers for several decades and Linux for a decade, I actually treat most of the OS' functionality as a black box, not unlike magic. Today I thought about the `kill` command, and while I use it multiple times per day (both in its "normal" and `-9` flavor) I must admit that I have absolutely no idea how it works behind the scenes. From my viewpoint, if a running process is "hung", I call `kill` on its PID, and then it suddenly isn't running anymore. Magic! What really happens there? Manpages talk about "signals" but surely that's just an abstraction. Sending `kill -9` to a process doesn't require the process' cooperation (like handling a signal), it just kills it off.   * How does Linux stop the process from continuing to take up CPU time?   * Is it removed from scheduling?   * Does it disconnect the process from its open file handles?   * How is the process' virtual memory released?   * Is there something like a global table in memory, where Linux keeps references to all resources taken up by a process, and when I "kill" a process, Linux simply goes through that table and frees the resources one by one? I'd really like to know all that!


title: How to display the current keyboard layout?

text: Is there a utility that allows to graphically display the current keyboard layout? This can be useful, for example, when writing in a foreign language and having the physical keyboard only indicating the local language (positioning of symbols, etc.). I would like to get a display similar to the following: ![enter image description here](http://i.stack.imgur.com/t8Tjq.png)


title: At what frequency is /var/log/wtmp updated?

text: What daemon is in charge of updating this file and at what frequency does it run ? When I type in `last reboot` I see :               reboot   system boot  3.5.0-45-generic Wed Jan 15 16:24 - 09:49 (14+17:24)       reboot   system boot  3.5.0-45-generic Wed Jan 15 16:04 - 09:49 (14+17:45)        and one minute later I see that it changed too (09:49 -> 09:50) so I guess the file is updated frequently. Also why in this case are there 2 'reboot' sessions active ?


title: Smarter log rotation

text: I want to reduce the amount of logs in my system, but reduce them smartly. The general idea is, each time you rotate, look for any warning/error/critical level logs, and keep 2 minutes of log context (before and after), regardless of its log level. The rest of logs would be simply discarded. The current alternatives seem to be, either log _everything_ and needlessly use copious amounts of disk, or just filter by specific log levels and forget any chances you had at actually trying to debug the problems. Is there any log rotating or syslog system for Debian that can work like that?


title: Is a restart of cron or crond necessary after each new schedule addition or modification?

text: When I schedule a job, some seem to be applied immediately, while others after a reboot. So is it recommended to restart `cron` (`crond`) after adding a new cron job? How to do that properly (esp. in a Debian system), and should that be done with `sudo` (like `sudo service cron restart`) even for that of normal users'? I tried:               /etc/init.d/cron restart      which doesn't seem to work (neither does `/etc/init.d/cron stop` or `service cron stop`) and completes with return code 1. Here's a part of the message output: > Since the script you are attempting to invoke has been converted to an > Upstart job, you may also use the stop(8) utility, e.g. stop cron stop: > Rejected send message, 1 matched rules; type="method_call", sender=":1.91" > (uid=1000 pid=3647 comm="stop cron ") interface="com.ubuntu.Upstart0_6.Job" > member="Stop" error name="(unset)" requested_reply="0" > destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init") _(what does that mean?)_


title: Samba - releasing file lock

text: Our (Windows) users are starting a program from a shared subdirectory on a Debian server. They use samba to access this directory. When we want to release a new version of the program the started files (program file and libraries) are locked. To release these locks we restart the samba service. After restarting all locks are released and the new files can be copied to the directory. The only disadvantage is that the users are losing all the handles to the files in all directories which are served by samba on this server. We are starting Keepass from another subdirectory and Keepass crashes afterwards. Is there a nicer way of releasing the locks (in a single directory) ? Is there a way to separate the samba shares ?


title: Is there html documentation finder/searcher, like info utility for info files?

text: Many packages have their documentation in html. Is there some sort of `man` or `info` utility to **find** locally installed html documentation and work with it? **I mean, I need a program which would conveniently search for files of html documentation.** And then open it, and browse through it, and maybe some search engine, and cookies please. It would be the best if there were some root html file with links to all of the installed html documentation. Otherwise, I need to use `find` to find the file and then I open it in firefox. I also could look up where documentation files are in synaptic.. But all of this is not convenient in many ways. Of course, one could write a couple scripts to search through the documentation etc. But I thought since the html documentation exists for many packages (and it won't go anywhere in near future) there could be a tool to work with it already. _(the situation with html docs is like if you had only files with man pages and no`man` utility)_ **I do not mean to open html in a terminal.**


How to set Sublime Text as default text editor? The only option I see is Pluma. I'm using Mate Desktop on Fedora 19. ![enter image description here](http://i.stack.imgur.com/LpWqw.png) Edit: The Sublime Text executable (installed by hand, not a package) is at `/home/matt/sublime_text_3/sublime_text`.


title: How to edit context menu in Elementary OS' Files manager (pantheon-files)?

text: (I am new with Elementary OS and am not sure how to ask questions on their website. So this might be a cross-posting; I cannot find my question posted there.) I have seen here that the entries in the context menu of the file manager can be edited as `.contractor` files in `/usr/share/contractor/`. That case is about adding "open terminal here", and I was able , following that model, to add "open folder as root" - as presented here. A such `.contractor` file would look like this:               [Contractor Entry]     Name=Open folder as root     Icon=gksu-root-terminal     Description=Open folder as root     MimeType=inode;application/x-sh;application/x-executable;     Exec=gksudo pantheon-files -d %U     Gettext-Domain=pantheon-files      I would like to know if various (terminal) commands can be created in the same way, and what the different lines in a `.contractor` mean and how to change them for a certain purpose. I would like to add a command that would convert files, similarly to what is possible through Thunar custom actions - like here, here and here. I need to know how to restrict the context menu command to a certain type of selected files - I guess that could be done in the line`MimeType=`. Also the `Exec=` line is important. May I have a bit of advice in this sense and maybe a link to a tutorial on the matter? * * * UPDATE: A contractor file running a script that was created to open music file in foobar200 through Wine works for me in this form:               [Contractor Entry]     Name=Open in Foobar     Icon=foobar2000     Description=open in foobar     MimeType=inode;application/x-sh;application/x-executable;     Exec=/home/cipricus/scripts_var/foobar_open_in.sh %F     Gettext-Domain=pantheon-files      But this adds to foobar2000 playlist all music files in the folder (and its subfolders). How to restrict this to selected files/folders?


title: WGET - Authenticating root AND all children folders

text: Before I start the question off, I want to say that a similar question helped me get past the initial login. My issue is as stated below. There's a website that I'm trying to mirror. It is something that I have an account for. I'm using wget as my tool of choice. I tried curl, but found that while submitting post data is easy with it, wget is better equipped for the task at hand. The website has an initial login page that it redirects to. After this, you have access to everything on the website. Logins do timeout after so long, but that's it. With the wget commands below, I was able to successfully save my cookies, load them, and download all child folders. My issue, however, is that each child has an index.html of the same login page. It's like the cookie worked fine for the root folder but nothing beneath it. The commands I used were:               wget http://site.here.com/users/login --save-cookies cookies.txt --post-data 'email=example@test.com&password=*****&remember_me=1' --keep-session-cookies --delete-after     wget http://site.here.com/ --load-cookies cookies.txt --keep-session-cookies -r -np      Note that the post-data variables/ids are different and that I had to download the login page to see what they were. Secondly, note that if I didn't put remember_me value to 1 that cookies.txt would be different. Without remember_me=1               .here.com    TRUE    /   FALSE   numbershere   CAKEPHP   garbagehere      With remember_me=1               site.here.com  FALSE   /   FALSE   numbershere   CakeCookie[rememberme]   garbage     .here.com    TRUE    /   FALSE   numbershere   CAKEPHP   garbagehere      The result being that the former would only download the login page and the latter getting to all child folders, only with children containing index of login and that's it. I'm kind of stuck and my experience with wget and http is very limited. What would you do to get past this? Generate a cookie for each child? How would you automate that instead of manually creating a cookie file for each child? P.S: I'm using Linux if that reflects the answers I'm given.


title: Adding ALSA module in Python in Linux

text: I have recently started working in linux, I wanted to to add ALSA module in my Python. I have used this,               sudo apt-get install libasound2-dev      After that I've installed pyalsa package,               pyalsa installation,     wget ftp://ftp.alsa-project.org/pub/pyalsa/pyalsa-1.0.14rc3.tar.bz2          tar xf pyalsa-1.0.14rc3.tar.bz2          $ python setup.py build          # python setup.py install      but when I type help(alsaaudio) in the Python, it gives error that there is no such module According to the alsaaudio, (http://pyalsaaudio.sourceforge.net/pyalsaaudio.html) > Note: the wrappers link with the alsasound library (from the alsa-lib > package) and need the ALSA headers for compilation. Verify that you have > /usr/lib/libasound.so and /usr/include/alsa (or similar paths) before > building. I do not understand what does that mean and what I am doing wrong in adding Alsa module in Python.


title: Tiling windows in GNOME

text: How can I get tiling windows in GNOME?


title: FastCGI library for C#/Mono

text: I'd like to write a couple of fastcgi applications in c#. I know that Mono can run ASP.NET on fastcgi enabled web servers, but that is not what I need. Is there any FastCGI library working for .NET/Mono?


title: Help with the sort command (numeric)

text: I have this output I'd like to sort numerically by port (starting at the 35th column):               tcp        0      0 192.168.0.210:110       0.0.0.0:*  LISTEN  3385/dovecot     tcp        0      0 192.168.0.210:143       0.0.0.0:*  LISTEN  3385/dovecot     tcp        0      0 192.168.0.210:22        0.0.0.0:*  LISTEN  2223/sshd     tcp        0      0 192.168.0.210:25        0.0.0.0:*  LISTEN  3589/master     tcp        0      0 192.168.0.210:443       0.0.0.0:*  LISTEN  2037/apache     tcp        0      0 192.168.0.210:587       0.0.0.0:*  LISTEN  3589/master     tcp        0      0 192.168.0.210:80        0.0.0.0:*  LISTEN  2037/apache     #                                 ^     #                                 Sorted at this column (#35)      So that the new output looks like this (lowest port first):               tcp        0      0 192.168.0.210:22        0.0.0.0:*  LISTEN  2223/sshd     tcp        0      0 192.168.0.210:25        0.0.0.0:*  LISTEN  3589/master     tcp        0      0 192.168.0.210:80        0.0.0.0:*  LISTEN  2037/apache     tcp        0      0 192.168.0.210:110       0.0.0.0:*  LISTEN  3385/dovecot     tcp        0      0 192.168.0.210:143       0.0.0.0:*  LISTEN  3385/dovecot     tcp        0      0 192.168.0.210:443       0.0.0.0:*  LISTEN  2037/apache     tcp        0      0 192.168.0.210:587       0.0.0.0:*  LISTEN  3589/master     #                                 ^     #                                 Sorted at this column (#35)      I've played around with all different forms of `|sort`, including:               |sort -n         # <- I thought this would work     |sort -nk35     |sort -nk35,37      Etcetera, etcetera. Maybe I'm misunderstanding the purpose of the `-k` flag? Or maybe those colons are messing things up?


title: Full network logging via linux firewall ( iptables )?

text: How truly enable full network logging via iptables? There is an option `--log-prefix` to add a tag to log entries. But the log entries don't show all complete packets. What a grand way to enable full logging for any network packets of any OSI levels. ICMP, TCP/IP, arp, eth? I really appreciate the squert project, the front end of snort. What kind of front end for iptables does the same? I'm looking for logger. ![example of fron-end\(squert\) #1](http://i.stack.imgur.com/yG6dh.png) ![example of fron-end\(squert\) #1](http://i.stack.imgur.com/NJdEZ.png)


title: swap space allocation vs swaptotal

text: I created a Red Hat 9 virtual machine on VMware Workstion 9 by allocated the physical memory of 256MB. See pic. ![physical memory](http://i.stack.imgur.com/6P1z7.png) When installing Linux, I created the swap partition with a size of 256MB. See picture. ![Add Partition](http://i.stack.imgur.com/MKAn5.png) And got the partitioning like below. ![Partitioning list](http://i.stack.imgur.com/HJxbq.png) But after the installation completed, I checked through the command               cat /proc/meminfo      I got the result               SwapTotal:     1052248 kB     SwapFree:      1047956 kB      I got a screenshot ![enter image description here](http://i.stack.imgur.com/CbSjn.png) Which is very confusing. Is the size of the swap space decided by the "Add Partition" during OS installation process?


title: ethtool get permanent MAC address returns all 0's

text: I need to read permanent (burned-in) MAC address of network adapter. Since MAC address can be easily spoofed, I need to read the real one which is written on EEPROM. I need to do it using C++ on Linux. I tried using ethtool which is quite good and works fine. However on some systems it does not work as intented.               ethtool -P eth0      returns this:               Permanent address: 00:00:00:00:00:00      and               ethtool -e eth0      returns this:               Cannot get EEPROM data: Operation not supported      * * * Network Adapter has following info:   * driver: ucc_geth   * version: 1.1   * firmware-version: N/A   * bus-info: QUICC ENGINE Linux kernel version is: 2.6.32.13 Question is: Can i fix this issue with any update(driver, kernel etc)? Additionally, I make the same ethtool calls with `ioctl` function in C++. Is there any way to fix this inside the code? Or is there any other way to get the permanent MAC address from EEPROM?


title: How can I unveal files on my external hard drive?

text: I copied a big folder (around 110 GB) from my (Mac 10.7.5) computer onto a hard drive (exFAT). It took quite some time and afterwards I even checked that the files were actually there. After more copying of other folders, I deleted all the source folders on my computer (and also the trash can) and unplugged the harddrive. Then I saw that the big folder on my hard drive was empty, not containing any data (the other folders are still there). When analyzing the hard drive (under linux) I found this: ![Properties of the Partition Miel](http://i.stack.imgur.com/a3XWv.png) So it seems that the sum of all files only makes up 680 GB while there are actually 799 GB used! The difference is probably the exact size of my missing data. Is there any way to access or unveal this data? Additional info:   * I named the Folder MASTER. But now there are two folders there. One is named MASTER and one is named Master.    * Both folders are completly empty, there are no hidden files.


title: How to detect which keyboard device is being used

text: I'm working on a computer with two keyboards and two users. They are using different layouts. The two keyboards are identical. Their device ID can be found easily with `xinput`, but when typing we can't tell them apart. Therefore, when setting the alternative layout, we have to just try one and revert and try the other one it if it doesn't work. **Is there some way to find the keyboard ID, as understood by`setxkbmap -device`, when typing?** To elaborate, the current approach is simply to run `xinput` to find the device IDs of both keyboards. Then we change the layout of one with `setxkbmap -device [device number] -layout ...` and type a couple characters to check if it changed the right keyboard. If not we reset the keyboard with another `setxkbmap` command and run the first command with the other device ID. Ideally the solution would plug into this:               setxkbmap -device $(command which prints the device ID at the first keypress) -layout ...      I tried `xev`, but that doesn't seem to indicate which keyboard device actually sent the event.


title: Why can't I disable some of the services in system-config-services?

text: I'm developing a kiosk like PC so it doesn't need most of the services. ### Questions   1. Why can't we disable some services showed in `system-config-service`?   2. Is there any way to disable all (or at least most) of the services that show up in `system-config-services`?


title: Change where mlocate stores the database?

text: Looks like it's not configurable through `/etc/updatedb.conf`, and not mentioned in its manual as well. So can I change that?


title: Allowing outgoing emails that will be delivered to localhost only

text: I operate a Linux system where I give out free Linux shell accounts to people for educational purposes. Unfortunately, while doing so it's expected to meet abusive users who will keep sending spam emails to other servers such as Google, Zoho, etc and hence will get the IP of the server blocked. What I would like to do is allow the users on the system to send messages within localhost only. This means that when a user tries to send out an email to an external domain name, GMail for example, the request will be refused. However, if the user tries to send an email to another user on localhost (example: giovanni@localhost), the message will be sent. I don't mind receiving emails from other servers, but I don't want my server to send emails to other servers. How can I do so? I'm running **CentOS 6.5 with Postfix** installed. How can I configure this? Any suggestion will be hugely appreciated!


title: Is whois command safe for privacy?

text: I remember in the past that companies such as Network Solutions will steal your searched domain name when you perform a domain search at their website. I want to know, is the built-in command `whois` safe from this perspective? What the server the command pointed to, and do they collect information?


title: Xorg not working on Arch Linux

text: I installed Arch i686 on a VirtualBox VM (I have an nvidia GT610). I ran the following commmand as root:               pacman -S nvidia       After installation and rebooting, I ran               pacman -S xorg-server xorg-xinit xorg-server-utils xorg-twm xorg-xclock xterm      then               startx      I got a fatal error saying `No screens found`. Any help as to what should I do ?


title: Whitelist virtual_alias_maps

text: I have one mailbox in postfix and several aliases to it. Is it possible to create whitelists for specific alias in order to allow only the addresses from the list to send messages. For example: virtual hash:               test@example.com user     priv@example.com user      I would like to permit only two users(ali@comp.com ola@test.org), to send a message to priv@example.com In the other hand when someone wants to send a message to test@example.com, No restrictions are applied. Is it possible to configure postfix server this way?


title: How to extract the similarities between two strings

text: I have two strings in two different sentences: string 1: `30 mutation alanine for valine` string 2: `alanine at position 30` is there away to find the similarities between them as it is clear they both have 30 and alanine using regular expressions for example?


title: How to format Partition

text: How can I format the following partition on Redhat 5.2?               /dev/mapper/VG00-LogVol 148G  111G   36G  76% /u001/app/oracle


title: How to find out Hard disk first & last sector ID's?

text: Is that possible to find Hard disk sector's ID? If we can, how to find out Hard disk 1st & last sector ID's in windows & LINUX? As I tried to Google it, I found only hard disk sector size. If any one know about this please update.


title: Tuning keyboard (dead key) functionality on Gnome

text: My preferred keyboard configuration is US-International. When I use it on MS- Windows and type certain special characters (i.e., `~` `'` `"`) followed by `a`, `o` `n` I get `á` `ó` or `ñ` as I wish. However when I type these characters followed by a letter that doesn't match, I will get that special character followed by the letter. So if I want to type, let's say, `"q` I can do it by pressing `"``q`. However, if I do the same on Gnome I need to do it like `"``␣``q`, otherwise I get an audible bell. Also, if I want to type two single quotes, in Gnome I need to type `'` four times, instead of the two times it takes on MS-windows. I know it is a rather minor annoyance, but it does get to me, and I see Gnu+Linux as a highly customizable OS, and I'd like to learn more about how do I do such things. Changing to the normal US keyboard is not an option, because I need to use characters such as `á` `ó` or `ñ` for typing in Spanish. * * * note: I am using Debian


title: Empty typescript file with the script command

text: In the command line, I typed:               script -a myfile      Then, I typed the some standard commands. When I opened the `myfile` using `vi`, the file was empty. Why is that? And, also, any tips on using the `ttyrec` and `ttyplay` commands?


title: Gnome shows workspace before showing the login screen

text: I have used Gnome for a long time and always have seen this problem. When I close the laptop lid and re-open it, it shows my workspace for 1 second or less and then shows the login screen.I use Fedora but I have seen it in Ubuntu too. My expected behavior is not to show my workspace and windows, and to directly show the login screen. Is it a bug? If not, Why does it have this behavior?


title: Simple shell script needed to move database files

text: I am using **MySQL** on **Ubuntu** machine. I need to physically move around the database files under `/var/lib/mysql/` (this is where all the databases directories are located). Say I have two databases, **db_1** and **db_2** , so I can see two directories(`db_1/` and `db_2/`) under the path `/var/lib/mysql/` . Under each of these two database directory, there are many `.frm` `.MYD` `.MYI` files which holds all the tables' informations of the database. For example, under `db_1/` directory there are following files:               /var/lib/mysql/db_1# ls          cars.frm      cars.MYD      cars.MYI          customers.frm     customers.MYD     customers.MYI          departments.frm     departments.MYD     departments.MYI          ...       which holds _cars_ , _customers_ , _departments_ tables' info. I need a shell script to do the following simple task:   1. make a new direcotry named `db_1_temp` under `/var/lib/mysql/`   2. move files related with _cars_ and _customers_ tables in `db_1` directory to `db_1_temp` direcotry   3. move files in `db_2` directory to `db_1` direcotry **NOTE** , user need **root** privilege to access `/var/lib/mysql/` I need these things in a .sh file so I can run it in another application. Sorry that I do not know shell script, but need this thing. Appreciate if anyone can give a help, this shell script should not be hard I think. I try to extract some time to learn shell, as now I am quite busy with other software development. Thank you!


title: Prevent Midnight Commander opening files on mouse click?

text: I use to accidentally doubleclick an archive on a remote FS (in a FISH panel) and then it starts being downloaded to be opened - very annoying. Can I prevent MC opening files with the mouse to avoid this? It would also be nice to totally forbid opening remote files with `Enter` (I don't mean `F3` or `F4` \- those are fine) leaving explicit download (copy to local) the only option.


title: Debian squeeze post-installation automount problem, USB port confused for /dev/cdrom0

text: Usually when I install Linux on a laptop, I use the following command               $ dd if=installcdrom.iso of=/dev/sdX      where sdX is the inserted, unmounted USB stick (sdb usually), and installcdrom.iso is a CD-ROM image for installing Linux. That has worked fine many times. The system boots from USB, but 'thinks' its using a CD-ROM. When I boot into the new system, the drive works fine. But twice now (and last time I simply opted for a different distro, this time I don't have the option to do so), the installation procedure goes fine, everything is great, but when I try to mount media through that port, dmesg tells me that the following happens:               [18080.920173] usb 1-5: new high speed USB device using ehci_hcd and address 5     [18081.053782] usb 1-5: New USB device found, idVendor=058f, idProduct=6335     [18081.053799] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3     [18081.053813] usb 1-5: Product: Mass Storage Device     [18081.053824] usb 1-5: Manufacturer: Generic     [18081.053834] usb 1-5: SerialNumber: 058F63356336     [18081.054232] usb 1-5: configuration #1 chosen from 1 choice     [18081.055566] scsi6 : SCSI emulation for USB Mass Storage devices     [18081.057633] usb-storage: device found at 5     [18081.057644] usb-storage: waiting for device to settle before scanning     [18086.056331] usb-storage: device scan complete     [18086.057068] scsi 6:0:0:0: Direct-Access     Single   Flash Reader     1.00 PQ: 0 ANSI: 0     [18086.664768] sd 6:0:0:0: [sdb] 31291392 512-byte logical blocks: (16.0 GB/14.9 GiB)     [18086.665607] sd 6:0:0:0: [sdb] Write Protect is off     [18086.665621] sd 6:0:0:0: [sdb] Mode Sense: 03 00 00 00     [18086.665630] sd 6:0:0:0: [sdb] Assuming drive cache: write through     [18086.668922] sd 6:0:0:0: [sdb] Assuming drive cache: write through     [18086.668941]  sdb: sdb1     [18086.674627] sd 6:0:0:0: [sdb] Assuming drive cache: write through     [18086.674650] sd 6:0:0:0: [sdb] Attached SCSI removable disk     [18094.767234] UDF-fs: No anchor found     [18094.767246] UDF-fs: Rescanning with blocksize 2048     [18094.824119] UDF-fs: No anchor found     [18094.824127] UDF-fs: No partition found (1)     [18094.941911] ISOFS: Unable to identify CD-ROM format.     [18114.585119] UDF-fs: No anchor found     [18114.585133] UDF-fs: Rescanning with blocksize 2048     [18114.622291] UDF-fs: No anchor found     [18114.622303] UDF-fs: No partition found (1)     [18114.727507] ISOFS: Unable to identify CD-ROM format.     [18116.896705] UDF-fs: No anchor found     [18116.896719] UDF-fs: Rescanning with blocksize 2048     [18116.928426] UDF-fs: No anchor found     [18116.928439] UDF-fs: No partition found (1)     [18117.025404] ISOFS: Unable to identify CD-ROM format.      Everything is fine, SCSI removable disk sdb becomes sdb1, the media is mounted... and... wait, wait... what are you doing? It's not a CD-ROM! Too late. I get the message that it's wrong fs type, bad superblock, bad option. Usually this doesn't happen, but it's a problem with the Squeeze installer, I find. The problem does not appear until the file manager (Dolphin in this case, but I had the same problem with Nautilus last time I used the Squeeze netinst) attempts to mount the drive. Mounting it manually works fine, I'm not going to be the one using this computer, so it needs to mount automatically.


title: maximum number of files ls can list

text: Im using a script to delete old file in a directory, but the script kept showing               /usr/bin : Argument list too long      It turned out the number of files were 40000 and more, So I want to know what is the maximum limit of files that can be listed. Is there anyway to find it? Is it system specific?


title: How can I make ssh ignore .ssh/config?

text: I have the following in my ~/.ssh/config.               HOST 10.2.192.*             USER foo             PreferredAuthentications publickey             IdentityFile ~/.ssh/foo/id_rsa      The above configuration lets me connect to a machine while typing half as many words.                ssh 10.2.192.x      Before my ssh config, I had to type in all of this:                ssh foo@10.2.192.x -i ~/.ss/foo/id_rsa      However there is one machine in the 10.2.192.x subnet that I want to connect to with password based authentication instead of keybased authentication. Because ssh looks at my config file and finds a match for `PreferredAuthentications publickey` I am unable to login with just my password. I don't intend to ssh into this special snowflake vm often enough to warrant adding a new rule to my ssh config. How can I make ssh ignore my config file just this once, and allow me to authenticate with a password?


title: Bash script to adjust brightness when battery unplugged

text: I am trying to set up my system and to get some practice with scripting and the like. I am running Linux Mint 16 on a Samsung RC520 laptop (`Linux 3.11.0-12-generic x86_64`). I want to implement a script that will lower my screen brightness to a pre-set value when I unplug the power (and raise it when I plug it back in). I can do some very basic scripting but not near this level. I have "xbacklight" which will set the brightness from the command line, so when I unplug the power the line I want to implement would be `xbacklight -set 20`. I also know that unplugging the power is registered by acpi (this may sound completely stupid but hopefully it is clear what I mean); when I plug out and then back in the power I get the following with `acpi_listen`:               $ acpi_listen     ac_adapter ADP1 00000080 00000000     processor CPU0 00000081 00000000     processor CPU1 00000081 00000000     processor CPU2 00000081 00000000     processor CPU3 00000081 00000000     ac_adapter ADP1 00000080 00000001     processor CPU0 00000081 00000000     processor CPU1 00000081 00000000     processor CPU2 00000081 00000000     processor CPU3 00000081 00000000     battery BAT1 00000080 00000001      So I know I have to use this but I have two main problems: I wouldn't know where to put the script so that it is automatically implemented, and I don't know how I would recognise the plug in/out in acpi because all I know how to do is `acpi_listen`.


I am on OS X trying to ssh into a ubuntu 12.04 server. I was able to SSH in -- until abruptly stuff stopped working. I've read online to use the `-v` to debug this. Output is shown below. If I ssh into a different box and then ssh from that box to the server I am able to login. I have no idea how to debug this problem but would like to learn.               $ ssh -v me@server     OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011     debug1: Reading configuration data /etc/ssh_config     debug1: /etc/ssh_config line 20: Applying options for *     debug1: /etc/ssh_config line 53: Applying options for *     debug1: Connecting to server [IP] port 22.     debug1: Connection established.     debug1: identity file /Users/me/.ssh/id_rsa type 1     debug1: identity file /Users/me/.ssh/id_rsa-cert type -1     debug1: identity file /Users/me/.ssh/id_dsa type -1     debug1: identity file /Users/me/.ssh/id_dsa-cert type -1     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_6.2     ssh_exchange_identification: read: Connection reset by peer      So far (on advice of message boards) I have looked for a hosts deny file -- but there is no such file on my machine.               $ cat /etc/hosts.deny      cat: /etc/hosts.deny: No such file or directory      I have admin access on client machine but not on server.


title: Print job "Held for authentication"

text: Following the instructions here, I have installed a Samba print server on an ARM-based Udoo-quad running Udoobuntu 12.04 LTS. The Samba server is working, and (after setting `guest ok = yes` in the server's `smb.conf`) I can browse the "print$" (Printer Drivers) folder without entering credentials. I am able to browse to the printer during client-side printer installation (on Ubuntu 13.10), but print jobs do not make it to the server. They just sit in the client print queue with the status message **"Held for authentication"**. I have the server configured to allow guest access to printers with the following section in `/etc/samba/smb.conf` (as reported by `testparm`):               [printers]         comment = All Printers         path = /var/spool/samba         create mask = 0700         guest ok = Yes         printable = Yes         print ok = Yes         browseable = No      Why does the client think that authentication is required, and what is the fix?


title: Linux Mint root app theming breaks when changing controls

text: So, this is a strange occurrence, which seems similar to other questions but which I've not been able to find a reference for. Maybe my Google-Fu is not strong right now. It seems to be a common complaint that user's root apps (sudo'd apps like Synaptic) are falling back on default themes. Usually the solution is given as "copy themes from `~/.themes` to `/usr/share/themes` or `/root/.themes`," for example. This hasn't worked for me, because there's nothing listed in `~/.themes` for me. Then I figured out that changing the _controls_ setting in the Appearance dialog breaks root app theming instantly. See the following screenshots. **Before** ![Default Mint-X theme/controls selected](http://i.stack.imgur.com/5H4tN.png) **After** ![One click later, root app theme broken](http://i.stack.imgur.com/RyzAV.png) _Installing_ another themeset (such as `grey-theme` from Synaptic) appears to break this somehow too, although it goes away when uninstalled. I have not tested this extensively and it may be a fluke related to the controls changing. On a hunch, I tried running `sudo mate-appearance-properties` and/or `gksudo mate-appearance-properties`. Notably, nothing changed when I selected different controls, not even the root app. Also, `sudo` had only the default theme selected, but `gksudo` had " _Custom Theme_ " selected, which was identical to the default and also could not be changed. Unsure what this means, if anything. So, long story short, I doubt this is a bug per se, but I would like to be able to change my default theme/controls and have root apps follow it somehow.


title: Running sh script: «Permission denied» despite the executable bit and root rights

text: I installed Debian in VirtualBox (for various experiments which usually broke my system) and tried to launch the VirtualBox guest addon script. I logged in as root and tried to launch `autorun.sh`, but I got «Permission denied». `ls -l` shows that the script have an executable rights. Sorry, that I can't copy the output -- VirtualBox absolutely have no use without the addon, as neither a shared directory, nor a shared clipboard works. But just for you to be sure, I copied the rights by hands:               #ls -l ./autorun.sh     -r-xr-xr-x 1 root root 6966 Mar 26 13:56 ./autorun.sh      At first I thought that it may be that the script executes something that gave the error. I tried to replace `/bin/sh` with something like `#/pathtorealsh/sh -xv`, but I got no output — it seems the script can't even be executed. I have not even an idea what could cause it.


title: Ubuntu 14.04 LTS - USB 3.0 Low Output or not working

text: I have a problem with my laptop. Since I've installed Ubuntu 14.04 LTS in dual boot, my two USB 3.0 don't work anymore. Maybe you need to know: My Laptop has 2*USB 2.0 and 2*USB 3.0. One of the USB 2.0 is defect, idk why, it doesn't work under Windows either. The two 3.0 Ports work under Windows (they charge my Phone and I can connect my mouse & USB stick to them). The 2.0 port works fine, too. In Ubuntu, the 2.0 port works excellent, too. But the 3.0 Ports don't. Whenever I plug in my Phone, it says that it's charging, but it doesn't detect that it's connect to a Laptop/PC (No USB Debugging icon and no option to enable mass storage). When i plug my mouse in one of the 3.0 ports, the laser (or whatever it is) on the bottom of the mouse flickers, but it doesn't work. When i plug in an USB, it doesn't connect. Before Ubuntu 14.04 i had 13.04 and everything worked as it should (except the USB 2.0 port, of course). This is the output of `lsusb` with plugged in my mouse and my phone to my 3.0 ports:               Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 004: ID 8087:07da Intel Corp.       Bus 001 Device 003: ID 04f2:b2bb Chicony Electronics Co., Ltd      Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub`      This is 'lsusb' with **nothing** plugged in:               Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 004: ID 8087:07da Intel Corp.      Bus 001 Device 003: ID 04f2:b2bb Chicony Electronics Co., Ltd      Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub     Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub      I only know that `04f2:b2bb` is my Webcam. Thanks in advance, I'm helpless.


title: Ubuntu 10.04 kvm Virtual Machine guest network speed slow

text: i have the following situation, i have a kvm host ubuntu 10.04 LTS 64-bit network host speed is perfectly run , as i am testing network speed using iperf , the speed between any network device and the kvm host is perfect running with 1GB/s but guest network speed is slow and the test result like 500 MB/s with any network device or with the host itself , although when i migrate this guest to another kvm guest based on rhel 5.3 the network speed works perfect . and when i copied the machine to another ubuntu 10.04 lts 64-bit kvm host , the network speed returns to the speed 500 MB/s any one can help please


title: How to mount a flash image in Linux?

text: In Linux, I created an image of a flash disk as follows:               sudo dd if=/dev/sdb of=test.img      which I now want to mount directly. I tried the following command               sudo mount -t ext3 -o loop test.img /mnt/flash      which resulted in the following error:               mount: wrong fs type, bad option, bad superblock on /dev/loop0,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so      `dmesg` shows the entry               EXT3-fs (loop0): error: can't find ext3 filesystem on dev loop0.      which I am not able to interpret. I get the same message when I omit the option `-o loop`. Any ideas how I am able to mount the _file_ image to `/mnt/flash`? I am not talking about mounting the actual flash disk, I want to mount the `file`.


title: How to format a 1GB USB stick to FAT32 with 512 bytes sector?

text: I am trying hard to format a 1GB USB stick so that I can use it to install a new linux OS. Because the Disk utility has failed me when creating the file system. I tried to do it manually using `fdisk` by going through the following steps to create the master boot record and a 1GB partition:               # fdisk /dev/sdc          Command (m for help): p     Disk /dev/sdc: 994.5 MiB, 1042808832 bytes, 509184 sectors     Units: sectors of 1 * 2048 = 2048 bytes     Sector size (logical/physical): 2048 bytes / 2048 bytes     I/O size (minimum/optimal): 2048 bytes / 2048 bytes     Disklabel type: dos     Disk identifier: 0x967a68db          Device    Boot Start       End  Blocks  Id System     /dev/sdc1 *        1    509183 1018366   b W95 FAT32          Command (m for help): o          Created a new DOS disklabel with disk identifier 0x727b4976.          Command (m for help): n          Partition type:        p   primary (0 primary, 0 extended, 4 free)        e   extended     Select (default p): p     Partition number (1-4, default 1): 1     First sector (512-509183, default 512):      Last sector, +sectors or +size{K,M,G,T,P} (512-509183, default 509183):           Created a new partition 1 of type 'Linux' and of size 993.5 MiB.          Command (m for help): v     Partition 1: cylinder 253 greater than maximum 252     Partition 1: previous sectors 509183 disagrees with total 507835     Remaining 511 unallocated 2048-byte sectors.          Command (m for help): w          The partition table has been altered.     Calling ioctl() to re-read partition table.     Syncing disks.      Then I tried to format it to FAT32 file system with 512 bytes sector size, but it says the minimum allowed is 2048 bytes.               # mkfs.fat -v -F 32 -S 512 /dev/sdc1     mkfs.fat 3.0.26 (2014-03-07)     Warning: sector size was set to 2048 (minimal for this device)     WARNING: Not enough clusters for a 32 bit FAT!     /dev/sdc1 has 33 heads and 61 sectors per track,     hidden sectors 0x0800;     logical sector size is 2048,     using 0xf8 media descriptor, with 508672 sectors;     drive number 0x80;     filesystem has 2 32-bit FATs and 8 sectors per cluster.     FAT size is 125 sectors, and provides 63548 clusters.     There are 32 reserved sectors.     Volume ID is 1ab3abc1, no volume label.      I need 512 bytes sector as `syslinux` does not support larger sector size.


title: How to make Shift+Insert paste selection after closing window with selection?

text: Typical scenario: I want to get a snippet from a text file into my terminal (probably running a VIM). Now I open the file using mousepad, select the snippet, _close_ mousepad, switch to urxvt and hit `Shift` \+ `Insert` to paste the text. (As opposed to non-terminal applications, where the same does the "normal" paste, but let's keep that aside for now). IIRC, this work-flow used to work perfectly, until a certain moment. Now, since the moment I close the mousepad window, contents of the clipboard is lost, i.e. reverted to that _before_. Of course I don't want to keep the window open, that only leads to cluttered desktop (= random loss my concentration). _Skip this:_ Is there any rationale for this? I'm tempted to think that this is some kind of security measure, but frankly, that idea seems so scary to me: I mean, it's supposed to be clipboard, right? Not a VCS nor a password manager, just a plain old simple clipboard. (What next, are we going to have separate cursors in applications? Or separate selections? Or five hands?) How can I get my old normal clipboard behavior? And by the way, which part of the architecture (X/GTK/Xfce/mousepad) is responsible for this behavior? **After-thought:** After reading the first two great answer plus the article linked, I realized that yes, behavior might have changed, but it's more likely that I have misunderstood the clipboards for years, and it's more about changes in my work-flow (i.e. heavy use of vim, ssh and urxvt and keyboard- oriented control) that caused recent increase in my stumbling. (I feel relieved that it's not another instance of terrible trend in FOSS when developers are arbitrarily "improving" fundamentals of desktop tools.) So while I was expecting a "switch to turn it back" to behave ~~how it was~~ how I understood it, namely retaining separate "Ctrl+X/C/V" and "MMB", I'll be looking into solutions involving The Grand Unification. Maybe I'll need to tune my work-flow, but at least I'll be understanding my tools.


title: Run .sh file instead of opening it

text: I am using Zorin OS 7. I want to run a `.sh` file but I can't seem to be able to--it just opens in a text editor. Also under RMB>open with there is no other option.


title: understanding how to run script securely as limited user

text: I'm a long time dev but linux newbie. I've been building this (http://tryperl.com) to learn linux. So, my question is just about some *nix stuff I don't fully grok. One of the things I want to do is run the generated script (in my application) as a limited user. So I create a `limiteduser` . Then I can set say fork limits like this : `limiteduser hard nproc 300`. Is this then **the right way** of running a script as `limiteduser` :               sudo -u limiteduser perl myscript.pl      **Secondly** , what if I had concurrent requests that **forked and executed** and ran the above code simultaneously, with different scripts. Would that cause problems? I heard it would, if two processes ran on the same user or something? Specifically I'm running on ubuntu but I assume this applies to any *nix distro? * * * Update: Also, I plan to use Time::Out to timeout a script if it takes too long so ideally I should have a limited number of processes running.


title: Recursively edit files based on parent directory's name

text: I'm facing an issue I'm not quite sure how to overcome. I have a large directory with hundreds of folders, all following the naming scheme "a_b_x", with x being a random word. In every one of these folders there are 3 text files, all with a couple of strings containing "a_b_x" as well. I'm trying to rename all of the directories and change the strings inside the files from "a_b_x" to "a_x", meaning the "b_" is supposed to be removed. I hope to accomplish this with some sed wizardry, as manually editing all of the files would take several hours. I'd be very thankful for any help!


title: C Shell unfreezing using right click

text: I know almost nothing about Unix. I use commands like `cd`, `rm`, `mkdir`, `cp`, `get`, `put`, etc., and then simply run scripts that other people have written. I had opened C-Shell and was running a script and at some point I may have accidentally clicked on the screen or done something and my process looked like it stopped. Usually the screen is humming along (like the pic below) , every few seconds it would display progress, 91 of 199, 92 of 199 etc., and then it just stopped at 96 of 199 when I accidentally did something with my mouse. ![enter image description here](http://i.stack.imgur.com/tzhQR.jpg) After an hour of googling, I right clicked on the screen just to see if it does something and then it started moving again like before. I'm sorry if this isn't a good question but I would really like to know what happened? Why did the screen stop and why did it start moving. I have tried googling but it didn't seem to bring anything up. I would like to understand this better so I don't interrupt anything in the future.


title: How to enable 'Page Handling tab' in print dialog in Arch Linux

text: I've finally gotten around to setting up my printer in Arch Linux, but I've run into a problem. Printing works just fine, except that when I go to print a document, when I look in the options in the print dialog, the _Page Handling_ tab is missing. I know that the tab exists because in my wife's Linux Mint setup, the tab is present, and she is using the exact same print driver (screenshot from her machine below): ![](http://i.imgur.com/3er8U2o.png) How do I enable the _Page Handling_ tab in the print dialog? **Additional Details:**   * Printer is a network printer   * Attempting to print a PDF, but the behaviour appears to be consistent regardless of what is printed      * Using `zathura` though the results are the same using `chromium`   * Printer driver is `Brother HL-2140 Foomatic/hpijs-pcl5e`   * Not using a desktop environment: using a combination of `awesomewm` and other applications


title: What goes into a Linux distribution?

text: **My understanding of Linux distributions is that:** They are operating systems based on the Linux kernel, and most have default desktop environments, something that is not in the Linux kernel. Fedora uses Gnome, Ubuntu uses Unity, and so on. However, some, such as Arch Linux, do not have a default window manager. **Question:** What components go into a distribution, outside of the kernel (e.g. how is Arch Linux different from just the kernel itself)? Could a functional operating system be made with just the kernel alone?


title: What are the linux kernel versions incompatibilities with btrfs?

text: I read that usage of a btrfs volume with a newer kernel can render it unreadable when that same volume is used with an older kernel. I have a mobile storage device that will be used by different linux distributions and kernels. What are the kernel version incompatibilities I might have to worry about? The machines I will use have kernel versions 3.2.0, 3.5.0, and higher.


title: How to copy a long textfile to clipboard on gnome-terminal?

text: > **Possible Duplicate:**   >  How do I send stdin to the clipboard? What's the best way to copy a long text file to keyboard? I'm imagining something like:               cat longTextFile | straightToClipboard


title: Replace string with sequential index

text: Can someone suggest an elegant way to accomplish this? Input:               test  instant  ()          test  instant  ()          ...     test  instant  ()    //total 1000 lines      output should be:               test      instant1  ()          test      instant2  ()          test      instant1000()      The empty lines are in my input files and there are many files under the same directory that I need to process at once. I tried this to replace many files in the same dir and didn't work.               for file in ./*; do perl -i -000pe 's/instance$& . ++$n/ge' "$file"; done      errors:               Substitution replacement not terminated at -e line 1.     Substitution replacement not terminated at -e line 1.      and I also tried this: `perl -i -pe 's/instant/$& . ++$n/ge' *.vs` It worked but the index just kept incrementing from one to another file. I'd like to reset that to 1 for diff file. any good suggestions?               find . -type f -exec perl -pi -e 's/instant/$& . ++$n{$ARGV}/ge' {} +      works but it replaced all other files shouldn't be replaced. I prefer to just replace the files with "*.txt" only.


title: How to set laptop screen brightness just after boot with full disk encryption

text: my girlfriend bought `Lenovo Essential G500 i5-3230` and I installed `Linux Mint 16` on it with full disk encryption. It is standard installation with encryption using `dmcrypt` and `LUKS`. But there is a problem with screen brightness, it is set to `0` before it even ask for password to encrypted partitions. I partly fixed it by adding:               echo 50 > /sys/class/backlight/acpi_video0/brightness      to `/etc/rc.local` but it fixes brightness after typing correct password to mount encrypted partitions. I want to fix brightness before that, so I can see the password input field. `/etc/rc.local` is loaded after mounting encrypted disk so I think I need to somehow force kernel to change brightness just after it loads itself and before mounting. Is there a way to tell kernel to adjust brightness just after boot? Graphic cards on laptop are: AMD® Radeon HD 8570M + Intel HD Graphics 4000 **UPDATE** I've tried solution sugested by @derobert. I created initramfs script `/etc/initramfs-tools/scripts/init-premount/local-backlight-brightness`               #!/bin/sh     PREREQ=""     prereqs()     {         echo "$PREREQ"     }          case $1 in         prereqs)             prereqs             exit 0         ;;     esac          . /usr/share/initramfs-tools/hook-functions     # Begin real processing below this line          echo 50 > /sys/class/backlight/acpi_video0/brightness      And after this:               $ sudo chmod a+rx /etc/initramfs-tools/scripts/init-premount/local-backlight-brightness     $ sudo update-initramfs -u     $ sudo reboot      But it don't work, screen is almost black when asking for password. I'm not even sure if this script was executed. How can I check if it was executed? Maybe I should add some requirements in `PREREQ=""` to make it work? **UPDATE 2 FINALLY WORKING** Ok, I decided to read manual for initramfs-tools again to check if everything was good and it looks like I used wrong boilerplate for my script. The correct one is:               #!/bin/sh     PREREQ=""     prereqs()     {         echo "$PREREQ"     }          case $1 in     prereqs)         prereqs         exit 0         ;;     esac          . /scripts/functions     # Begin real processing below this line          echo 50 > /sys/class/backlight/acpi_video0/brightness      The problem was with `. /usr/share/initramfs-tools/hook-functions`. This line was used for hook scripts that are not included in intramfs image. It should be `. /scripts/functions`. After changing it, brightness works like I wanted. I'm marking @derobert answer as correct because it directed me to correct solution.


title: How I can select a partition to install fedora?

text: I have a problem on installing fedora. I have already installed windows 8, and I have two different partitions (C (for windows), and D(for data)). I had also shrink the size of D by 50 GB, in order to create this free space to install fedora. However the fedora installer recognises only one disc, and not all the partitions I have made. Therefore it is possible that if I install fedora, my windows installation might be lost. What should I do? I just want to install linux at that specific 50GB partition... Thanks in advance John


title: Colour problem when capturing a png of the top panel of the screen

text: I want to capture a window as a png from within a bash script, using the window's _ID_. In this case, the window is the top panel. Using `gnome- screenshot` the colours are true, as per this image... (this image is not the same size as the following image, so ignore the dark line at the bottom) ![enter image description here](http://i.stack.imgur.com/Zm954.png) However when I capture the panel via `import`, _or_ `xwd` \+ `convert`, I get the following image.. ![enter image description here](http://i.stack.imgur.com/cr9FI.png) Why would I be getting this colour aberration? `import` and `convert` both belong to the `imagemagick` package... I haven't found anything else in the Ubuntu repository which can capture a window by its _ID_... so I'm stuck. (`gnome-screenshot` doesn't have the feature)... It would be nice to know what is going on here (eg, is is something to do with _transparent_ images, which I know very little about)...but in any case, just a recommendation of a _workaround_ capture utility may do the trick ... it must be able to capture a window by it's _ID_. Here is an example of how I make and view the image capture.               import -window "$(wmctrl -l |grep "Top Expanded Edge Panel" |awk '{print $1}')" screen.png       display screen.png


title: Vim, context-sensitive comment/uncomment behavior

text: I edit a lot of PHP code with Vim, and I've run into a snag with some macros in my `.vimrc`. I currently use these two macros to comment/uncomment in C-style               "c-style (//) comment (press the [.] key)     au FileType php vnoremap . :s/^\(\s*\)\(.\+\)$/\1\/\/\2/<CR>:noh<CR>gv     "c-style (//) uncomment (press the [,] key)     au FileType php vnoremap , :s/^\(\s*\)\/\//\1/<CR>:noh<CR>gv      And these two to comment/uncomment in HTML-style               "html-style (<!-- -->) comment (press the [.] key)     au FileType html vnoremap . :s/^\(\s*\)\(.\+\)$/\1<!-- \2 -->/g<CR>:noh<CR>gv     "html-style (<!-- -->) uncomment (press the [,] key)     au FileType html vnoremap , :s/^\(\s*\)<!-- \(.*\) -->/\1\2/g<CR>:noh<CR>gv      These macros work fine when applied to their intended file-type, but since there is often HTML embedded inside a PHP file, the PHP commenting style is useless. Is there a way for Vim to detect if it's working on a chunk of HTML code inside a PHP file, and then apply the correct commenting behaviour? Edit: I know that I can manually set the filetype, and that there are plugins available for this, I was looking to learn more about writing better macros.


title: How to customize a backend running job completion message?

text: Here is the situation, I am running a command (my own executives), in bash shell (Ubuntu), say something like this:               [newbie@office currentCaseAFolder]$ FEMSolver &      So that the `FEMSolver` job is now running in backend, and let's say it needs around five to ten minutes. But I have more than one cases. so               [newbie@office currentCaseAFolder]$ cd ../currentCaseBFolder     [newbie@office currentCaseBFolder]$ FEMSolver &     [newbie@office currentCaseBFolder]$ cd ../currentCaseCFolder     [newbie@office currentCaseCFolder]$ FEMSolver &     [newbie@office currentCaseCFolder]$ cd ../currentCaseDFolder     [newbie@office currentCaseDFolder]$ FEMSolver &     [newbie@office currentCaseDFolder]$ cd ../../postprocessingFolder      After a coffee time, I come back, and hit return key, some simulations have finished. so it will show me               [2]  + Done           FEMSolver &     [4]  + Done           FEMSolver &     [newbie@office postprocessingFolder]$       But this does not give me the clear information from which folder the job was sent!! I hope it could somewhere and somehow be customized to have this effect:               [2]  + Done           FEMSolver &  (from folder currentCaseBFolder)     [2]  + Done           FEMSolver &  (from folder currentCaseDFolder)     [newbie@office postprocessingFolder]$      Any ideas?


title: Unable to delete files as a root user using RS232 serial cross cable

text: I have a device(CCTV decoder) which was rebooting itself, so cant login using LAN cable. It has RS232 port only, no VGA and keybord/USB port(Embeded PC). I connected RS232 cross cable and used Teraterm, I entered to setup mode. Where I can see all files and directories. I can't edit any file/folder being root user. But I can edit through telnet remotely for a normal device. I do not know the reason behind. Here below is the log, please help me to sort out the problem.               ~ # ls -l     drwxrwxrwx    2 root     0               0 Jan  1  1970 bin     drwxrwxrwx    2 root     0               0 Nov 12  2003 boot     drwxr-xr-x    2 root     0               0 Feb  7  2007 config     drwxrwxrwx    5 root     0               0 Jan  1  1970 dev     drwxrwxrwx    5 root     0               0 Feb  7  2007 etc     -rw-r--r--    1 root     0         1157024 Jan  1  1970 h264dec_encrypt     drwxrwxrwx    4 root     0               0 Nov 16  2007 lib     lrwxrwxrwx    1 root     0              11 Nov 16  2007 linuxrc -> bin/busybox     -rw-r--r--    1 root     0           52707 Jan  1  1970 log     drwxrwxrwx    2 root     0               0 Nov 24  2003 proc     drwxrwxrwx    2 root     0               0 Nov 16  2007 sbin     drwxr-xr-x    3 root     0               0 Nov 16  2007 snmp     -rw-r--r--    1 root     0              23 Jan  1  1970 snmpd.log     drwxrwxrwx    2 root     0               0 Dec 16  2003 tmp     -rw-r--r--    1 root     0              21 Jan  1 00:00 userinfo     drwxrwxrwx    6 root     0               0 Jan  1  1970 usr     drwxrwxr-x    2 root     0               0 Mar 12  2004 var     -rw-r--r--    1 root     0               1 Nov 16  2007 ver     drwxr-xr-x    4 root     0               0 Nov 16  2007 web     ~ #           U-Boot 1.0.0 (Jul 13 2009 - 10:43:14)          CPU:   IBM PowerPC 405EP Rev. B at 199.999 MHz (PLB=99, OPB=49, EBC=33 MHz)            IIC Boot EEPROM disabled            PCI async ext clock used, internal PCI arbiter enabled            16 kB I-Cache 16 kB D-Cache     Board: ### No HW ID - assuming WMIA405EP     I2C:   ready     DRAM:  16 MB     Memory ok!     Boot from Flash     Top of RAM usable for U-Boot at: 01000000     Reserving 194k for U-Boot at: 00fcf000     Reserving 132k for malloc() at: 00fae000     Reserving 112 Bytes for Board Info at: 00fadf90     Reserving 48 Bytes for Global Data at: 00fadf60     Setting up new stack space     Stack Pointer at: 00fadf48     New Stack Pointer is: 00fadf48     Watch dog reset     Copy Global data struct      Relocate the code     Now running in RAM - U-Boot at: 00fcf000     FLASH: Manufacture id 0     ## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB     2 banks config     Bank 1 size 800000     Manufacture id 0     Bank 0 size 0     Resize bank 1 to 800000      8 MB     env_relocate[217] offset = 0x100f000     env_relocate[235] malloced ENV at 00fae008     default="00:11:22:12:67:20", curr="00:0F:D0:80:01:62".     PCI Autoconfig: Memory region: [80000000-9fffffff]     PCI Autoconfig: Memory region: [a0000000-bfffffff]     PCI Autoconfig: I/O region: [800000-3ffffff]     PCI Scan: Found Bus 0, Device 10, Function 0 Vendor 12d5     PCI Autoconfig: BAR 0, Mem, size=0x8000000, address=0x80000000     PCI Autoconfig: BAR 1, Mem, size=0x1000000, address=0xa0000000     In:    serial     Out:   serial     Err:   serial     KGDB:  kgdb ready     ready     U-Boot relocated to 00fcf000     ### main_loop entered: bootdelay=1          ### main_loop: bootcmd="bootm 0xF0000000"     Hit any key to stop autoboot:  1  0      ## Booting image at f0000000 ...        Image Name:   WMIA        Created:      2009-07-13   2:44:13 UTC        Image Type:   PowerPC Linux Kernel Image (gzip compressed)        Data Size:    748316 Bytes = 730.8 kB        Load Address: 00000000        Entry Point:  00000000        Verifying Checksum ... OK        Uncompressing Kernel Image ... OK     ## Current stack ends at 0x00FAD578 => set upper limit to 0x00800000     ## cmdline at 0x007FFC00 ... 0x007FFCF2     bd address  = 0x00FADF90     memstart    = 0x00000000     memsize     = 0x01000000     flashstart  = 0xFFFC0000     flashsize   = 0x00800000     flashoffset = 0x0002AF00     sramstart   = 0x00000000     sramsize    = 0x00000000     bootflags   = 0x0000A000     procfreq    = 199.999 MHz     plb_busfreq = 99.999 MHz     pci_busfreq = 24.999 MHz     ethaddr     = 00:0F:D0:80:01:62     IP addr     = 192.168.1.3     baudrate    = 115200 bps     No initrd     ## Transferring control to Linux (at address 00000000) ...     Linux version 2.4.20_mvl31-405ep_eval (root@localhost.localdomain) (gcc version 3.2.1 20020930 (MontaVista)) #9 Mon Jul 13 10:43:58 CST 2009     ioremap PCLIO_BASE = 0xe7ffd000     PCI bridge regs before fixup       pmm0ma 0xe0000001      pmm0ma 0x80000000      pmm0ma 0x80000000      pmm0ma 0x0      pmm1ma 0xe0000001      pmm1ma 0xa0000000      pmm1ma 0xa0000000      pmm1ma 0x0      pmm2ma 0x0      pmm2ma 0x0      pmm2ma 0x0      pmm2ma 0x0      ptm1ms 0x80000001      ptm1la 0x0      ptm2ms 0x0      ptm2la 0x0     BUS 0, device 0, Function 0 bar 0x00000014 is 0x00000008     BUS 0, device 0, Function 0 bar 0x00000018 is 0x00000008     BUS 0, device 0, Function 0 bar 0x00000018 is 0xc0000008     PCI bridge regs after fixup       pmm0ma 0xc0000001      pmm0ma 0x80000000      pmm0ma 0x80000000      pmm0ma 0x0      pmm1ma 0x0      pmm1ma 0x0      pmm1ma 0x0      pmm1ma 0x0      pmm2ma 0x0      pmm2ma 0x0      pmm2ma 0x0      pmm2ma 0x0      ptm1ms 0x1      ptm1la 0x0      ptm2ms 0xfff00001      ptm2la 0xf0800000     Setup DMA channel: 0     Transfer width: 2^0 bytes     Setup DMA channel: 1     Transfer width: 2^0 bytes     Setup DMA channel: 2     Transfer width: 2^0 bytes     Setup DMA channel: 3     Transfer width: 2^0 bytes     ASTRI WMIA405EP Evaluation Board port Version 3     On node 0 totalpages: 4096     zone(0): 4096 pages.     zone(1): 0 pages.     zone(2): 0 pages.     Kernel command line: root=/dev/mtdblock1 ip=192.168.1.3:192.168.1.100:192.168.1.1:255.255.255.0:WMIA405EP_1:eth0: console=ttyS1,115200 mtd_part=kernel,0x00000000,0x000C0000,rfs,0x000C0000,0x00700000,bootloader,0x007C0000,0x00040000 boardname=wmia405epV2 decoder=1     Parsing partition parameter from command line...3 partitions in total.     Console: colour dummy device 80x25     Calibrating delay loop... 199.47 BogoMIPS     Memory: 14392k available (1252k kernel code, 412k data, 96k init, 0k highmem)     Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)     Inode cache hash table entries: 1024 (order: 1, 8192 bytes)     Mount-cache hash table entries: 512 (order: 0, 4096 bytes)     Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)     Page-cache hash table entries: 4096 (order: 2, 16384 bytes)     POSIX conformance testing by UNIFIX     PCI: Probing PCI hardware     idsel 10 pin 1     Linux NET4.0 for Linux 2.4     Based upon Swansea University Computer Society NET3.039     Initializing RT netlink socket     OCP uart ver 1.6.2 init complete     LSP Revision 1     Starting kswapd     Disabling the Out Of Memory Killer     JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis Communications AB.     i2c-core.o: i2c core module version 2.6.2 (20011118)     i2c-dev.o: i2c /dev entries driver module version 2.6.2 (20011118)     i2c-proc.o version 2.6.2 (20011118)     pty: 256 Unix98 ptys configured     Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled     ttyS00 at 0xef600300 (irq = 0) is a 16550A     ttyS01 at 0xef600400 (irq = 1) is a 16550A     PPC 405 watchdog driver v0.6     IBM gpio driver version 07.25.02     GPIO #0 at 0xc2070700     loop: loaded (max 8 devices)     Reset ethernet interfaces     Reset ethernet interfaces     eth1: Cannot open interface without Link     IBM IIC driver v2.0     ibm-iic0: using fast (400 kHz) mode     physmap flash device: 800000 at f0000000     NO QRY response     cfi_cmdset_0001: Erase suspend on write enabled     Using buffer write method     Creating 3 MTD partitions on "phys_mapped_flash":     0x00000000-0x000c0000 : "kernel"     0x000c0000-0x007c0000 : "rfs"     0x007c0000-0x00800000 : "bootloader"     NET4: Linux TCP/IP 1.0 for NET4.0     IP Protocols: ICMP, UDP, TCP, IGMP     IP: routing cache hash table of 512 buckets, 4Kbytes     TCP: Hash tables configured (established 1024 bind 2048)     eth0: IBM EMAC: link up, 10 Mbps Half Duplex.     eth0: IBM EMAC: MAC 00:0f:d0:80:01:62.     After display status     eth0:$$$$$$$$$$$$$will config mac address     eth0:$$$$$$$$$$$$$config mac address ok     eth0:$$$$$$$$$$$$$will request irq     $$$$$$$$$$$$$request irq ok     eth0:will init rings     will enable mal chan     eth0: IBM EMAC: open completed          IP-Config: Complete:           device=eth0, addr=192.168.1.3, mask=255.255.255.0, gw=192.168.1.1,          host=WMIA405EP_1, domain=, nis-domain=(none),          bootserver=192.168.1.100, rootserver=192.168.1.100, rootpath=     NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.     VFS: Mounted root (jffs2 filesystem) readonly.     Freeing unused kernel memory: 96k init     init started:  BusyBox v1.00-pre8 (2007.11.16-10:05+0000) multi-call binary               BusyBox v1.00-pre8 (2007.11.16-10:05+0000) Built-in shell (ash)     Enter 'help' for a list of built-in commands.               Processing /etc/profile...      Press CTRL-C to enter shell within 3 sec     KERNEL,wdt_period=15     The timeout was set to 15000000 seconds     The timeout was is 0 seconds      _(reboot)_               U-Boot 1.0.0 (Jul 13 2009 - 10:43:14)     CPU:   IBM PowerPC 405EP Rev. B at 199.999 MHz (PLB=99, OPB=49, EBC=33 MHz)            IIC Boot EEPROM disabled            PCI async ext clock used, internal PCI arbiter enabled            16 kB I-Cache 16 kB D-Cache     Board: ### No HW ID - assuming WMIA405EP     I2C:   ready     DRAM:  16 MB     Memory ok!     Boot from Flash     Top of RAM usable for U-Boot at: 01000000     Reserving 194k for U-Boot at: 00fcf000     Reserving 132k for malloc() at: 00fae000     Reserving 112 Bytes for Board Info at: 00fadf90     Reserving 48 Bytes for Global Data at: 00fadf60     Setting up new stack space     Stack Pointer at: 00fadf48     New Stack Pointer is: 00fadf48     Watch dog reset     Copy Global data struct      Relocate the code     Now running in RAM - U-Boot at: 00fcf000     FLASH: Manufacture id 0     ## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB     2 banks config     Bank 1 size 800000     Manufacture id 0     Bank 0 size 0     Resize bank 1 to 800000      8 MB     env_relocate[217] offset = 0x100f000     env_relocate[235] malloced ENV at 00fae008     default="00:11:22:12:67:20", curr="00:0F:D0:80:01:62".     PCI Autoconfig: Memory region: [80000000-9fffffff]     PCI Autoconfig: Memory region: [a0000000-bfffffff]     PCI Autoconfig: I/O region: [800000-3ffffff]     PCI Scan: Found Bus 0, Device 10, Function 0 Vendor 12d5     PCI Autoconfig: BAR 0, Mem, size=0x8000000, address=0x80000000     PCI Autoconfig: BAR 1, Mem, size=0x1000000, address=0xa0000000     In:    serial     Out:   serial     Err:   serial     KGDB:  kgdb ready     ready     U-Boot relocated to 00fcf000     ### main_loop entered: bootdelay=1          ### main_loop: bootcmd="bootm 0xF0000000"     Hit any key to stop autoboot:  1  0      => <INTERRUPT>     => <INTERRUPT>     => <INTERRUPT>     => <INTERRUPT>     =>       _(reboot)_               U-Boot 1.0.0 (Jul 13 2009 - 10:43:14)     CPU:   IBM PowerPC 405EP Rev. B at 199.999 MHz (PLB=99, OPB=49, EBC=33 MHz)            IIC Boot EEPROM disabled            PCI async ext clock used, internal PCI arbiter enabled            16 kB I-Cache 16 kB D-Cache     Board: ### No HW ID - assuming WMIA405EP     I2C:   ready     DRAM:  16 MB     Memory ok!     Boot from Flash     Top of RAM usable for U-Boot at: 01000000     Reserving 194k for U-Boot at: 00fcf000     Reserving 132k for malloc() at: 00fae000     Reserving 112 Bytes for Board Info at: 00fadf90     Reserving 48 Bytes for Global Data at: 00fadf60     Setting up new stack space     Stack Pointer at: 00fadf48     New Stack Pointer is: 00fadf48     Watch dog reset     Copy Global data struct      Relocate the code     Now running in RAM - U-Boot at: 00fcf000     FLASH: Manufacture id 0     ## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB     2 banks config     Bank 1 size 800000     Manufacture id 0     Bank 0 size 0     Resize bank 1 to 800000      8 MB     env_relocate[217] offset = 0x100f000     env_relocate[235] malloced ENV at 00fae008     default="00:11:22:12:67:20", curr="00:0F:D0:80:01:62".     PCI Autoconfig: Memory region: [80000000-9fffffff]     PCI Autoconfig: Memory region: [a0000000-bfffffff]     PCI Autoconfig: I/O region: [800000-3ffffff]     PCI Scan: Found Bus 0, Device 10, Function 0 Vendor 12d5     PCI Autoconfig: BAR 0, Mem, size=0x8000000, address=0x80000000     PCI Autoconfig: BAR 1, Mem, size=0x1000000, address=0xa0000000     In:    serial     Out:   serial     Err:   serial     KGDB:  kgdb ready     ready     U-Boot relocated to 00fcf000     ### main_loop entered: bootdelay=1          ### main_loop: bootcmd="bootm 0xF0000000"     Hit any key to stop autoboot:  1  0      ## Booting image at f0000000 ...        Image Name:   WMIA        Created:      2009-07-13   2:44:13 UTC        Image Type:   PowerPC Linux Kernel Image (gzip compressed)        Data Size:    748316 Bytes = 730.8 kB        Load Address: 00000000        Entry Point:  00000000        Verifying Checksum ... OK        Uncompressing Kernel Image ... OK     ## Current stack ends at 0x00FAD578 => set upper limit to 0x00800000     ## cmdline at 0x007FFC00 ... 0x007FFCF2     bd address  = 0x00FADF90     memstart    = 0x00000000     memsize     = 0x01000000     flashstart  = 0xFFFC0000     flashsize   = 0x00800000     flashoffset = 0x0002AF00     sramstart   = 0x00000000     sramsize    = 0x00000000     bootflags   = 0x0000A000     procfreq    = 199.999 MHz     plb_busfreq = 99.999 MHz     pci_busfreq = 24.999 MHz     ethaddr     = 00:0F:D0:80:01:62     IP addr     = 192.168.1.3     baudrate    = 115200 bps     No initrd     ## Transferring control to Linux (at address 00000000) ...     Linux version 2.4.20_mvl31-405ep_eval (root@localhost.localdomain) (gcc version 3.2.1 20020930 (MontaVista)) #9 Mon Jul 13 10:43:58 CST 2009     ioremap PCLIO_BASE = 0xe7ffd000     PCI bridge regs before fixup       pmm0ma 0xe0000001      pmm0ma 0x80000000      pmm0ma 0x80000000      pmm0ma 0x0      pmm1ma 0xe0000001      pmm1ma 0xa0000000      pmm1ma 0xa0000000      pmm1ma 0x0      pmm2ma 0x0      pmm2ma 0x0      pmm2ma 0x0      pmm2ma 0x0      ptm1ms 0x80000001      ptm1la 0x0      ptm2ms 0x0      ptm2la 0x0     BUS 0, device 0, Function 0 bar 0x00000014 is 0x00000008     BUS 0, device 0, Function 0 bar 0x00000018 is 0x00000008     BUS 0, device 0, Function 0 bar 0x00000018 is 0xc0000008     PCI bridge regs after fixup       pmm0ma 0xc0000001      pmm0ma 0x80000000      pmm0ma 0x80000000      pmm0ma 0x0      pmm1ma 0x0      pmm1ma 0x0      pmm1ma 0x0      pmm1ma 0x0      pmm2ma 0x0      pmm2ma 0x0      pmm2ma 0x0      pmm2ma 0x0      ptm1ms 0x1      ptm1la 0x0      ptm2ms 0xfff00001      ptm2la 0xf0800000     Setup DMA channel: 0     Transfer width: 2^0 bytes     Setup DMA channel: 1     Transfer width: 2^0 bytes     Setup DMA channel: 2     Transfer width: 2^0 bytes     Setup DMA channel: 3     Transfer width: 2^0 bytes     ASTRI WMIA405EP Evaluation Board port Version 3     On node 0 totalpages: 4096     zone(0): 4096 pages.     zone(1): 0 pages.     zone(2): 0 pages.     Kernel command line: root=/dev/mtdblock1 ip=192.168.1.3:192.168.1.100:192.168.1.1:255.255.255.0:WMIA405EP_1:eth0: console=ttyS1,115200 mtd_part=kernel,0x00000000,0x000C0000,rfs,0x000C0000,0x00700000,bootloader,0x007C0000,0x00040000 boardname=wmia405epV2 decoder=1     Parsing partition parameter from command line...3 partitions in total.     Console: colour dummy device 80x25     Calibrating delay loop... 199.47 BogoMIPS     Memory: 14392k available (1252k kernel code, 412k data, 96k init, 0k highmem)     Dentry cache hash table entries: 2048 (order: 2, 16384 bytes)     Inode cache hash table entries: 1024 (order: 1, 8192 bytes)     Mount-cache hash table entries: 512 (order: 0, 4096 bytes)     Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)     Page-cache hash table entries: 4096 (order: 2, 16384 bytes)     POSIX conformance testing by UNIFIX     PCI: Probing PCI hardware     idsel 10 pin 1     Linux NET4.0 for Linux 2.4     Based upon Swansea University Computer Society NET3.039     Initializing RT netlink socket     OCP uart ver 1.6.2 init complete     LSP Revision 1     Starting kswapd     Disabling the Out Of Memory Killer     JFFS2 version 2.1. (C) 2001, 2002 Red Hat, Inc., designed by Axis Communications AB.     i2c-core.o: i2c core module version 2.6.2 (20011118)     i2c-dev.o: i2c /dev entries driver module version 2.6.2 (20011118)     i2c-proc.o version 2.6.2 (20011118)     pty: 256 Unix98 ptys configured     Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled     ttyS00 at 0xef600300 (irq = 0) is a 16550A     ttyS01 at 0xef600400 (irq = 1) is a 16550A     PPC 405 watchdog driver v0.6     IBM gpio driver version 07.25.02     GPIO #0 at 0xc2070700     loop: loaded (max 8 devices)     Reset ethernet interfaces     Reset ethernet interfaces     eth1: Cannot open interface without Link     IBM IIC driver v2.0     ibm-iic0: using fast (400 kHz) mode     physmap flash device: 800000 at f0000000     NO QRY response     cfi_cmdset_0001: Erase suspend on write enabled     Using buffer write method     Creating 3 MTD partitions on "phys_mapped_flash":     0x00000000-0x000c0000 : "kernel"     0x000c0000-0x007c0000 : "rfs"     0x007c0000-0x00800000 : "bootloader"     NET4: Linux TCP/IP 1.0 for NET4.0     IP Protocols: ICMP, UDP, TCP, IGMP     IP: routing cache hash table of 512 buckets, 4Kbytes     TCP: Hash tables configured (established 1024 bind 2048)     eth0: IBM EMAC: link up, 10 Mbps Half Duplex.     eth0: IBM EMAC: MAC 00:0f:d0:80:01:62.     After display status     eth0:$$$$$$$$$$$$$will config mac address     eth0:$$$$$$$$$$$$$config mac address ok     eth0:$$$$$$$$$$$$$will request irq     $$$$$$$$$$$$$request irq ok     eth0:will init rings     will enable mal chan     eth0: IBM EMAC: open completed     IP-Config: Complete:           device=eth0, addr=192.168.1.3, mask=255.255.255.0, gw=192.168.1.1,          host=WMIA405EP_1, domain=, nis-domain=(none),          bootserver=192.168.1.100, rootserver=192.168.1.100, rootpath=     NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.     VFS: Mounted root (jffs2 filesystem) readonly.     Freeing unused kernel memory: 96k init     init started:  BusyBox v1.00-pre8 (2007.11.16-10:05+0000) multi-call binary               BusyBox v1.00-pre8 (2007.11.16-10:05+0000) Built-in shell (ash)     Enter 'help' for a list of built-in commands.          chmod: /etc/profile: Read-only file system          Processing /etc/profile...      KERNEL,wdt_period=15     The timeout was set to 15000000 seconds     The timeout was is 0 seconds     Press CTRL-C to enter shell within 3 sec     rm: unable to remove `/dev/rts_wtd': Read-only file system     mkfifo failed!     Using /lib/modules/proc_jiffies.o     Using /lib/modules/etimap.o     Loading etimap modules     packetintf:[1]Using packet interface     9600     /etc/profile: 55: cannot create /proc/sys/net/core/rmem_default: Directory nonexistent     /etc/profile: 55: cannot create /proc/sys/net/core/wmem_default: Directory nonexistent     /etc/profile: 55: cannot create /proc/sys/net/core/rmem_max: Directory nonexistent     /etc/profile: 55: cannot create /proc/sys/net/core/wmem_max: Directory nonexistent     Build date Nov 16 2007 18:05:41     RTC enable     Use codec ./h264dec_encrypt     CPU clock speed: 378     MEM clock speed: 126     /var/etidaemon.pid: Read-only file system     ETimap think device 0 has etimap c2891000 1332     etimap_ioctl called one time     Init bsp CORE speed: 378     etimap_ioctl called one time     Init bsp MEM speed: 126     etimap_ioctl called one time     eti_board(0): brd_open(): CPU: Equator Technologies, Inc. BSP-15.     eti_board(0): brd_open(): board: WMIA405EP Version 3/4 (0xf). Use StringRay settings.     No ACK from slave @ addr 0xa4 in iicTx     eti_board(0): WARNING: IIC Send failed while attempting to read EEPROM     No ACK from slave @ addr 0x70 in iicTx     eti_board(0): WARNING: IIC Write to IIC Expander failed. VCXO may be active.     No ACK from slave @ addr 0xa0 in iicTx     sizeof(bsp_argv[0]) = 32     Segmentation fault     /etc/profile: 55: cannot create /proc/etivideo0: Read-only file system     nanowm: opening frontpanel device /dev/ttys0     /etc/last_ch is accessible     Init channel:1     listening :     use setting file: /etc/rts_player.conf'     main: setting_file /etc/rts_player.conf     Openning config file /etc/rts_player.conf     OpenLogFile: log_file((null))     WmiaPlayerOpen     startPlayer(): get config     startPlayer(): set config: watchdog=1, colorsystem=1     WmiaPlayerSetConfig     WmiaPlayerSetConfig: Set Protocol to 1     WmiaPlayerSetConfig: display DateTime  = 0     WmiaPlayerSetConfig: display Framerate  = 0     WmiaPlayerSetConfig: color system      = 1     WmiaPlayerSetConfig: display Camera Id   = 0     WmiaPlayerSetConfig: camera id info X=50, Y=400, color=BLACK     WmiaPlayerSetConfig: datetime info X=450, Y=400, color=BLACK     WmiaPlayerSetConfig: frame rate info X=450, Y=40, color=BLACK     WmiaPlayerStart     WmiaPlayerStart: TsPlayerOpen     config : 0x100a6390     version: 1     profileIndication: 0     levelIndication: 1     compatibleProfiles: 0     lengthSize: 4     nrOfSps: 0     nrOfPps: 0     /dev/etivideo: No such device     G722DecWrapper: AudioDecOpen     rm: unable to remove `/dev/event': Read-only file system     TsDemuxThread pid = 61     TsDemuxReceiveThread pid = 62     /dev/dsp: No such device     Audio Disabled     : No such device     Cannot bind to named socket     Opening /dev/fifo     Command   : url     Parameter : ts://239.255.3.13:31012     ==================================================     73 74 61 72 74 00 aa bb cc dd 00 00 00 70 00 00     00 17 74 73 3a 2f 2f 32 33 39 2e 32 35 35 2e 33     2e 31 33 3a 33 31 30 31 32 65 6e 64 00      =================================================     45 bytes written     nxclient: retry connect attempt 1     Done          chmod: /etc/profile: Read-only file system     Password: nxclient: retry connect attempt 2     nxclient: retry connect attempt 3     nxclient: retry connect attempt 4     nxclient: retry connect attempt 5     Test Program -> Checking test mode jumper...     Not test mode.     VideoDecSetColorSystemDirect: 1     player_watchdog pid = 71     WmiaPlayerCommandRun pid = 72     nxclient: retry connect attempt 6     nxclient: retry connect attempt 7     nxclient: retry connect attempt 8     nxclient: retry connect attempt 9     nxclient: retry connect attempt 10     Couldn't connect to Nano-X server!     Password:           ~ # ls -l     drwxrwxrwx    2 root     0               0 Jan  1  1970 bin     drwxrwxrwx    2 root     0               0 Nov 12  2003 boot     drwxr-xr-x    2 root     0               0 Feb  7  2007 config     drwxrwxrwx    5 root     0               0 Jan  1  1970 dev     drwxrwxrwx    5 root     0               0 Feb  7  2007 etc     -rw-r--r--    1 root     0         1157024 Jan  1  1970 h264dec_encrypt     drwxrwxrwx    4 root     0               0 Nov 16  2007 lib     lrwxrwxrwx    1 root     0              11 Nov 16  2007 linuxrc -> bin/busybox     -rw-r--r--    1 root     0           52754 Jan  1  1970 log     drwxrwxrwx    2 root     0               0 Nov 24  2003 proc     drwxrwxrwx    2 root     0               0 Nov 16  2007 sbin     drwxr-xr-x    3 root     0               0 Nov 16  2007 snmp     -rw-r--r--    1 root     0              23 Jan  1  1970 snmpd.log     drwxrwxrwx    2 root     0               0 Dec 16  2003 tmp     -rw-r--r--    1 root     0              21 Jan  1 00:00 userinfo     drwxrwxrwx    6 root     0               0 Jan  1  1970 usr     drwxrwxr-x    2 root     0               0 Mar 12  2004 var     -rw-r--r--    1 root     0               1 Nov 16  2007 ver     drwxr-xr-x    4 root     0               0 Nov 16  2007 web      * * * ### ifconfig               ~ # ifconfig     ifconfig: Warning: cannot open /proc/net/dev. Limited output.: No such file or directory     eth0      Link encap:Ethernet  HWaddr 00:0F:D0:80:01:62                 inet addr:192.168.159.81  Bcast:192.168.159.255  Mask:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               Interrupt:15       ### df               ~ # df      Filesystem           1k-blocks      Used Available Use% Mounted on     df: /proc/mounts: No such file or directory     ~ # fdisk -l     fdisk: /proc/partitions: No such file or directory     Segmentation fault      ### pp ss               ~ # pp ss     -sh: pss: not found      ### rmdir               ~ # rmdir /etc/profile     rmdir: `/etc/profile': Read-only file system     ~ # ?     -sh: ?: not found     ~ # I have tried to see built in commands- below are the system commands          1stRun              find                mkfs.minix          tail      1stRunEnc           free                mknod               tar      \[                  freeramdisk         mkswap              telnet      add_log             fsck.minix          modprobe            telnetd      ash                 ftpget              more                test      awk                 ftpput              mount               tftp      basename            getty               mv                  time      blockdev            grep                nano-X              top      bunzip2             gunzip              nanowm              touch      busybox             gzip                netstat             traceroute      bzcat               halt                nslookup            true      cal                 head                passwd              tty      cat                 hexdump             patch               udhcpc      chgrp               hostid              pidof               umount      chinit.sh           hostname            ping                uname      chmod               httpd               player_ap.ppc       uncompress      chown               hwclock             printf              uniq      chroot              id                  ps                  unix2dos      clear               ifconfig            pwd                 unzip      cmp                 ifdown              reboot              up_stage1.sh      cp                  ifup                renice              up_stage2.sh      cut                 inetd               reset               uptime      date                init                rm                  usleep      dd                  insmod              rmdir               uudecode      df                  kill                rmmod               uuencode      dirname             killall             route               vi      dmesg               klogd               sed                 watch      dos2unix            ln                  sh                  wc      du                  logger              sleep               wget      echo                login               snmpd               which      egrep               losetup             sort                who      env                 ls                  stty                whoami      etidaemon           lsmod               su                  wmia_ctrl.ppc      event_handler.ppc   mc_wmia_ctrl.ppc    sulogin             wtd      expr                md5sum              swapoff             xargs      false               mesg                swapon              yes      fdisk               mkdev.sh            sync                zcat      fgrep               mkdir               syslogd


title: what is the difference in ownership order?

text: What is the difference on CentOS Linux if you `chown` apache:root or root:apache? I am trying to set correct ownership for Drupal install but both Drupal Docs and all subsequent pages of discussions following have varying ideas on the subject and without a good base understanding of what it is all about you wouldn't have a clue. Until I find the right documentation on the subject I just want to know the difference of order between root:apache and apache:root if any?


title: Structure of graphical modules in Linux Lubuntu

text: I am trying to understand the layers of the Linux GUI system. I am running a netbook with Lubuntu, and I was told it's running LXDE as desktop environment. However, there are processes with 'gnome'. Aren't both incompatible? I thought that when I have one desktop environment, I could not run other desktop environments. There is also a process with XFCE, (power manager). Why is it running a process from another desktop environment? And how can I change any module of the graphical system? I have openbox and lightdm running. Could I try to install something different, lighter? (if that's possible at all). Is everything covered by these modules: x.org, openbox, x11, and LXDE? Respectively, display server, window manager, communication protocol, and desktop environment? How can I know what is running in a Linux system? Are there any command line commands to discover it?


title: Type URL and show HTTP status

text: I want to make a shell script where I type an url and it returns me the status code.So far I've tested `wget` is there any other cause it has the tendency to save whatever you run. Then I tried to some kind `awk` the output but it doesn't do you have any advices. * * * Edit for Zelda: I tried the first one ![enter image description here](http://i.stack.imgur.com/Yk6ny.png) but I always receive : ![enter image description here](http://i.stack.imgur.com/ibRLe.png) P.S. Also I tried HTTP without '',now I putted for curiosity


title: How to install meld 3.11 in Ubuntu 14.04?

text: I am trying to get meld 3.11 to work on ubuntu 14.04 I tried following the method below"               cd ~      git clone https://git.gnome.org/browse/meld      cd meld       sudo ln -s ~/meld/bin/meld /usr/bin/meld      But when i run meld in the terminal i get the following error               Traceback (most recent call last):       File "/usr/bin/meld", line 223, in <module>         setup_settings()       File "/usr/bin/meld", line 197, in setup_settings         cwd=melddir)       File "/usr/lib/python2.7/subprocess.py", line 522, in call         return Popen(*popenargs, **kwargs).wait()       File "/usr/lib/python2.7/subprocess.py", line 710, in __init__         errread, errwrite)       File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child         raise child_exception        OSError: [Errno 2] No such file or directory      I am not sure if its dependencies issue or python path problem.


title: Create NTFS partition (in Linux) for dual-boot into Linux/Windows 7

text: I have installed Linux (Debian) onto my computer (which is not partitioned). Want I want to do is to create an NTFS partition so that I can install Windows 7 onto my computer, so I can dual-boot into Linux/Windows 7. So is it possible to create an NTFS partition in Linux, without losing any Linux files?


title: nginx php-fpm index.php doesn't load

text: I have a quite simple setup with nginx and php-fpm, howsoever when I try to access my website with `my-website.com` I get a 403 forbidden error, If I access `my-website.com/index.php` everything works fine. This is what's showing up in my log:               a.ipv4.addr.here - user  [14/Dec/2013:11:46:41 +0100] "GET / HTTP/1.1" 403  192 "https://my-website.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36"      This is the output of `ls -l` of the htdocs directory:               drwxr-xr-x 14 www-data www-data 4.0K Dec 12 16:02 htdocs      I am performing a http-redirect to https to force ssl, here's the config:               server {             listen 80;             listen [::]:80;                  root /var/www/my-domain.com/htdocs/;             index index.php index.html index.htm /index.php;                  server_name my-domain.com;             rewrite     ^   https://$server_name$request_uri? permanent;          }      And here is the Server config listening on Port 443:               server {             listen 443;             listen [::]:443;             server_name my-domain.com;                  root /var/www/my-domain.com/htdocs/;             index   index.php index.html /index.php;                  access_log /var/log/nginx/my-domain.log;             ssl on;             ssl_certificate /etc/ssl/certs/my-domain.com.crt;             ssl_certificate_key /etc/ssl/private/my-domain.com.key;                  ssl_session_timeout 5m;                  ssl_protocols SSLv3 TLSv1;             ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;             ssl_prefer_server_ciphers on;                  location / {                     try_files $uri $uri/ =404;                     auth_basic              "Restricted:";                     auth_basic_user_file    .htpasswd;             }                       location ~ \.php$ {                           auth_basic              "Restricted:";                      auth_basic_user_file    .htpasswd;                      fastcgi_pass unix:/var/run/php5-fpm.sock;                      fastcgi_index index.php;                      include fastcgi_params;             }             #deny access on dotfiles             location ~ /\. {                      deny  all;             }          }      And here is the `ls -l` output for the index.php:               -rwxr-x--x 1 www-data www-data 2.4K Dec 12 11:11 index.php


title: Capturing device logs between specific time

text: We run a test script from a cron regularly , before initiating any actions this test script clears the /var/log/messages and after performing the actions it analyzes the data in /var/log/messages . This is not desired behavior as clearing of device logs is involved at start of test. How can I capture device logs only between when test runs. So that test can analyze only that data?


title: Unable to update linux-mint or install any software from the software manager

text: Returns error on update manager "Unable to download all repositories" which is followed by a long list of failed connections and ip addresses Also if I try to download any software from the software manager, it just doesn't install. Takes a while and returns not installed. Trying to use terminal is never successful either and the connection just fails It looks like apt fails to establish a connect with and of the servers and but I have no idea how to go about checking that out. Am still new to this