[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian Wheezy - HP Pavilion dm1



On Sun, 2013-10-20 at 20:59 +0200, Ralf Mardorf wrote:
> On Sun, 2013-10-20 at 14:39 -0400, Sureyya Sahin wrote:
> > I will try to compile hamster and qalculate from sources. If I can't, 
> > probably I will reinstall them as well.
> 
> You don't need to compile them, you can install the binaries.
> 
> > Given that I won't be able to use usb devices from gui, is there an 
> > alternative to Thunar that I can use to mount and use my devices? I
> > have plenty of space in my root directory. Thus, I wouldn't mind using
> > extra software which would make life easier for me.
> 
> I guess there is, but I don't know it. You likely can do it using udev
> or something similar, but I never wrote an udev rule myself.
> 
> I'm using scripts:
> 
> #!/bin/sh
> 
> # /usr/local/sbin/lmount
> 
> case $1 in
>       -r|-w) mkdir -p /mnt/$2
>              if [ -e "/media/$2" ] ; then :
>              else
>                ln -s /mnt/$2 /media/$2
>              fi
>              case $1 in
>                -r) mount -rL$2 /mnt/$2;; 
>                -w) mount -wL$2 /mnt/$2 -o noatime;;
>              esac ;;
>          -u) umount "$(blkid -L$2)"
>              rm /media/$2; rmdir /mnt/$2;;
>   --help|-h) echo
>              echo "Usage of /usr/local/sbin/lmount"
>              echo
>              echo "mount read-only"
>              echo "  lmount -r <label>"
>              echo "mount read/write noatime"
>              echo "  lmount -w <label>"
>              echo "unmount"
>              echo "  lmount -u <label>"
>              echo ;;
> esac
> exit
> 
> 
> 
> 
> #!/bin/bash
> 
> # /usr/local/sbin/mount.o
> mkdir -p                 /media/optical
> chown    root:optical    /media/optical
> mount -t auto /dev/cdrom /media/optical 
> exit
> 
> 
> 
> 
> 
> #!/bin/bash
> 
> # /usr/local/sbin/umount.o
> umount /dev/cdrom
> rmdir /media/optical
> exit
> 
> #!/bin/sh
> # /usr/local/bin/llmount
> exec sudo lmount $*
> 
> 
> 
> 
> 
> #!/bin/sh
> 
> # /usr/local/bin/tmount
> 
> case $1 in
>   --help|-h) echo
>              echo "Usage of /usr/local/bin/tmount"
>              echo
>              echo "mount read-only"
>              echo "  tmount -r <label>"
>              echo "mount read/write noatime"
>              echo "  tmount -w <label>"
>              echo "unmount"
>              echo "  tmount -u <label>"
>              echo; exit;;
>          -u) gksudo "lmount $*";;
>           *) gksudo "lmount $*"; thunar /mnt/$2; gksudo "lmount -u $2";;
> esac
> exit
> 
> 
> No script for USB yet.


PS: I usually run them in a terminal, but I also have launchers in my
Xfce4 panel using tmount.

Oops, the line

*) gksudo "lmount $*"; thunar /mnt/$2; gksudo "lmount -u $2";;

is broken, it ask to unmount before Thunar is closed. It worked, perhaps
I randomly edited it and break it.

&, && won't help ;), I need to add a loop to check when thunar is
running and to ask to unmount when it isn't running anymore. However, by
canceling the second request for a password, it won't unmount and can be
used.


Reply to: