Programming :: Automatically Mount USB Device - Execute Script

Jul 2, 2010

I got a headless server which should, when I plug in a usb stick/device, automatically mount it and execute a script (the script is located on the usb stick). Actually I'm talking about auto-mount & auto-run which is already present in desktop systems but not in server systems. until now I had manually mounted the usb stick via ssh connection and then executed the script by hand.

View 4 Replies


ADVERTISEMENT

Programming :: How To Install Kernel Modules Automatically After Device Insertion

Jan 18, 2011

ubuntu could delay kernel module installation until device is inserted?Take my usb ath9271 wifi adapter as an example: when kernel boot up, no ath modules are installed until usb wifi apdapter is inserted, ath related modules are insmod.Could anybody how to achieve this? udev or something else?

View 5 Replies View Related

OpenSUSE :: Execute A Batch Automatically Upon Startup Under KDE?

Mar 13, 2011

Skype works for me, but there is a small thing i like to solve.
For the x64 version i need to start skype with a bash command so that the video and sound works and i thougth that a simple batch in folder bin would solve it.
So that it gets executed automatically once the desktop loads. Seems it doesn't since i still have to do it manually.
How do i execute a batch automatically upon startup under KDE?

View 1 Replies View Related

Ubuntu :: Automatically Execute Terminal Command?

May 13, 2010

I googled around and couldnt find what I was looking for. Maybe I used the wrong search terms, but whatever. I was wondering if there was a possibility to execute a series of terminal commands just by double-clicking an icon. For example, there would be an icon on my desktop, and if I were to doubleclick it, it would execute "cd ~/.wine2" and then "WINEPREFIX="$HOME/.wine2" wine program.exe".

I realise that most of you will probably go "duh, that's simple" or something similar, but I am extremely new to ubuntu, and dont know my way around yet.

View 3 Replies View Related

Ubuntu :: How To Execute Command Automatically After Login

Feb 2, 2011

I need to execute this command after login: gvfs-mount -d /dev/sda1.It works perfectly from terminal but it doesn't if I add it to "Startup Applications" or to rc.local.Is there another way?

View 2 Replies View Related

General :: Setup Fstab To Automatically Mount NTFS Partitions - GUI To Set The Mount Permissions?

Feb 10, 2010

I am trying to setup fstab to automatically mount my NTFS partitions. I have used various Mount managers to create the entries in fstab. The fstab seems fine, but when mounting at boot or even via Nautilus I get the error message that I do not have permission to mount the disk.

1) Can this permission be set in the fstab file? If so what is the syntax of the fstab entry?

2) If not, is there a tool i.e. GUI to set the mount permissions?

View 14 Replies View Related

Hardware :: Stop USB Stick To Mount Automatically And Mount It Manually?

Jan 26, 2011

I need a guicance related to mounting USB stick of 2GB capacity. Normally when I insert my USB stick it mount automatically and show me.I want that instead the usb mount automatically I manually mount it. Now there are two steps to do it. First How to stop USB to mount automatically ? Second How to mount it manually ?

View 1 Replies View Related

Ubuntu :: Can't Mount Removable Media: "failed To Execute Child Process Exo-mount"

May 18, 2011

I just upgraded Xubuntu from 10.04 LTS to 11.04 and I am no longer able to mount removable media from the "places" menu. The message I get:

"Failed to execute child process exo-mount (No such file or directory)"

I assume some wrapper process is attempting to execute a program called "exo-mount," but no such program exists anywhere in the repositories, according to a search with apt-file. The "exo-utils" package used to contain exo-mount, but the program no longer exists in that package.

Mounting from within Thunar works fine.

View 3 Replies View Related

Debian Configuration :: Configure To Automatically Use Wine To Execute Using The ./executable.exe Format?

Nov 5, 2010

I've recently been trying to restore a Debian installation back to it's previous state after a serious operation system crash. Efforts are largely going well however I've run into problems since reinstalling Wine. Previously I could execute a Windows executable by simply entering ./executable.exe in the bash shell but this no longer seems to work as now I have to include the "wine" command in front of the executable. how to configure Debian to automatically use Wine to execute using the ./executable.exe format?

View 1 Replies View Related

Ubuntu :: Fresh 9.10 Install Reboot Error No Device - Mount Partition Mount: Can't Fin?

Jun 24, 2010

what now trying to mount partition get this error this is the partition ubuntu 9.10 is installed on and upon reboot error no device with a long string. mount: can't find /dev/sda6/mnt in /etc/fstab or /etc/mtab

so now that I believe I've successfully mounted the partition how do I direct the bootloader to this partition /dev/sda6 on /media/11076e45-e27d-470b-bb6d-6894f7809a0c type ext4 (rw,nosuid,nodev,uhelper=devkit)

View 1 Replies View Related

Debian :: Modify To Automatically Grant Root Privileges And Execute Commands When Starts?

Aug 22, 2010

I'm connected to the internet using a wireless router. Each time I boot, I have to grant root privileges and type in a shell: iwconfig wlan0 essid linksys key dhclient wlan0 Isn't there a file(or location) that I can modify to automatically grant root privileges and execute these commands when debian starts? Something like autoexec.bat in windows.

Something else I'd like to mention is when I execute iwconfig.... for the first time, I get this incomplete result:

IEEE 802.11bg  ESSID:"linksys"
Mode:Managed  Access Point: Not-Associated   Tx-Power=27 dBm
Retry  long limit:7   RTS thr:off   Fragment thr:off
Encryption key***********
Power Management:off

[Code]...

View 4 Replies View Related

Programming :: Socket And Timer Programming - Server Doesn't Execute Any Msg Which Client Sent

May 16, 2011

i have a server program which accept multiple client connection and am using polling. like every 2 secs it will look to client whether any data is received after it binded. i have used setitimer but there is runtime error i got.. the server accept all client connection but doesn't execute any msg which client sent.

#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<netdb.h>
#include<unistd.h>
#include<pthread.h>
#include<string.h>
[Code]....

View 1 Replies View Related

Fedora :: 12 Doesn't Automatically Recognize Any New Device?

Feb 22, 2010

I recently updated from Fedora 9 to Fedora 12. Everything else works fine, but the situation with Fedora automatically recognised new devices when plugged in has changed to the exact opposite. Under Fedora 9, all devices I plugged in were always automatically recognised, whether I liked it or not. Under Fedora 12, nothing is ever automatically recognised any more. Whenever I plug something in, the system just ignores it. If they devices turn up as block device descriptors in /dev, I can manually mount them and access them through the mount points. Otherwise, I can't do squat. Now I can only access my digital camera by manually mounting it and copying the files. This works, but is cumbersome. Under Fedora 9, I used to be able to use GPhoto to download the pictures via PTP. Not any more. GPhoto acts as if the camera wasn't even there. So does F-Spot. What has happened? Have I missed installing some kernel module or service or something?

View 1 Replies View Related

Fedora :: Device Doesn't Starts Automatically?

Jun 5, 2010

My adsl device currently used as Auto eth0 only works when i plug in to the computer. The device doesn't starts automatically as it does in Windows. How can solve this ? Each time I try to connect internet after restarting , I should manually plug the cable to the port.

View 3 Replies View Related

General :: How To Mount Automatically

Jan 5, 2010

I want to mount a partition automatically when ubuntu starts.I have read some articles about but i think i make some mistake.I have read about etc/fstab and I wrote a statement below./dev/sda5/home/xyz/Desktop/ABC udf,iso9660 user,auto,exec,utf8.

View 4 Replies View Related

Ubuntu Installation :: How To Automatically Mount Second HD

Jan 7, 2010

I have installed the second drive, I have partition it and now it is OK. How could I make it to mount automatically at boot so it could be accessed easily, please?I understand that I have to use some commands (forgot where I read that) but have no idea how to do it.Is there an application with GUI to do that, so I will not make mistakes in terminal?

View 2 Replies View Related

Hardware :: Some CDs / DVDs Do Not Automatically Mount

Jun 5, 2010

I have checked out 'similar threads' to no avail. I am using Mandriva 2010 on /dev/sda6. I have two Pioneer CD/DVD drives. Some data CDs/DVDs automatically mount. Some do not show up in Dolphin's 'Places'. I tested many. Age of disk, brand name and whether pen parked gave no significant correlation. Using PCLinuxOS 2010 (live disk) created the same problem - not altogether surprising. But using Ubuntu 9.04 (live disk) created no problem.

Booting with slightly different kernel versions solved nothing. Using Windows XP or Mandriva 2009.1, both on other partitions, created no problem but when I tried Ubuntu 10.04 (live disk) I had 'no signal'. I have just put in a new Radeon (later than HD 2000) video card (fglrx) so I wondered if Ubuntu does not like it but this issue is unimportant - if Mandriva 2010 can be tamed. What did correlate was that both drives either recognised or both ignored any particular disk. Manual mounting as root works okay but my wife is not comfortable with the CLI.

The fstab file is below:
# Entry for /dev/sda6 :
UUID=14353eb6-82ff-45cc-ae64-8eed13800b46 / ext3 defaults 1 1
/dev/sr0 /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
/dev/sr1 /media/cdrom1 auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=07e9f3ee-d92e-4696-b762-03a07ed102d2 swap swap defaults 0 0

I checked but could not positively identify this issue as a known bug in Mandriva 2010.

View 2 Replies View Related

Ubuntu :: Automatically Unmount Encrypted USB Flash Drive When Device Is Unplugged?

Apr 21, 2010

I formatted the USB flash drive using Karmic's Format Disk utility (right-click on a volume, select "Format..."), and selected "Encrypted, compatible with Linux (FAT)" from the "Type" drop-down menu.It mounts correctly when I plug it in, and I can access the files just fine.When I unplug the Flash drive without using the 'Safely Remove Drive' option, the icon on my desktop changes its name to '2.0 GB Encrypted', instead of disappearing and unmounting like my unencrypted Flash drives do.

I would like to have encrypted Flash drive treated in the same way as my unencrypted Flash drives, which disappear and unmount when unplugged, even if the 'Remove Safely' menu option isn't used. What can I do to accomplish this?NOTES:When I plug the encrypted Flash drive in, the following line shows up in the output of 'mount'. 'secure' is the name I gave the disk during the format process:

Code:
/dev/mapper/devkit-disks-luks-uuid-302db16c-c6e2-4dd9-a259-436437c76475-uid1005 on /media/secure type vfat

[code]....

View 1 Replies View Related

Fedora :: Mount Internal Disk Automatically?

Dec 9, 2009

FC11 had "Authorization" choice in System > Preferences menu that we could change setting of system. but in Fedora 12 I don't have Authorization choice in menus. Now, how I can change setting of system? for example? Mount internal disk automatically!

View 7 Replies View Related

Ubuntu :: Mount FAT32 Drive Automatically?

Jan 12, 2010

I am setting up a home server and have two hard drives. One is the main HD for system files and the other will be for personal files.

The personal HD is /dev/sdb.

I know I have to edit fstab in order to get it to mount automatically at boot, but I am having trouble with the commands.

I would like for it to mount at boot and have full read-write access from any user.

View 3 Replies View Related

Ubuntu :: Mount Partition Automatically At Start?

Mar 28, 2010

recently i was trying to mount my partition automatically at start up ...so i gone through some tutorials on the net nd made some changes in /etc/fstab file (i made a back up before making any changes). when i was changing permissions of folder in which i tried to mount my all partitions i got my system screwed up.then it was showing following error at start up and GUI was not turning up. "could not update ICEauthority file " also my sudo was not working so first i restored original fstab file through recovery console then i googled out about above errors. I found some solution now my system is working but showing strange behaviour like:

> ubuntu is not detecting any of my hdd partition

> disk utility is not working (showing no error)

>fdisk -l shows nothing

> no new software is getting installed via ubuntu software center (shows no error when clicking on install but nothing turns up)

>i cannot restart or shutdown my system from GNOME it only logs off my session (although through terminal its working)

>no media player showing sound controls enabled

>gnome not showing ethernet or sound volume icon in upper panel (although net is working)

>users and groups from system->administration menu is not working (error:cannot load configuration)

i think most of the administrative tasks are not working.........i googled out but found nothing satisfactory..i dont want to reinstall it, coz i m not very experienced with linux n it took about a whole month to customize my ubuntu 9.10 on my college internet...

View 6 Replies View Related

Ubuntu :: Automatically Mount Sshfs Upon Startup?

Jun 17, 2010

I use this command to mount sshfs:sshfs -o idmap=user user@ip:/home/user/public_html ~/FolderThen I enter my password. I do this every time I start my computer

View 3 Replies View Related

Ubuntu :: Automatically Mount A Drive On Boot-up?

Sep 15, 2010

I have just installed 10.04 and am enjoying the quick clean boot. I have a dual-boot option as I have come over from XP. Most of my data is still on the old 'c:/' drive and I have to manually mount it every boot-up. Is there any way to automate this process?

View 4 Replies View Related

Ubuntu Networking :: Automatically Mount A Folder Over Ssh?

Sep 23, 2010

I'm following:To automatically mount a folder over ssh..

everything seems ok[I think?!]
It dosent mount on reboot...
if i take 1 line from the file /etc/init.d/sshfs

[code]....

View 1 Replies View Related

Server :: Fstab - NFS Share To Mount Automatically

Apr 13, 2011

On a production server, I want an NFS share to mount automatically. What is the best practice to use?

[Code]...

My understanding is that it is always best practice to use IP addresses in the fstab because the server will fail to mount the share upon booting if DNS is unavailable. I've also been told that if one MUST use names in the fstab, there should be a hosts file entry for it so that the server doesn't depend on DNS on boot.

View 7 Replies View Related

Programming :: Code That Will Never Execute

May 23, 2011

Is there, by chance, a fancy name to describe code that must be in a program but will never be executed? In one of my (Haskell) programs, I have some error-handling code that must be in the program to keep the compiler happy (due to the type checking). However I know that, due to the logical structure of the program, it is impossible for the code to be evaluated. I am curious if there is a technical name given to code that must exist but cannot be executed.

View 6 Replies View Related

Fedora :: Automatically Run Script On Optical Disc Is Mount?

Feb 23, 2010

how to get a bash script to automatically launch when the optical drive mounts a disc, any type of disc - DVD, CD, data, etc. It seems like such a simple task but after weeks of searching I have yet to find a workable solution.

View 1 Replies View Related

Fedora :: F13 Mount All Attached USB Devices After Boot Automatically?

Aug 31, 2010

One question: should F13 mount all attached USB devices after boot automatically? I guess it should. However, what I've experienced is that after boot and login, my USB modem + flash memory is not mounted. I need to manually unplug it and plug it again, and then it's mounted

View 1 Replies View Related

OpenSUSE :: Mount Vfat Partition Automatically After Boot?

Oct 23, 2010

How to mount vfat partition automatically after boot? After login it it will mount all vfat partition and the icon of those parition will be at desktop. How can it be done. udisks is installed. If i click a vfat partition from pcmanfm it prompts for password to mount.I don't want to click. It will be automatically mounted and i will get the icon of that mounted vfat partition at desktop

View 7 Replies View Related

Ubuntu Networking :: Automatically Mount NFS Shares Without Autofs?

Jan 24, 2010

Setup clients on a LAN to automatically mount NFS shares whenever the fileserver is up, without using autofs. Instead a simple bash script which checks if the server is up, and if the shares need to be mounted or unmounted is called by a custom upstart job. For a small office or home network populated with Unix-like computers (e.g., a few Ubuntu desktops or laptops and a fileserver), NFS (Network File System) is a good way to share storage space and centralise the backup of important documents. However, having a fileserver running 24/7 is often overkill for such a setup.

One way to have clients mount NFS shares automatically when the fileserver is turned on, is to use a package called autofs. Unfortunately, there are a few unresolved issues with using autofs in combination with NFS. In my case, when autofs tries to mount NFS shares when the fileserver is turned off, the Gnome desktop, and Nautilus in particular, becomes extremely unresponsive, regardless of the options used. Attempting to mount the share manually from the command line when the server is down however, does return a message of failure quite promptly, without hanging the desktop.

To solve this issue, I wrote a simple bash script that is run through the upstart system. The script simply checks if the fileserver is up, if the shares need mounting or unmounting, and then sleeps for a while before checking again. This works out quite well, so I decided to share this information in case someone else runs into these issues. PrerequisitesThis howto assumes that you have an NFS server set up with shares exported, and one or more clients capable of mounting those shares. For more information on setting up NFS shares and mounting them on a client from the command line, see: SettingUpNFSHowTo.

Clients should be able to ping the server to determine if it is running. Naturally, you need administrator access on the clients to install the script and upstart job outlined below. This script assumes that the directory paths of the shares match the location where they are mounted. In my case, the fileserver has two shares: /media/Storage and /media/Backup. On the clients these shares are mounted on the same paths. If your setup deviates from this, the script needs some modification. The script From the desktop of one the clients, paste the following bash script as a new file in your favourite text editor:

Code:

#!/bin/bash
# The hostname or IP-address of the fileserver:
FILESERVER="myfileserver.local"
# Check every X seconds (60 is a good default):

[code]...

Now adjust the FILESERVER variable. In this example, my fileserver is called myfileserver. By default, Ubuntu sets up your networking environment in such a way, that computername.local can be used to reach that computer over the local network, so the network name for myfileserver is myfileserver.local. Of course, you can also use the IP-address of the server. Next, change the MOUNTS variable to match the NFS shares exported by your NFS server. MOUNTS is an array; multiple entries are separated by spaces. So if you have one share exported as /media/MyShare, that line would look like this:

Code:

MOUNTS=( "/media/MyShare" )

An advantage of mounting shares in /media, is that they automatically show up as mounted drives on the user's desktop. Note that this howto assumes that you use the same paths for the share on the server and client side! Save the script to your desktop with an obvious name. In this example we call it mount_my_nfs_shares. Open a terminal and cd to the desktop. Make the script executable by calling:

Code:

chmod +x mount_my_nfs_shares

Next, move it to a place where it can be called by our upstart job, but also from the console to test. A good place to put such custom executables is /usr/local/bin.

Code:

sudo mv mount_my_nfs_shares /usr/local/bin

This script uses the logger command to tell the system's log what it is doing. To test this script, open up two terminals; in one, execute the following so we can monitor the log messages:

Code:

tail -f /var/log/syslog

In the other, simply execute mount_my_nfs_shares. If the script works, your shares should show up on the desktop and the computer:// location in Nautilus. If the fileserver goes down or becomes unreachable, the shares should disappear, and reappear when the fileserver comes back on-line. If this works, move on to the next step. Installing a custom upstart job The next step is to have the clients automatically run the above script when they are booted. We can use upstart for this. Create a new text file, and enter the following:

Code:

# mount_my_nfs_shares - mount NFS shares on fileserver, if present
description"Mount NFS-shares"
start on (filesystem)
respawn

[code]....

How the script works The script enters an eternal loop and keeps checking if it can reach the fileserver once every minute (unless you adjust the INTERVAL variable). If it can reach (ping) the fileserver, it checks if the mounts are already mounted by searching for them (grepping) in the output of mount. If they are not mounted, it tries to mount them. Else, if the server is down, it looks in the output of mount to see if these mounts exist. If they do, it tries to unmount them with the -f flag (useful for unmounting unreachable NFS shares).

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved