?

Log in

No account? Create an account
Unix-Solution [entries|archive|friends|userinfo]
Unix-Solution

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Script for add Windows Network Printer to Linux [Aug. 31st, 2006|10:48 am]
Unix-Solution

maximum_value
for example:
  Windows machine name = val
  Windows printer sharename = 2100val
  Printer type = HP-LaserJet_2100
  Printer Driver = hpij
  Printer Username and Password = printeruser and Printer (local or in Active Directory)

add to /etc/sudoers:

%users ALL=(root) NOPASSWD: /usr/bin/foomatic-configure

or

%Domain\ Users ALL=(root) NOPASSWD: /usr/bin/foomatic-configure (for AD)


Tested on Ubuntu 6.06

linkpost comment

Simple VPN Server on FreeBSD (based on MPD) for Windows XP(2003) VPN Client [Jul. 11th, 2006|01:49 pm]
Unix-Solution

maximum_value
Tested on FreeBSD 6.0

change(2006.10.27): adding "set pptp disable windowing" to mpd.conf













For testing run "mpd" in console without any switches
linkpost comment

Files and Folders to lower case [Jun. 5th, 2006|09:45 am]
Unix-Solution

maximum_value
tolowcase:

#!/bin/sh
if [ "$1" == ""  ]
then
    echo -e "Usage: tolowcase 'path'\nFor exapmle:
        tolowcase \"$HOME/.wine/drive_c/Program Files/\"
        tolowcase \"$HOME/.wine/drive_c/Program Files\"
        tolowcase $HOME/.wine/drive_c/Program\ Files"
    exit
fi

list=`find "$1" | sort -r | sed "s/\ /\[:space:\]/g"`

for name in $list
do
    name=`echo $name | sed "s/\[:space:\]/\ /g"`
    path=`echo $name | sed 's/[^\/]*$//g'`      # pathname
    nameorig=`echo $name | sed 's/.*\///g'`     # filename
    namechng=`echo $nameorig | tr [:upper:] [:lower:]`
    if [ "$nameorig" != "$namechng" ]
    then mv "$path$nameorig" "$path$namechng"; echo "$path$nameorig -> $namechng"
    fi
done
link4 comments|post comment

1-st record - CMD Here and FileNote for Unix (Gnome 2) [Jun. 4th, 2006|06:55 pm]
Unix-Solution

maximum_value
1) create file cmd_filenote.sh:

#!/bin/sh
mkdir -p $HOME/.gnome2/nautilus-scripts
echo -e '#!/bin/bash\ngedit "$NAUTILUS_SCRIPT_CURRENT_URI/$@.txt"' > \
$HOME/.gnome2/nautilus-scripts/file-note
echo -e '#!/bin/sh\nhere=\
`echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"`\
\ngnome-terminal --working-directory="$here"' > \
$HOME/.gnome2/nautilus-scripts/terminal-here
chmod +x $HOME/.gnome2/nautilus-scripts/*

2) run it;
3) You can use scripts from context menu now.

Tested with:
Gnome 2.12.3
link1 comment|post comment

navigation
[ viewing | 10 entries back ]
[ go | later ]