I want to run a vnc server on a remote box and almost all examples give you twm. I'm just so used to gnome by now.
So here is what I get with twm:
jhereg % vncserver New 'jhereg:1 (th199096)' desktop is jhereg:1 Starting applications specified in /home/th199096/.vnc/xstartup Log file is /home/th199096/.vnc/jhereg:1.log jhereg % more .vnc/xstartup #!/bin/sh [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid black gnome-terminal & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
Lets kill it and try another xstartup:
jhereg % vncserver -kill :1 Killing Xvnc process ID 102149 jhereg % cp .vnc/xstartup .vnc/xstartup.twm jhereg % cp .vnc/xstartup2 .vnc/xstartup jhereg % cat !$ cat .vnc/xstartup #!/bin/sh [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid black gnome-session& gnome-terminal --geometry 80x24+10+10 --title="My Desktop" & gnome-terminal & jhereg % vncserver New 'jhereg:1 (th199096)' desktop is jhereg:1 Starting applications specified in /home/th199096/.vnc/xstartup Log file is /home/th199096/.vnc/jhereg:1.log
Hmm, my text windows are a bit small and the wrong color, but I can fix that.
I fixed the color by changing properties for the default profile, but I can't get the windows to start up properly. If I manually start one with the same options, everything is okay. Weird.
Update: After a panic on my system, when I started vncserver back up, the windows were sized accordingly.
I wanted to run a vnc server on a remote lab machine:
jhereg % vncserver vncserver: couldn't find "Xvnc" on your PATH. jhereg % which Xvnc Xvnc: Command not found.
Hmm, I used to run it on another machine:
iquad % which Xvnc
/opt/sfw/bin/Xvnc
iquad % df -h /opt/sfw/bin/Xvnc
Filesystem size used avail capacity Mounted on
pool/sfw_s10_ccd-02-i386
1.8T 1.5G 590G 1% /pool/sfw/s10_ccd-02-i386
Why isn't jhereg mounting that?
I found out why on another box:
aus1500-home % cat /etc/auto_direct # # Solaris Freeware # # /opt/sfw is severely out of date. many of these freeware utils # are already in NV. commented out for now to see who yells. #/opt/sfw -ro,nosuid iquad:/pool/sfw/s10_ccd-02-$CPU/opt/sfw
Okay, I could install it or even yell. But why don't we see if Xvnc is on jhereg, but not in my path?
[root@jhereg /]> find . ! -local -name Xvnc find: cannot read dir ./usr/dist/lost+found: Permission denied ./usr/dist/share/vnc,v4.1.2/5bin.sun4/Xvnc ./usr/dist/share/vnc,v3.3.7/5bin.sun4/Xvnc
But even before I got the positive hits out, I had used google on solaris Xvnc to find this link: System Administration Guide: Virtualization Using the Solaris Operating System and found this: Starting VNC
# Add an instance of x11-server service called display1 for configuration, and configure it to run Xvnc. svccfg -s application/x11/x11-server add display1 svccfg -s application/x11/x11-server:display1 addpg options application svccfg -s application/x11/x11-server:display1 addpropvalue options/server: "/usr/X11/bin/Xvnc" svccfg -s application/x11/x11-server:display1 addpropvalue options/server: '"SecurityTypes=None"'
And we get:
jhereg % ls -la /usr/X11/bin/Xvnc -r-xr-sr-x 1 root root 4706264 Sep 5 14:30 /usr/X11/bin/Xvnc
And meanwhile the find is finally at:
./usr/dist/share/vnc,v4.1.2_01/5bin.i86pc/Xvnc ./usr/dist/share/vnc,v4.1.2_01/5bin.sun4/Xvnc ./usr/dist/share/vnc,v4.1.2_01/5lib.i86pc/Xvnc ./usr/dist/share/vnc,v4.1.2_01/5lib.sun4/Xvnc ./usr/dist/exe/Xvnc
Are they the same?
jhereg % ls -la /usr/X11/bin/Xvnc -r-xr-sr-x 1 root root 4706264 Sep 5 14:30 /usr/X11/bin/Xvnc jhereg % ls -la /usr/dist/exe/Xvnc lrwxrwxrwx 1 softdist softdist 3 Apr 21 2005 /usr/dist/exe/Xvnc -> cam jhereg % ls -la /usr/dist/exe/cam lrwxrwxrwx 1 root other 28 Sep 15 2001 /usr/dist/exe/cam -> ../pkgs/cam/softdist/exe/cam jhereg % ls -la /usr/dist/exe/../pkgs/cam/softdist/exe/cam lrwxrwxrwx 1 softdist softdist 19 Feb 12 2007 /usr/dist/exe/../pkgs/cam/softdist/exe/cam -> .cam,v1.8.3_wrapper jhereg % ls -la /usr/dist/exe/../pkgs/cam/softdist/exe/.cam,v1.8.3_wrapper -rwxr-xr-x 1 softdist softdist 14303 May 9 2007 /usr/dist/exe/../pkgs/cam/softdist/exe/.cam,v1.8.3_wrapper jhereg % file /usr/dist/exe/../pkgs/cam/softdist/exe/.cam,v1.8.3_wrapper /usr/dist/exe/../pkgs/cam/softdist/exe/.cam,v1.8.3_wrapper: executable shell script
No, I don't think so...
Perhaps I should have been smarter on my find?
[root@jhereg /]> find /usr/X11 -name Xvnc /usr/X11/bin/Xvnc [root@jhereg /]> find / -name Xvnc /usr/X11/bin/Xvnc ^C
Much faster and it looks like I misread the man page for find(1). See example 9 for what I didn't read close enough:
Example 9 Printing Local Files without Descending Non-local
Directories
example% find . ! -local -prune -o -print
I have friends who would say I should just discard this article and act like nothing happened. But where is the fun in that? Big :->
In a past life, I did the code for moving files/directories across a qtree in WAFL. The mv used to degrade to a copy because of the effective change in the fsid. The algorithm I used to combat this was to copy directories and move files. I had to copy the directories because we needed a source and destination target for the renames. And this would not leave us in an inconsistent state.
So I was all prepared for pain and hoops when I wanted to rename a ZFS filesystem on a test box. And I am happy to be dismayed that did not happen:
[root@jhereg ~]> zfs create pool/builds [root@jhereg ~]> zfs list NAME USED AVAIL REFER MOUNTPOINT pool 59.9G 74.0G 22K /builds pool/builds 18K 74.0G 18K /builds/builds pool/jasmith 22.5G 74.0G 866K /builds/jasmith pool/jasmith/nfs41-instp 773M 74.0G 731M /builds/jasmith/nfs41-instp pool/jasmith/nfs41-instp-bld 11.4G 74.0G 11.7G /builds/jasmith/nfs41-instp-bld pool/jasmith/nfs41-open 767M 74.0G 712M /builds/jasmith/nfs41-open pool/jasmith/nfs41-open-bld 9.62G 74.0G 10.3G /builds/jasmith/nfs41-open-bld pool/webaker 37.4G 74.0G 17.5G /builds/webaker pool/webaker/vbox0 7.46G 74.0G 7.46G /builds/webaker/vbox0 pool/webaker/vbox_ds1 1.48G 74.0G 7.82G /builds/webaker/vbox_ds1 pool/webaker/vbox_ds2 17K 74.0G 18K /builds/webaker/vbox_ds2 pool/webaker/vbox_ds3 118M 74.0G 7.77G /builds/webaker/vbox_ds3 pool/webaker/vbox_master 7.77G 74.0G 7.77G /builds/webaker/vbox_master pool/webaker/vbox_mds 3.07G 74.0G 8.99G /builds/webaker/vbox_mds [root@jhereg ~]> zfs rename pool/jasmith pool/builds/jasmith [root@jhereg ~]> zfs list NAME USED AVAIL REFER MOUNTPOINT pool 59.9G 74.0G 23K /builds pool/builds 22.5G 74.0G 18K /builds/builds pool/builds/jasmith 22.5G 74.0G 866K /builds/builds/jasmith pool/builds/jasmith/nfs41-instp 773M 74.0G 731M /builds/builds/jasmith/nfs41-instp pool/builds/jasmith/nfs41-instp-bld 11.4G 74.0G 11.7G /builds/builds/jasmith/nfs41-instp-bld pool/builds/jasmith/nfs41-open 767M 74.0G 712M /builds/builds/jasmith/nfs41-open pool/builds/jasmith/nfs41-open-bld 9.62G 74.0G 10.3G /builds/builds/jasmith/nfs41-open-bld pool/webaker 37.4G 74.0G 17.5G /builds/webaker pool/webaker/vbox0 7.46G 74.0G 7.46G /builds/webaker/vbox0 pool/webaker/vbox_ds1 1.48G 74.0G 7.82G /builds/webaker/vbox_ds1 pool/webaker/vbox_ds2 17K 74.0G 18K /builds/webaker/vbox_ds2 pool/webaker/vbox_ds3 118M 74.0G 7.77G /builds/webaker/vbox_ds3 pool/webaker/vbox_master 7.77G 74.0G 7.77G /builds/webaker/vbox_master pool/webaker/vbox_mds 3.07G 74.0G 8.99G /builds/webaker/vbox_mds
In all fairness to WAFL, I expect that with their virtual volumes, this type of operation is just as painless. The FSID of the filesystem is not really changing - just the point at which it is mounted in the name space. I.e., the operation is on the filesystem and not the individual files. We don;t have to recurse to change the inodes for each file.
Back to the great ZFS discussion. What I wanted to do was push the name space down for the existing sub-filesystems and yet keep the existing name space. I.e., I don't want pool mounted on /builds, but I still want to see /builds/jasmith. I can finish this off thusly:
[root@jhereg ~]> zfs rename pool/webaker pool/builds/webaker [root@jhereg ~]> zfs list pool NAME USED AVAIL REFER MOUNTPOINT pool 59.9G 74.0G 23K /builds [root@jhereg ~]> zfs set mountpoint=/pool pool [root@jhereg ~]> zfs set mountpoint=/builds pool/builds [root@jhereg ~]> zfs list NAME USED AVAIL REFER MOUNTPOINT pool 59.9G 74.0G 21K /pool pool/builds 59.9G 74.0G 21K /builds pool/builds/jasmith 22.5G 74.0G 866K /builds/jasmith pool/builds/jasmith/nfs41-instp 773M 74.0G 731M /builds/jasmith/nfs41-instp pool/builds/jasmith/nfs41-instp-bld 11.4G 74.0G 11.7G /builds/jasmith/nfs41-instp-bld pool/builds/jasmith/nfs41-open 767M 74.0G 712M /builds/jasmith/nfs41-open pool/builds/jasmith/nfs41-open-bld 9.62G 74.0G 10.3G /builds/jasmith/nfs41-open-bld pool/builds/webaker 37.4G 74.0G 17.5G /builds/webaker pool/builds/webaker/vbox0 7.46G 74.0G 7.46G /builds/webaker/vbox0 pool/builds/webaker/vbox_ds1 1.48G 74.0G 7.82G /builds/webaker/vbox_ds1 pool/builds/webaker/vbox_ds2 17K 74.0G 18K /builds/webaker/vbox_ds2 pool/builds/webaker/vbox_ds3 118M 74.0G 7.77G /builds/webaker/vbox_ds3 pool/builds/webaker/vbox_master 7.77G 74.0G 7.77G /builds/webaker/vbox_master pool/builds/webaker/vbox_mds 3.07G 74.0G 8.99G /builds/webaker/vbox_mds
And now I can construct other high level filesystems here:
[root@jhereg ~]> zfs create pool/home [root@jhereg ~]> zfs set mountpoint=/export/home pool/home [root@jhereg ~]> zfs set sharenfs=rw pool/home [root@jhereg ~]> zfs create pool/home/tdh [root@jhereg ~]> share | grep tdh -@pool/home /export/home/tdh rw ""
Note that I set up the properties I want on pool/home and count on inheritance to make sure new filesystems under it have the properties I care about.