w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Linux skip /root/.gvfs when executing df command with non-root user
I got the solution for my own question :) In df command you can pass the file system types which you would like to exclude, in this case it is 'fuse.gvfs-fuse-daemon'. So when I execute the below the command I no more get this message "df: `/root/.gvfs': Permission denied" df -x fuse.gvfs-fuse-daemon For more details one can look into df --help option.

Categories : Linux

Linking R packages during installation to a Linux RPM
I was getting the exact same error as you when trying to install the R gmp package on Ubuntu, and it worked after installing libgmp3-dev. The equivalent rpm will be libgmp3-devel-something-or-other, try rpm search for your platform.

Categories : Linux

.htaccess / mod_rewrite.c : CakePHP application in a subfolder where the root folder hosts a Wordpress installation
The following works for mydomain.com/cakeapp: (0) .htaccess in ROOT FOLDER #Action php /cgi-php52/php #AddHandler php52 .php # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^cakeapp/(.*)$ /cakeapp/$1 [L,QSA] RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress (1) .htaccess in the CAKEAPP-Folder <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /cakeapp RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> (2) .htaccess in the ROOT/CAKEAPP/APP-Folder <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /cakeapp RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$

Categories : Wordpress

USB 1.1 UHCI and root hub on Linux
Yes, you are on the right track with your thinking. There is no separate hub device. With simplifications: USB architecture distinguishes Host and Device. Within Host there is Host Controller. Yours is of the type UHCI. Root hub is part of the host controller architecture. Succinct description is here. Full precise details may be found in USB 2.0 specs. It may be noted that the root hub abstraction is integral to USB Host specifications, it is not just the linux USB stack that uses this abstraction. Software such as linux will know how to probe the host controller hardware, it will read registers giving necessary details e.g. how many ports are present. Some additional good info in top answer here.

Categories : Linux

How do I open the root.disk in linux?
You need to mount this image before you can access it, try the following: mkdir olddisk sudo mount -o loop /path/to/root.disk olddisk You should now be able to access the data inside this container.

Categories : Linux

Linux boot process -- iniramfs & root ()
With initrd there are two options: Using pivot_root to rotate the final filesystem into position, or Emptying the root and mounting the final filesystem over it. More info can be found here.

Categories : Linux

How to run tshark commands from root mode in linux using TCL script ?
You have to either elevate the privileges of your tshark process via sudo (or any other available means) or run your whole script with elevated privileges. One way to do that which might be simpler than sudo as it would require zero customizations is to write a super-simple C program which would just run /usr/bin/tshark with the necessary arguments and then make that program setuid root and distribute along with your Tcl program. That is only needed if you need portability. Otherwise sudo is much simpler.

Categories : Linux

How to get the memory usage of a process in linux without root permission
I'm not sure exactly what you are really looking for-- do you want to know the amount of memory that a process is currently using? If so, then look at /proc/<pid>/status and examine the VmRSS line. That's the number you want (in this case, RSS means "Resident Set Size" if you're curious). That line should be parse-able in a high-level language like PHP. However, for a lower-level language like C, it should be easier to parse /proc/<pid>/stat which has the same values but each is separated by a space and there are no labels. If you don't have permission to read the file, that means that the server process is running under a different user than you are logged in as. You will need to work with the hosting provider to get that resolved, or figure out how to get the server process

Categories : C++

effects of initializing git repository on linux root directory 3:)
Instead of using git you could use a filesystem that support snapshots, like ZFS or BTRFS it will be more efficient and it's usage will be transparent to you.

Categories : GIT

How do I make a file permanently read-only on Linux so even root can not edit it?
There is an "immutable" bit for files: http://www.aboutlinux.info/2005/11/make-your-files-immutable-which-even.html Programs (even running as root) won't be able to tamper with the file. Of course, root can un-do the bit, but most programs (especially non-malicious ones) won't get past it.

Categories : Linux

How can i setup read permission in spool email for root in linux
Under some OS, the /var/spool/mail files have read permission for group mail, which could then be used for Nagios to access it (by placing nagios into the mail group). However it seems that your OS does not do this. Rather than change permissions on the file, I would suggest you instead use 'sudo'. Add a line to your sudoers file of the form nagios ALL = (root) NOPASSWD:/usr/local/sbin/mycommand which will allow you to run sudo /usr/local/sbin/mycommand without a password as the nagios user. You can then use this in your command definition or embed it into your script.

Categories : Linux

How to change the default from address of email send by Linux root
You should be able to use the -f flag of the sendmail command to specify the envelope from address, and you should me able to specify the meesage from address in headers of the message itself. For example: /usr/sbin/sendmail -f from@from.com to@to.com < message.txt

Categories : Linux

Configuration for Java binding for ZeroMQ (0MQ) with no root privileges on Linux
This can be overcome by adding --with-zeromq=/home/user/zeromq (installation directory of zeromq) ./configure --with-zeromq=/home/user/zeromq Other steps include export LD_LIBRARY_PATH=/home/user/zeromq/lib

Categories : Misc

linux: running self compiled kernel in qemu: VFS: Unable to mount root fs on unknown wn-block(0,0)
maybe your system image file is bad and can not be mounted. You may try these command to mount the image file and check if it is a valid root file system for linux. losetup /dev/loop0 /var/lib/libvirt/images/Debian.img kpartx -av /dev/loop0 mount /dev/mapper/loop0p1 /mnt/tmp

Categories : Linux

Which Linux platfrom required for Installation of ingres database version 9.2 and openROAD version 4.0
If you want answers don't use Stackoverflow as its ridiculous policies prevent me supplying the four links that would have been helpful to you. Google for the Actian community, which you will find far more helpful with fewer egos struggling to rule the world.

Categories : Misc

what 's difference between android system user and linux root user
As far as Linux is concerned, the system user is just a regular user (UID 1000). Android services however give it special permissions and you can get access to pretty much anything. Most services have code like this somewhere: private static final void enforceSystemOrRoot(String message) { final int uid = Binder.getCallingUid(); if (uid != Process.SYSTEM_UID && uid != 0) { throw new SecurityException(message); } } What that does is deny access to anyone who is not root or system. The shell user (UID 2000) (what you get when doing adb shell) is another user with a lot of power (member of many groups). Cf. system: $ su 1000 $ id uid=1000(system) gid=1000(system) groups=1003(graphics),1004(input),1007(log),1009(mount), 1011(adb),1015(sdcard_rw),1028(sdc

Categories : Android

WiX Toolset - check for all installation prerequisites at once (conditional installation)
The WiX Condition element when used under a Fragment or Product element represents an entry in the LaunchCondition Table and is processed by the LaunchConditions Action. The behavior you see is a limitation of that underlying feature. Here's a blog article I wrote about this 7 years ago: Short Comings of LaunchConditions Sadly, Microsoft has never taken my recommendations for improvement. So instead of using the Condition element you'll have to write your own custom table and custom action to do the processing. I have sample code for this in InstallScript and C# but I've never written it in C/C++. Here is a stripped down example in InstallScript. Read it as pseudocode for refactoring in C/C++. You'll need to also create the custom table used by the SQL query, define and schedule

Categories : Wix

Gem installation error during MYSQL gem installation in ruby
You need to install mysql before installing mysql gem. Follow this link on how to install mysql on windows

Categories : Mysql

Root immediate child nodes icons not visible when hiding root
JTree#setShowsRootHandles(boolean newValue) controls the state of the handles for root elements. Normally, this is false. Try changing to true

Categories : Java

Is sudo-ing tomcat's startup with a non-root user the same as running it as root?
Do be aware that the recommended solution to run tomcat on port 80 is to use mod-jk with the Apache web server, not to have tomcat listen on port 80 directly.

Categories : Unix

Read and Write root folder wihout root
You can use run-as on some devices to execute commands as a particular package. Google have fixed this on Jelly Bean so it no longer works: adb shell run-as app.package.name cp /data/data/package.name/file.txt /sdcard/ exit adb pull /sdcard/file.txt ~/ Here is a good article explaining file access in Android without root permissions, including a one-liner for the above script. It details how to use the new backup command: backup -f ~/data.ab -noapk app.package.name And how to extract the contents of the resulting .ab file: dd if=data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf - You will most likely need the android.permission.BACKUP permission.

Categories : Android

Reset MAMP Pro username and password to root/root
Assuming you still know the password, you can change the password back to root using /Applications/MAMP/Library/bin/mysqladmin -u root -p password root It'll prompt you to enter a password again, after which it'll be reset to root

Categories : Mysql

SVN (svnserve) virtual root --root= not recognized
svn+ssh handles the whole transaction including writing and reading the files so it ignores the --root parameter in svnserve. Here is how to fix it over at serverfault -- Basically you just make svnserve into a script that calls svnserve with the proper variables.

Categories : Svn

Document root element "hibernate-configuration", must match DOCTYPE root "hibernate-mapping"
DOCTYPE for <hibernate-configuration> should be: <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

Categories : Hibernate

is there any method to draw a tree with a root , the root's previous nodes and successor nodes?
Couple of ideas you might find useful: You can use the tree layout to place the nodes in the canvas, create link objects pointing back and forth, then bind the link objects to a diagonal. http://www.durablejs.org/examples/flowchart/1/admin.html You can also use place the nodes using a pack layout, create the link objects pointing back and forth, and bind the links to a Bezier curve. http://www.durablejs.org/examples/statechart/1/admin.html You can find the code for the graphs above: https://github.com/jruizgit/durable/tree/master/lib/durabjevisual.js

Categories : D3 Js

Including from child theme root or else include from parent theme root
To answer your question directly based on your sample, i would not check to see if the file has been placed in the child theme. If a child-theme developer has customized the file, they can simply declare the function and include their own file (wherever they place it). There is no risk of code duplication because your sample function is simple enough. Even if you simplified your code for the purposes of placing it here....you can always keep includes wrapped in a very simple function that can be declared by a child theme. This will keep PHP running efficient and not having to check for files all the time.

Categories : Wordpress

How can I remove the root node and make the first child the new root node with XSLT?
Add a rule to the identity transform that adds nothing to the result tree for your document element other than the processing of its children: <?xml version="1.0" encoding="US-ASCII"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/*"> <xsl:apply-templates select="*[1]"/> </xsl:template> <xsl:template match="@*|node()"><!--identity for all other nodes--> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> (edited to be agnostic to the name of the document element) (edited again to only preserve the first child element of the document element)

Categories : Xml

Installation Error - D/InstallAppProgress(): Installation error code: -25
Check the version number in your Manifest. If the version is less than the one on the device, you will not be able to over-install. You can install it using adb by using the -r flag. See here http://developer.android.com/tools/help/adb.html

Categories : Android

Defining root of HTML in a folder within the site root folder
You need to set the base tag. If you add the tag in your page <head> like this: <base href="http://yoursite.tld/folder/"> it should display images and with sources relative to this base path.

Categories : HTML

I want to set authenticated users' root to a nested resource, their dashboard, instead of the home#index page non-authenticated users use as root
Option 1: In your dashboards controller, change to: @user = current_user @dashboard = current_user.dashboard This will also prevent users from seeing other user's dashboards. Option 2: Now, if users can see other user's dashboard fine, then change your route: root :to => "dashboards#find", as: :authenticated_root and in your dashboards controller: def find redirect_to user_dashboard_path(current_user, current_user.dashboard) end

Categories : Ruby On Rails

Linux users', specifically Apache, permissions settings, [Linux noob :]
usually any daemon will need to access a number of ressources. it is therefore good practice to run each daemon under a special user:group, rather than nobody:nogroup. traditionally (e.g. on Debian systems) apache runs as www-data:www-data. finally, user permissions take precedence over group permissions (which in turn take precedence over other permissions). this means that a directory where the user does not have write perms but the user's group can write is effectively r/o for that user (but not for other members of the group)

Categories : Linux

Exec(Linux). How it functions internally? Linux executable attributes(rlimit)
The RLIMIT_CORE is used to place a limit on the amount of info that coredump is allowed to produce, before it is aborted. Once this limit is hit, no more info is logged and the message Aborting Core is logged to the console. From the man page of core : A process can set its soft RLIMIT_CORE resource limit to place an upper limit on the size of the core dump file that will be produced if it receives a "core dump" signal. Use setrlimit() to configure RLIMIT_CORE to a larger value to obtain complete coredumps. The most common format of executables/shared-objects is ELF. On Linux, the dynamic loading and linking of these shared-objects is performed by ld.so ld.so is loaded in the address space of a newly created process (by exec in this case) and executed first. This is possible as

Categories : Android

Purpose of Curly Brace Usage of C Code found in Linux (include/linux/list.h)?
This is a GNU language extension known as a statement expression; it's not standard C.

Categories : C

How to turn a Linux application in C/C++ into a Desktop Enviroment for a Linux distro?
You either want to create a boot loader, or you want to replace the 'shell'. This would be governed by per-user or global xinit and Xsession files.

Categories : C

What's a good way to set up Closure Compiler on Linux? Or, where should Java .jar's live on a Linux?
If you using the java command directly, then you'll have to provide a path to the jar in question. It's probably easier to place the jar in one place and create a shell script that handles the invocation and jar path.

Categories : Java

Write C++ on Windows but use Linux System calls through a Linux emulator
You've already tagged your question with Cygwin. That seems like the best solution for what you want. Cygwin is basically a collection of programs which emulate a GNU/LInux environment through the use of a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality. Here's the link to the documentation for its API Edit: Most of the Cygwin source code that I've looked at is written in C++ and makes system calls using MS Windows API to do provide the *nix emulation. The source is well written and very readable (even to to a non-C++ programmer such as myself). I think using Cygwin would be a good transition from programming on Windows to a GNU/Linux environment.

Categories : C++

Do i need to install mono on every Linux PC to run .NET application on Linux platform?
"can I run a mono application on a machine that doesn't have mono installed": no; the same as you can't run a java application on a machine that doesn't have java installed. And at the same time (to both): yes. There are tools that attempt to make this work, but they tend to be fiddly and a bit unreliable. However, it should also be noted that several (not all, by any means) distros ship with mono by default.

Categories : Dotnet

fedora linux --- compiling first linux module
As guido said, you have to match your current kernel and the kernel-devel package. To get your kernel version run uname -r I get 3.6.10-4.fc18.x86_64, download that kernel-devel version sudo yum install kernel-devel-3.6.10-4.fc18 Or update your system and boot with the new kernel, I believe those two will automatically match.

Categories : Linux

wrong child root name in rabl and can't set child root name
I've encountered the same exact bug, the problem seems to be setting the object_root to false. Following the comment of Bigxiang I have experimented a bit and found that this works fantastically: child( {:rsvp => :rsvp}, {:object_root => false} ) do extends "users/index" end Note both the round parentheses "()" and braces "{}".

Categories : Ruby On Rails

Reference another Aggregate Root inside another Aggregate root?
By the sounds of it you have an Installation AR. When requiring an AR in another you should model the contained AR as a only the ID in the container or a VO if required. You need to have hard edges around your ARs. Back to the Order / OrderLine example :) An OrderLine seems to 'require' a Product but you shouldn't ever give a Product instance tot eh OrderLine. Instead only model, say, the ProductName and ProductId as a VO in the OrderLine. Now you have a distinct edge to your Order AR. Hope that helps somewhat.

Categories : Entity Framework



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.