VOGONS


First post, by ch355209

User metadata
Rank Newbie
Rank
Newbie

If we chose the "-noconsole" option, the file created by a screen capture (Ctrl-F5) is corrupted because it contains the message that is normally sent to the console.

DOSBox do not have write access to its installation folder because I use a limited account.

I set another path for the "capture" folder because I don’t have write access to it.

System: Windows XP SP2

Attachments

  • Filename
    dosbox_000.png
    File size
    6.46 KiB
    Downloads
    669 downloads
    File license
    Fair use/fair dealing exception

Reply 3 of 14, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

I wouldn't consider it a bug in DosBox.

On my XP system, by default only admins have the ability to write to a directory. You can verify this by creating a folder as an admin, if your security is set up properly then only admins can write to that directory. I'm not sure if the installer that DosBox uses can change permissions on a folder (although it could probably be added easily) or even if it would be wise to override the default permissions of XP. I personally would leave that option up to the user and provide the information in the README.

How To Ask Questions The Smart Way
Make your games work offline

Reply 4 of 14, by ch355209

User metadata
Rank Newbie
Rank
Newbie

It’s not necessary to change permissions; it only has to prevent corruption of the file created by the screen capture.

Normally the software don’t change the permissions, they use the directory of the user.

Ex.: "C:\Documents and Settings\User_Name\[Application Data]"

Reply 5 of 14, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Correct, but most enthusiasts don't like to use the Documents and Settings folder.

1. Documents and settings isn't the same across different MS OS's. Meaning that you'd have to code in allowances for different OS'S, IIRC, 9x/NT is profiles directory in \WINNT or \Windows, 2000/XP/2003 is Documents and Settings.
2. Using Documents and settings fragments your system partition unless you've moved your profile of course. Most enthusiasts either move their profile away from their system partition or store their files away from their profile
3. Using Documents and Settings for users that upgrade and reinstall often means that vital data may get wiped out.

Allowing DosBox to use Documents and Settings would be as easy as getting the current profile dir using %APPDATA% variable (for NT4/2K/XP/2003, unsure what the variable would be for 9x, probly Profiles\All Users\something something) and setting a DosBox capture directory. Considering the fact that the developers like to be as crossplatform as possible I'm not sure if they'd go for this. (This is of course one of the "disadvantages" of being crossplatform) Even if they did the option would most likey be disabled by default, which leads us back to the current situation in which you can specify the capture directory yourself.

Note, I'm not a programmer of dosbox (yet), just a beta tester. So we'll see what they have to say about the subject.

How To Ask Questions The Smart Way
Make your games work offline

Reply 6 of 14, by damien

User metadata
Rank Newbie
Rank
Newbie

Correct, but most enthusiasts don't like to use the Documents and Settings folder.

Because "enthusiasts" are sloppy? 😀

1. Documents and settings isn't the same across different MS OS's. Meaning that you'd have to code in allowances for different OS'S, IIRC, 9x/NT is profiles directory in \WINNT or \Windows, 2000/XP/2003 is Documents and Settings.

Actually, no, you wouldn't: there is a standard Win32 function call to get the location of the user's folder. Of course, this doesn't mesh well with the use of sdl, but perhaps sdl wraps this somehow? I don't know, I've never used it.

2. Using Documents and settings fragments your system partition unless you've moved your profile of course. Most enthusiasts either move their profile away from their system partition or store their files away from their profile

Really? I don't. In fact, I WANT this feature. I think you are projecting your own beliefs onto others here 😉.

3. Using Documents and Settings for users that upgrade and reinstall often means that vital data may get wiped out.

Ummm...I don't know about you, but for me it makes it *easier* to back up, because all my stuff is in one place.

Just my 2c.

Reply 7 of 14, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Really? I don't. In fact, I WANT this feature. I think you are projecting your own beliefs onto others here 😉.

No, not beliefs. FACTS. Most enthusiasts and people who maintain clean systems like to keep their System drive clean of crap. Constantly adding and deleting crap to your profile fragments your System drive thereby over time fragmenting your drive. Yes, defragging will of course fix this but by not storing your profile on your system drive you are reducing the amount of fragmentation on your system drive. I'm not saying that profiles are bad or that profiles on the system partition are bad for the common user. I'm just saying that if your want less fragmentation and bother then you'd store your profile away from your System partition.

Ummm...I don't know about you, but for me it makes it *easier* to back up, because all my stuff is in one place.

It really depends on your backup methods. I do alot of work on other drive (External USB, seperate partition.) that don't have anything to do with my profile and constantly switch between operating systems for testing, it's easier for me to use directories other than my profile or to store my profile on a seperate partition.

How To Ask Questions The Smart Way
Make your games work offline

Reply 8 of 14, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It's a bug.

a simple fix would be to change the captures directory in dosbox.conf to a writable location.

but it's a bug and hopefully i will not forget to fix it.

Water flows down the stream
How to ask questions the smart way!

Reply 9 of 14, by ch355209

User metadata
Rank Newbie
Rank
Newbie

a simple fix would be to change the captures directory in dosbox.conf to a writable location.

I made this change, otherwise I could not have any screen capture file to show, and the file is corrupted.

Reply 10 of 14, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
Qbix wrote:

It's a bug.

a simple fix would be to change the captures directory in dosbox.conf to a writable location.

but it's a bug and hopefully i will not forget to fix it.

I am not sure that it is a bug. The problem is caused by 2 things:

  1. The default dosbox.conf uses a simple (relative) directory name for the captures folder:
    [dosbox]
    language=
    machine=vga
    captures=capture
    memsize=16
    and
  2. The Start Menu short-cut for DOSBox is configured with something like C:\Program Files\DOSBox-0.63 as the working directory.

Taken together, this means that the captures directory becomes C:\Program Files\DOSBox-0.63\capture (which is not very nice!)

If the working directory in the short-cut is changed to something like %UserProfile%\Documents, then all the user have to do is to create the capture directory before running DOSBox.

For the purists who wants to keep user-data and profiles separate from the OS, I recommend this KB article:

http://support.microsoft.com/kb/q236621/

If only the Documents folder needs to be relocated, it is as simple as right-clicking on the folder, choose Properties, click Move..., and select new path for the Destination Folder.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 11 of 14, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
MiniMax wrote:

The Start Menu short-cut for DOSBox is configured with something like C:\Program Files\DOSBox-0.63 as the working directory.
Taken together, this means that the captures directory becomes C:\Program Files\DOSBox-0.63\capture (which is not very nice!)

Good for me. Frankly, I hate "Documents and Settings" folder... 😀

Mirek

Reply 12 of 14, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

hmm it's a weird bug
it seems like the stdout is overwritten or so.
very odd.
It's easy to circumvent in the code. but i don't understand why it happens

Water flows down the stream
How to ask questions the smart way!

Reply 13 of 14, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

I use NTFS junctions to reassign my c:\Documents and Settings and c:\Program Files. Makes Documents and Settings a little bit more palatable. (uhh, hopefully I spelled that right). I don't think know Microsoft's official stance on junctions tho so I don't use it on work systems, although it's worked fine for the past 5 years....

How To Ask Questions The Smart Way
Make your games work offline

Reply 14 of 14, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

found it.
if the startup directory is read-only then the file handles that are opened for the -noconsole option fail as well. (the stdin and stdout files)

The screenshot file is then first file open and is treated as stdin when a log messages apears. A potentially risky situation.

implemented a fix.

Water flows down the stream
How to ask questions the smart way!