Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env sh
- # kstart --desktop [#] [command]
- # Assign to dlg the specified user.
- dlg=$(ruby <<EOF
- command = "zenity --list --column=User root"
- File.new("/etc/passwd").readlines.each{|l|
- fields=l.split(":")
- if ( fields[2].to_i > 1000 and fields[2].to_i<60000) then
- command = command+" #{fields[0]}"
- end
- }
- puts command
- EOF
- )
- # Execute zenity dialog, assign choice to KA_USER
- KA_USER=$($dlg)
- if [ -n "$KA_USER" ]
- then
- t=$(mktemp --suffix=log /tmp/sukon-XXXX)
- /usr/lib/kde4/libexec/kdesu -u $KA_USER konsole 2>&1 > $t
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement